GithubHelp home page GithubHelp logo

gar1t / e2 Goto Github PK

View Code? Open in Web Editor NEW
119.0 11.0 23.0 324 KB

Project that aims to simplify Erlang/OTP development and improve developer productivity

Home Page: http://e2project.org

License: Other

Erlang 98.36% Shell 0.42% Makefile 1.22%

e2's Introduction

e2

e2 is a small Erlang library that helps you write better software in less time.

  • Erlang is hands down the best general purpose language for writing quality software using fewer lines of code
  • It’s not always obvious how to use Erlang to do this
  • e2 makes it obvious!

If you think the first point is controversial, take a closer look at e2 before settling the issue in your mind. It may take some time and effort before all the pieces come together – but isn’t the promise tempting!

Get started here:

http://e2project.org

e2's People

Contributors

jdongian avatar kapyshin avatar kristinn avatar tmcgilchrist avatar wolfeidau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

e2's Issues

Something seems weird

Hi,

disclaimer: I'm a newbie, so not on the head (nor the balls !)

Trying to understand how the architecture works, I added io:format(…) almost everywhere in the tutorial example; the object of my question is about a part that seems to be static (always the same PID), thus, might be a choke point.

When clients call, they're requests are processed by different PID, so I understand it as parallelism, but one part stays "static" (I also made tests with a lot of clients, with the same result) - so, my question is:
is it because the PID is fast released an re-used immediately ?
or, if it means all requests pass through the same PID, it is a choke point?
(The question behind this being: I use this code to I/O large data, such as a PDF, from a regular DB, will it choke if more users ask for the same kind of data at the same time?)

Here is the logs:

GET msg client-2

1> mydb_client_handler:handle_command_line({ok, Data}, Socket)
mydb_client_handler:parse_command(Data)
mydb_client_handler:handle_command_re_result({match, [Command, Arg]})
mydb_client_handler:handle_command({"GET", Key}, Socket)
mydb_client_handler:db_get(Key)
mydb_data:get(Key) / <0.77.0>
mydb_data:handle_msg({get, Key}, _From, Db) / <0.69.0>
mydb_db:get(Db, Key) / <0.69.0>
mydb_db:handle_dets_lookup([{_Key, Value}]) / <0.69.0>
mydb_client_handler:handle_reply(Reply, Socket) / Reply = {ok,"TEST MSG"}
mydb_client_handler:send_reply({ok, Val}, Socket)
mydb_client_handler:handle_task(Socket)
mydb_client_handler:read_line(Socket)

GET msg client-1

1> mydb_client_handler:handle_command_line({ok, Data}, Socket)
mydb_client_handler:parse_command(Data)
mydb_client_handler:handle_command_re_result({match, [Command, Arg]})
mydb_client_handler:handle_command({"GET", Key}, Socket)
mydb_client_handler:db_get(Key)
mydb_data:get(Key) / <0.76.0> <<< PID IS ≠ FROM client-2 - OK
mydb_data:handle_msg({get, Key}, _From, Db) / <0.69.0> <<< PID IS = FROM client-2 - WEIRD (CHOKE POINT ???)
mydb_db:get(Db, Key) / <0.69.0>
mydb_db:handle_dets_lookup([{_Key, Value}]) / <0.69.0>
mydb_client_handler:handle_reply(Reply, Socket) / Reply = {ok,"TEST MSG"}
mydb_client_handler:send_reply({ok, Val}, Socket)
mydb_client_handler:handle_task(Socket)
mydb_client_handler:read_line(Socket)

Anyway, thanks for e2, as it helps a lot to understand how Erlang works.

Is this a bug?

Hi,

While testing the tasks example, I had an issue; tasks:start_tasks(10) worked,
but tasks:start_repeating(150, 20) returned that:

3> tasks:start_repeating(150, 20).
** exception error: no function clause matching e2_service_impl:split_options(repeating,150,[],[]) (../../src/e2_service_impl.erl, line 78)
in function e2_task:start_link/3 (../../src/e2_task.erl, line 57)
4>

Project status?

Hi! What's the status on this project? There are quite a few TODOs mentioned, and not much activity lately. Is the implementation complete enough, or is it lack of time/interest from community?

Example logger C part have a problem with Erlang/20 erl_driver.h

Debian stretch (stable)
erlang-solutions Erlang/20 pkgs

Hi,

Trying to test it, it returns:

=ERROR REPORT==== 26-Sep-2017::17:20:47 ===
Error loading driver: Driver compiled with incorrect version of erl_driver.h
=CRASH REPORT==== 26-Sep-2017::17:20:47 ===
crasher:
initial call: syslog:init/1
pid: <0.75.0>
registered_name: []
exception exit: bad_driver
in function gen_server:init_it/6 (gen_server.erl, line 349)
ancestors: [syslog_sup,<0.73.0>]
message_queue_len: 0
messages: []
links: [<0.74.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 376
stack_size: 27
reductions: 232
neighbours:

=SUPERVISOR REPORT==== 26-Sep-2017::17:20:47 ===
Supervisor: {local,syslog_sup}
Context: start_error
Reason: bad_driver
Offender: [{pid,undefined},
{id,syslog},
{mfargs,{syslog,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]

=CRASH REPORT==== 26-Sep-2017::17:20:47 ===
crasher:
initial call: application_master:init/4
pid: <0.72.0>
registered_name: []
exception exit: {{shutdown,{failed_to_start_child,syslog,bad_driver}},
{syslog_app,start,[normal,[]]}}
in function application_master:init/4 (application_master.erl, line 134)
ancestors: [<0.71.0>]
message_queue_len: 1
messages: [{'EXIT',<0.73.0>,normal}]
links: [<0.71.0>,<0.33.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 376
stack_size: 27
reductions: 185
neighbours:

=INFO REPORT==== 26-Sep-2017::17:20:47 ===
application: syslog
exited: {{shutdown,{failed_to_start_child,syslog,bad_driver}},
{syslog_app,start,[normal,[]]}}
type: temporary
** exception error: {error,{{shutdown,{failed_to_start_child,syslog,bad_driver}},
{syslog_app,start,[normal,[]]}}}
in function e2_application:start_apps/1 (../../src/e2_application.erl, line 139)
in call from e2_application:start_with_dependencies/1 (../../src/e2_application.erl, line 50)
2>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.