Mixed Sync/Async communications pattern
- From: "dave.joubert@xxxxxxxxxxxxxx" <dave.joubert@xxxxxxxxxxxxxx>
- Date: Thu, 10 Apr 2008 09:12:48 -0700 (PDT)
I have a problem that I am sure someone has solved before, and I am
looking for a pointer
to example code or any reference to a standard solution.
Application A sends commands to B.
Some commands do not require a response from B, and some do, but I
know ahead of the time
which are which. Commands that require a response, should not return
to their caller in A,
because inevitably, the response is needed in the next line of code.
Application B sends responses back to A, but can also send async
events, as the user
interacts with B.
Async events from B can in turn cause one or more commands from A to
B, and B might
in turn fire off a sync reply, and one or more further async requests
as it executes A's commands.
This typically occurs when the user request an object to be created at
location X, and the
mouse is 'over' location X, and the object to be constructed fires off
'mouseOver' events,
which in turn.......
The combination of fileevent...readable and vwait varname cannot
handle the situation
100 % of the time
My thinking at the moment revolves around a FIFO queue of expected
responses, but
someone may already have solved the problem.
Any pointers ?
Dave
.
- Follow-Ups:
- Re: Mixed Sync/Async communications pattern
- From: Fredderic
- Re: Mixed Sync/Async communications pattern
- From: dave.joubert@xxxxxxxxxxxxxx
- Re: Mixed Sync/Async communications pattern
- Prev by Date: knock off Hermes Birkin Kelly replica handbags,replica hermes purses,hermes replica handbag
- Next by Date: Can my "send" and "expect" be in 2 different procs?
- Previous by thread: knock off Hermes Birkin Kelly replica handbags,replica hermes purses,hermes replica handbag
- Next by thread: Re: Mixed Sync/Async communications pattern
- Index(es):
Relevant Pages
|