avo has asked for the wisdom of the Perl Monks concerning the following question:
Good Evening Monks,
I've been playing arround with Tk for a while and I came up with a working prototype of a POS (Point of Sale) which I use for couple of months in couple of restaurants (http://butchersgrill.com/software/opentill.jpg)...
However - In my scenario my server is plain (no GUI) Perl application that is forking for each of my clients... Socket that listens for the connections from my POS clients... The problem that I have is that the comunication is only one way - which means that I don't have socket that listens on the Tk (client) side. So shorter - I do the following:
Client sends request to the server and gets reply from the server. I just want to add to this - "Server sends request to the client and client answers" ie... full duplex comunication. My problem is that Tk has got it's own event loop - so I can not have something like "while(1) ..." in the Tk program. I tried using POE with Filter::Reference and Socket Wheel on top of Tk... but it slows down my comunication speed dramticaly... For example my server response time jumped from 0.0001 seconds to 0.3 / 0.4 seconds - which is unaceptable for me. I tried everything - but it looks that I am not lucky. Can you please help me.
In two words - I need Tk application example for a program that acts as a client and a server in a non-blocking manner using either Fork or Threads, something that will run fine on Active State Perl. I can not afford using IO::Select because of the server multitasking required...
Thank you for your expertise.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Listening Socket in Tk
by Errto (Vicar) on May 08, 2005 at 00:07 UTC | |
Re: Listening Socket in Tk
by merlyn (Sage) on May 08, 2005 at 00:53 UTC | |
Re: Listening Socket in Tk
by zentara (Archbishop) on May 08, 2005 at 10:48 UTC | |
by avo (Pilgrim) on May 08, 2005 at 20:31 UTC | |
by perlhaq (Scribe) on May 09, 2005 at 02:30 UTC | |
Re: Listening Socket in Tk
by spurperl (Priest) on May 09, 2005 at 10:06 UTC | |
by avo (Pilgrim) on May 11, 2005 at 09:34 UTC |
Back to
Seekers of Perl Wisdom