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.
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 white-flame on Sunday June 28, 2015 @06:46PM
(#9795422)
That's not very fast in comparison.
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.