How to get configuration data to a large number of threads?

Heinrich Venter heinrich@REDACTED
Tue Oct 26 10:48:49 CEST 2004


Hello all

I need a bit of advice.  I have a transaction based system that spawns a
thread to handle every incoming transaction.  Unfortunately there is
quite a large chunk of relatively static configuration information that
is needed by every thread.
With relatively static I mean that it is changeable through user
intervention at any time.

The question is, how do I get this information to every thread without
signifficantly slowing things down or using up all the available memory?

I am not sure, but I suspect passing it as a parameter will cause
thousands of copies to be made.  Is this correct?
I was thinking of making a globally registered ets table, but this will
cause copies to be made again once it is read from the table.
The last option might be to declare all the information in a hrl file,
but then changing the configuration would require recompilation.
As I understand, using a binary formated chunk of data will prevent
copying, but when converting back to a more usable format the data will
be copied again.

Any other ways of getting large chunks of configuration data quickly to
a large number of transient threads?

Help and advice appreciated.

-]-[einrich Venter



Look 4 Help - Click here for more info
http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3733353731353a33303639373a2d323a313933

 
http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3733353731353a33303639373a2d323a313836
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041026/93871925/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MTk2LjMwLjc5LjE1NQ==
Type: image/gif
Size: 19652 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041026/93871925/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MTk2LjMwLjc5LjE1NQ==
Type: image/gif
Size: 556 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041026/93871925/attachment-0001.gif>


More information about the erlang-questions mailing list