[erlang-questions] Problems Writing a Scalable Shared Data Structure
Mon Jul 7 11:00:51 CEST 2008
Yes I am familiar with Amdahl's law. That said, it's not true that all
writes need to be serialized; it's a binary tree, and unless the
modifications happen to be to the same node, there's no reason why they need
to be serialized.
A database would solve the problem kinda; but that's like using a
steamroller to crack a nut. What I'm looking for a lightweight option that
could temporarily store data shared between threads, and would scale well as
the number of threads accessing/modifying this structure increases. I know
how to solve this problem in C (writing a concurrent binary search tree that
scales well), but since I'm new to Erlang I was unsuccessful trying to solve
this problem in Erlang.
On Mon, Jul 7, 2008 at 8:22 PM, Robert Raschke <rtrlists@REDACTED>
> Hi Fuad,
> a shared data structure is going to be the major limiting factor of
> your parallelisation. Are you aware of Amdahl's Law (e.g.,
> I must admit I have not read your code. But at least all the writes to
> your shared data structure have to be serial in order to ensure its
> integrity. So that is an immediate limiting factor. You cannot get
> faster than all the serialised writes to your structure.
> One of the easiest shared data structures you can use is a database.
> It'll handle all the horrible details of transactions for you. In
> Erlang, you can have a look at Mnesia for that.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions