Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Handling multiple requests in a queue on FIFO based and process

by kschwab (Priest)
on Nov 21, 2013 at 16:33 UTC ( #1063753=note: print w/replies, xml ) Need Help??


in reply to Handling multiple requests in a queue on FIFO based and process

Anyone supplying an answer would be guessing...you haven't really provided much detail.
  • Are the clients that submitted the request waiting, on the same socket, for a reply? Or is it fire-and-forget?
  • Is the FIFO requirement literal, as in, request #2 blocks until request #1 is fully completed...even if it could be run in parallel? Even if the two requests came from different connected clients?
  • How large are the requests (bytes), and response (if there is one)?
  • As mentioned in another reply, are the clients on a local LAN or remote? Is cleartext okay? Do the clients need to authenticate?
  • Are the clients cell phones? web browsers? Something else?
  • Comment on Re: Handling multiple requests in a queue on FIFO based and process

Replies are listed 'Best First'.
Re^2: Handling multiple requests in a queue on FIFO based and process
by mvinayk (Initiate) on Nov 22, 2013 at 09:36 UTC

    Thanks for the reply.

    The clients are pc's and connected to the server pc through a network, the requests are submitted and it is fire-and-forget.

    The FIFO requirement is sequential, even if the two request came from different clients. request #2 blocks until request #1 is fully completed.

    The request size bytes is in below 1k and no need of response.

    The clients are in local LAN, no need to authenticate clients.

    The clients are pc,s connected to one server, all request handling will be done on the server side, in a First-in-first-out process.

      Gearman might work for you. There's a good overview here. It supports the idea of a background job which maps to "fire and forget". On the server side, to meet your FIFO requirement, you would have one worker for this specific task. . You would have to use Storable or similar to coax your hash into a scalar on the client side, and vice-versa on the worker side.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063753]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2018-07-21 23:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (450 votes). Check out past polls.

    Notices?