A true client-server system, where you have written both ends of the application, is very powerful, but it is also quite involved to write. The client itself is fairly simple in principle. It is when you begin to write the server that things start to get involved. Handling multiple incoming sockets in one connection versus having many different processes and trying to coördinate between them, and many other things that you will discover. Maybe someone will be kind enough to point out a module that does this for you, or at the very least, makes it easier.

If you want a quick and dirty solution, which is where all good things start anyway (Perl included), then you might want to use a combination of CGI and LWP. Apache is a great "server", and is likely better than any one you could write yourself in a few months, although IIS would also do the job with a little configuration. Use LWP on the client end to perform the data transfer. LWP::Simple is trivial to use, and you can always "upgrade" to full LWP::UserAgent later.

Here's the basics. Write some CGI programs that provide data to the clients. These clients will check the server on a regular basis for new data. They will read their instructions, download any appropriate data via HTTP, and then report their findings using POST to a form on the server.

If you want to make a GUI, use TK. It's cross platform, and is a little wacky, but works well once you get a handle on it.

Now when I say "quick and dirty", what I mean is that you can get going very quickly using standard CPAN modules. This does not prevent you from improving the quality of your application over time, of course. Try hacking out something that works, and then if you want to write it again "properly", you will already have a good understanding of the application and can do a much better job than if you planned out the first one extensively and then built something that wasn't quite what you expected.

In reply to Re: Client-Server system by tadman
in thread Client-Server system by Boots111

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.