Discussion:
[jade-develop] How to respond multiple requests in a long time request/response interaction?
Andre Cavalcante
2014-08-20 16:50:55 UTC
Permalink
Hi everyone,

I have a request/response interaction as fallow:

(A) -> (B)
A --- REQUEST --> B
A <-- AGREE --- B
long time processing (~5 seconds)
A <-- INFORM --- B

But while B is in a long time processing, B can receive other requests from
as other agents (C, D, etc.) as B agent, too.

For now, I have just one responder for this interaction, then, when other
request arrives in B, it is put in a queue and it is processed after the
current interaction finish.

I would wish respond REFUSE for all others REQUESTs from B and start new
RESPONDERs behaviours for other agents.

How can I do this? Some idea?

Thanks in advance.

--
André Cavalcante
Manaus, AM., Brazil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140820/b5edbafc/attachment.html>
Marius
2014-08-21 10:29:13 UTC
Permalink
Hello André,

Are you sending adhoc messages or using an interaction protocol?. If you are
using an interaction protocol, have a look at the Single Session versions of
those protocols. They allow the responders to be engaged in several
conversations at a time.

Regards,

Marius



--
View this message in context: http://jade.17737.x6.nabble.com/How-to-respond-multiple-requests-in-a-long-time-request-response-interaction-tp5002705p5002706.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
Andre Cavalcante
2014-08-21 15:32:04 UTC
Permalink
Hello Marius,

Thanks for your reply.
Post by Marius
Hello André,
Are you sending adhoc messages or using an interaction protocol?. If you are
using an interaction protocol, have a look at the Single Session versions of
those protocols. They allow the responders to be engaged in several
conversations at a time.
Regards,
Marius
I'm using AchieveREInitiator/AchieveREResponder pair, mainly.
Where are the SS version of this protocol?

Regards,

--
André Cavalcante
Manaus, AM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140821/e5db9a02/attachment.html>
Caire Giovanni
2014-08-24 09:16:09 UTC
Permalink
Hi,

SingleSession responders, in combination with a SSResponderDispatcher (i.e. a behavior that receives initiation messages and starts new SSResponders to manage them) are very useful to manage several protocol sessions in parallel. There is no dedicated SSResponder protocol for the REQUEST-RESPONSE interaction since there are no more messages to receive a part from the initiation one (the REQUEST which is received by the dispatcher) --> You can use whatever behavior to send back the AGREE, perform the task and send the INFORM.

From what you wrote however it seems to me that you don’t want to have several long time processing-s in parallel: you still want to enqueue and serialize them. The only exception is that if a REQUEST from B is received, this must be immediately “served” sending back a REFUSE.
If this is the case, a simple option is to add a behavior that just replies REFUSE to messages from B while the long time processing is ongoing and remove such behavior at the end of the long time processing.

NOTE: Remember that behavior scheduling is not preemptive --> the long time processing must be performed by a separated thread (not by the agent’s Thread) otherwise no other behavior can run while long time processing is ongoing.

Bye,

Giovanni

Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Andre Cavalcante
Inviato: giovedì 21 agosto 2014 17:32
A: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] How to respond multiple requests in a long time request/response interaction?

Hello Marius,

Thanks for your reply.

On Thu, Aug 21, 2014 at 6:29 AM, Marius <15490289 at sun.ac.za<mailto:15490289 at sun.ac.za>> wrote:
Hello André,

Are you sending adhoc messages or using an interaction protocol?. If you are
using an interaction protocol, have a look at the Single Session versions of
those protocols. They allow the responders to be engaged in several
conversations at a time.

Regards,

Marius

I'm using AchieveREInitiator/AchieveREResponder pair, mainly.
Where are the SS version of this protocol?
Regards,

--
André Cavalcante
Manaus, AM.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140824/02216749/attachment.html>
Loading...