If the problem is that having multiple recipients polling your system every second is resulting in too much load, you could turn the system upside down and make it a server push system instead, where each client's application just sits there listening on a port for a message to be forwarded. Your server could poll a client to see if they're reachable, and if so, push the message their way. If not, then store the message in the database until the user does log in. On your server side you'll have to operate a small daemon also that receives logins from the clients, and upon login, pushes any stored messages to the client. The same daemon could receive messages from logged-in clients.

I don't know a lot about intranet messaging systems. But it does seem to me that it would be a lot lower load on your server if it operated in a sort of push mode rather than in a mode where each client polls once per second. On the other hand, POP servers handle with grace and ease the fact that email clients (potentially thousands of them) are polling at user-defined intervals that could be very short. So maybe that's not such a bad arrangement after all. ;)

Do you have any code to show? How exactly is this question related to Perl?


Dave


In reply to Re: developing a intranet messenger system by davido
in thread developing a intranet messenger system by Anonymous Monk

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.