News for hackers. Stuff that matters.
Re:Comparison of Erlang Runtime System and Java Virtual Mach... by white-flame on Sunday June 28, 2015 @06:36PM (#9795385)
I was working with Erlang for about 2 years in a multi-language environment, and we based our networking messaging infrastructure on top of the Erlang protocol. It's still there, but we're migrating from it.

One major thing that turned me off of the language for our particular project was that there was no way to have a large read-only data structure in RAM and sic a bunch of parallel threads to analyze or search it. It is hackable if you mash your data structure into a large byte binary, since large bins live on a shared heap, but it's a pain to deal with non-native representation for your data.

It's very obvious that Erlang is optimized for a particular usage model, and even when you're dealing with a number of functional parallel processes, it might still clash with what you're doing.

Re:Comparison of Erlang Runtime System and Java Virtual Mach... by vtuulos on Sunday June 28, 2015 @09:59PM (#9796057)
DiscoDB does exactly what you described: It memory maps a large read-only data structure in RAM. It has an Erlang binding based on NIFs.

http://discodb.readthedocs.org/en/latest/

https://github.com/discoproject/discodb

Re:Comparison of Erlang Runtime System and Java Virtual Mach... by white-flame on Monday June 29, 2015 @01:05AM (#9796511)
That's not the type of interface you'd want to build algorithms on which are constantly and deeply traversing data object links, if any type of performance is required.

Same thing as with ETS or SQL.

Implementing traversal-heavy algorithms across a large in-RAM data network does not require external tools, and is not helped either in performance or simplicity by decoupling direct pointer-based linkages into hash keys, and speaking to external interfaces. At least not for the work we were doing.

Re:Comparison of Erlang Runtime System and Java Virtual Mach... by sargun on Sunday June 28, 2015 @06:42PM (#9795405)
I mean, you could always keep your large data structure in ETS?
Re:Comparison of Erlang Runtime System and Java Virtual Mach... by areed on Sunday June 28, 2015 @09:14PM (#9795926)
Re:Comparison of Erlang Runtime System and Java Virtual Mach... by white-flame on Sunday June 28, 2015 @06:46PM (#9795422)
That's not very fast in comparison.
Re:Comparison of Erlang Runtime System and Java Virtual Mach... by rudiger on Sunday June 28, 2015 @08:52PM (#9795841)
If you need a multi-gigabyte, read-only, in-memory data structure with support for ad-hoc querying and concurrent reads... you probably should just use a SQL database.