Hi all,
I'm writing my first real socket driven interprocess communication suite. In a nutshell, this will be used to do something similar to what AUTO_INCREMENT columns do in mysql, but for a variety of reasons, i need something a bit different. This is actually an upgrade to a system that uses AUTO_INCREMENT for various values, but over the years i've identified a number of shortcomings of the existing system.

Basically, there will be one server process that listens for requests for information. A base request will supply about 10 values, passed all at once and expect about 20 values returned all at once. Then the connection will be ended.

I was thinking of using XML::Simple to format data passed between the server and clients. I dont want a lot of overhead, but i cant just use positional params or something like that because not all requests will provide exactly the same amount of info, or return the same amount of info. So if i keep the tag names short, i dont think i'll incur too much overhead.

The server cannot be forking, because the result of one response will affect subsequent responses, so the server will need to fulfill requests one at a time. And, most requests to the server will be coming from a different machine than the server is running on.

So i guess this boils down to 2 questions:
1) Does the overall plan seem reasonable?
2) Is XML::Simple a good way to go, or should i use something else for the communication syntax?


I use the most powerful debugger available: print!

In reply to Interprocess communication design by shemp

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.