[zeromq-dev] Client Server Model in Python
Abhishek K
abhishek.kona at gmail.com
Wed Aug 25 06:52:54 CEST 2010
The model is Client sends some data to the Server, server does some
processing which might take a lot of time and return "DONE" to the client.
Now I want the server listening for other clients in the meanwhile it is
processing the first client
That is why I was going for the threads.
Any ideas how this can be done in a better way?
Abhishek Kona
Department of Computer Engineering
National Institute of Technology
Karnataka, India
On Tue, Aug 24, 2010 at 11:56 PM, Robert Kern <robert.kern at gmail.com> wrote:
> On 8/24/10 8:05 AM, Abhishek K wrote:
> > Hi
> >
> > I am new to ZeroMQ
> > I am using a Client Server Model in Python.
> > This is the basic outline of the server code.
> >
> > context=zmq.Context()
> > socket=context.socket(zmq.REP)
> > socket.bind('tcp://127.0.0.1:5555 <http://127.0.0.1:5555>')
> > while True:
> > message=socket.recv()
> > if message[:2]=="01":
> > ##logic1
> > if messafe[:2]=="02":
> > ## logic 2
> >
> > socket.send(response)
> >
> >
> > I have 2 questions,
> >
> > * I think the if the message processing logic takes lot of time, how
> can I
> > thread the process of processing the message (in Python)
>
> Why do you think you need to do so?
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma
> that is made terrible by our own mad attempt to interpret it as though it
> had
> an underlying truth."
> -- Umberto Eco
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100825/b46469d3/attachment.htm>
More information about the zeromq-dev
mailing list