[Circle-dev] An overview of Tangence

Paul LeoNerd Evans leonerd at leonerd.org.uk
Sun Mar 1 00:16:54 GMT 2009


On Fri, Feb 27, 2009 at 10:45:20PM -0500, Nordwolf wrote:
>> Methods on objects in the server may be invoked by clients. Once a
>> method is invoked by a client, the client must wait until it returns
>> before it can send any other request to the server.
>
> Is this enforced by the server not accepting another request from the  
> client until it has a returned a result for the first one? 

Oh, very much not. It's a highly useful behaviour - somewhat like an
HTTP client making multiple requests for all the images on a page. No
need to wait for the first image to arrive before asking for the rest.

> It seems like 
> there are times I might to do want to do something like spawn a task 
> that's going to take a long time for the server to process and run it in 
> a background thread, and then send other more immediate tasks in the 
> client while the server chews on the long task I gave it? The server 
> could then send an event to me to notify my background thread when it is 
> done with the long running task?

Ah, well that's a somewhat different idea. The low-level protocol itself
is entirely synchronous; you'll get the replies in the order you sent
the requests. Given it's supposed to be for interactive applications,
there shouldn't really be any requests that take an appreciably long
amount of time to process, which would require a reordering.

That said, if there really did need to be a "come back later", the
server could respond an "MSG_LATER" rather than MSG_OK/MSG_RESULT, and
give some sort of ID number to tag that request. Then, at some point
later, spontaneously announce the completion of that request. 

Or maybe the client would request in a way to say "do this sometime and
get back to me later". Not sure yet which side should take the decision
to make it async.

But, it would be best to avoid the need for it in the first place, I'd
suggest.

-- 
Paul "LeoNerd" Evans

leonerd at leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.leonerd.org.uk/pipermail/circle-dev/attachments/20090301/7bbf4370/attachment.pgp>


More information about the Circle-dev mailing list