4 ms·
I've been meaning to learn more about Erlang. For the Erlang experts who are willing to enlighten me: 1) I recall reading that string in Erlang is implemented
by continuations 13y ago
I've been meaning to learn more about Erlang. For the Erlang experts who are willing to enlighten me:
1) I recall reading that string in Erlang is implemented as linked list and is slow. How does that affect web development which usually involves a lot of string processing?
2) Does Chicago Boss come with non-blocking database clients? If one of those millions of userland processes makes a query to MySQL would it block the entire Erlang scheduler?
3) Does Chicago Boss support multibyte languages like Chinese and Japanese? Last time I looked unicode support of Erlang seemed to be shaky.
4) Difference between Chicago Boss & Nitrogen?
- timClicks 13y agoOthers, who are more proficient in the language (I have a heavy Python background), can supplement or correct these answers. Here is a start though: 1) For web development, Erlang uses a data type called an iolist. This can be a (potentially nested) mashup up binary, character and byte sequences. It is extremely memory efficient and is a pleasure to work with. 2) Chicago Boss database drivers use client libraries from the Erlang community. Erlang programmers 3) Yes. I believe Chicago Boss supported Unicode/UTF-8 before the rest of Erlang did. 4) I guess the biggest difference is that Chicago Boss uses Rails conventions, whereas other Erlang web frameworks create their own. For example, CB is the (only?) Erlang web framework to use a database abstraction layer built from models written in an easy-to-read DSL.
- oinksoft 13y ago1) Binaries are usually used when space is important (like when developing web applications). They use considerably less memory than lists. Processing binaries or list strings is slow compared to other languages where this is a focus. Erlang is not a strong string-processing language if you care about performance. 2) Mnesia? Riak too. And no, the Erlang scheduler won't get blocked. Why would waiting for something unpredictable like an open MySQL connection block a central coordinating component of the VM? Study how the Erlang VM[1] works more and you will see why Erlang/OTP is so resilient. The `epgsql' and `Emysql' libraries are heavily used by Erlang developers to work with PostgreSQL and MySQL, respectively. 3) Yes. http://www.erlang.org/doc/apps/stdlib/unicode_usage.html http://www.erlang.org/doc/apps/stdlib/unicode_usage.html 4) No clue, I use neither. [1] http://jlouisramblings.blogspot.com/2013/01/how-erlang-does-scheduling.html http://jlouisramblings.blogspot.com/2013/01/how-erlang-does-...