Here's a doozy.

I have 50 or so custom-developed serial devices that I'm controlling via a multiport serial board. All of the devices need to be able to talk to one another, so data from one device needs to be able to be routed to any other (contention issues notwithstanding).

Here's my current problem: there needs to be a master "database" of the state information for all of the devices. I currently have one program running per serial port that does serial I/O and connects to a server, which fork()s a copy of itself off to deal with I/O to that client (note that this is not necessarily the way this must be done, just my current foray). The problem is that I can't think of a Very Fast Way for all of the devices to share a single "database" of data.

I've considered using System V Shared Memory, but have heard bad things about it. I have considered using a real database such as MySQL, but that would be horribly slow considering that each device is read and responded to in microseconds. Ideally I need some way to directly manipulate the same data structure via multiple processes, which I know sounds really stupid.

Any ideas?

Edit by tye


In reply to Shared data space by dynamopsychism

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.