What is the best, most efficient, Client pool technique with Erlang

后端 未结 3 1878
一向
一向 2021-02-15 15:34

I\'m a real Erlang newbie (started 1 week ago), and I\'m trying to learn this language by creating a small but efficient chat server. (When I say efficient I mean I have 5 serve

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-15 16:30

    I'm also kind of new to Erlang (a couple of months), so I hope this can put you in the correct path :)

    First of all, since you're a "newbie", you should know about these sites:

    • Erlang Official Documentation: Most common modules are in the stdlib application, so start from there.
    • Alternative Documentation: There's a real time search engine, so it is really good when searching for specific modules.
    • Erlang Programming Rules: For you to enter in the mindset of erlang programming.
    • Learn You Some Erlang Book: A must read for everyone starting with Erlang. It's really comprehensive and fun to read!
    • Trapexit.org: Forum and cookbooks, to search for common problems faced by programmers.

    Well, thinking about a non persistent database, I would suggest the sets or gb_sets modules (documentation here).

    If you want persistence, you should try dets (see documentation above), but I can't state anything about efficiency, so you should research this topic a bit further.

    In the book Learn You Some Erlang there is a chapter on data structures that says that sets are better for read intensive systems, while gb_sets is more appropriate for a balanced usage.

提交回复
热议问题