Quantcast

Where to place XMPP data - Environment or Agent?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Where to place XMPP data - Environment or Agent?

Vin Baines
Hi Everyone,

I'm looking to decouple my agents and the simulation side, replacing  
simulated local vehicles with an XMPP feed of position, speed etc,  
which could be real or simulated vehicle.

Initially I'd thought, extend the environment class with an XMPP  
send/receive which would handle getting it to/from the correct agents.  
As the 'environment' is being accessed through this XMPP connection,  
it seemed sensible, one connection in and out to get our feed of the  
environment.

But, now that I've started implementing this, I wondered if it makes  
more sense to have a customised agent class instead, so each agent  
will have its own XMPP connection. This seems neater in someways, but  
I'm a bit worried about the additional overhead it would bring - thats  
alot of XMPP instances & connections to manage if the number of  
vehicles gets high.

Can anyone see a neater way of doing this? Or how its been done previously?

Thanks!

Vincent



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where to place XMPP data - Environment or Agent?

Rafael H Bordini-2
Hi Vincent,

I don't know of anyone else who used XMPP feeds. From the point of view
of Jason, these are clearly the 2 alternatives: centralised via
Environment or decentralised via agent architecture. Which will work
best for you will depend on the particular characteristics of XMPP, so
I'm afraid I can't help. I hope someone else in the list will be able to
help in this case.

Best,

Rafael Bordini


On 03/05/2012 18:36, Vin Baines wrote:

> Hi Everyone,
>
> I'm looking to decouple my agents and the simulation side, replacing
> simulated local vehicles with an XMPP feed of position, speed etc,
> which could be real or simulated vehicle.
>
> Initially I'd thought, extend the environment class with an XMPP
> send/receive which would handle getting it to/from the correct agents.
> As the 'environment' is being accessed through this XMPP connection,
> it seemed sensible, one connection in and out to get our feed of the
> environment.
>
> But, now that I've started implementing this, I wondered if it makes
> more sense to have a customised agent class instead, so each agent
> will have its own XMPP connection. This seems neater in someways, but
> I'm a bit worried about the additional overhead it would bring - thats
> alot of XMPP instances&  connections to manage if the number of
> vehicles gets high.
>
> Can anyone see a neater way of doing this? Or how its been done previously?
>
> Thanks!
>
> Vincent
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where to place XMPP data - Environment or Agent?

Vin Baines
Hi Rafael,

In the end, I went for decentralised via extension of AgArch class, as  
I think will work better in alot of ways.

However, I want to use the agents name as a (hopefully!) unique  
identifier for the XMPP communication, and I thought I could just used  
the getAgName() method in my extension, e.g. small example:

public class VehicleArch extends AgArch {
     public VehicleArch() {
       //setup all the XMPP threads, use Agent name to name  
publish/subscribe stuff
       System.out.println("started as agent " + getAgName());
       //start XMPP thread specific to agent name..
     }

But, I get:

[test1] starting test1
started customized agent arch and starting XMPP
....
started as agent no-named

So, inside the Jason agent, the .my_name(N); is giving the correct  
name, but getAgName() returns no-named?

Am I missing some initialization steps? I'm using Jade, and looking  
through documentation I can see there's some specifics for registering  
agents in Jade but I wasn't sure this was needed for something like  
this.. maybe I'm wrong?

Thanks!

Vincent

Quoting Rafael H Bordini <[hidden email]>:

> Hi Vincent,
>
> I don't know of anyone else who used XMPP feeds. From the point of view
> of Jason, these are clearly the 2 alternatives: centralised via
> Environment or decentralised via agent architecture. Which will work
> best for you will depend on the particular characteristics of XMPP, so
> I'm afraid I can't help. I hope someone else in the list will be able to
> help in this case.
>
> Best,
>
> Rafael Bordini
>
>
> On 03/05/2012 18:36, Vin Baines wrote:
>> Hi Everyone,
>>
>> I'm looking to decouple my agents and the simulation side, replacing
>> simulated local vehicles with an XMPP feed of position, speed etc,
>> which could be real or simulated vehicle.
>>
>> Initially I'd thought, extend the environment class with an XMPP
>> send/receive which would handle getting it to/from the correct agents.
>> As the 'environment' is being accessed through this XMPP connection,
>> it seemed sensible, one connection in and out to get our feed of the
>> environment.
>>
>> But, now that I've started implementing this, I wondered if it makes
>> more sense to have a customised agent class instead, so each agent
>> will have its own XMPP connection. This seems neater in someways, but
>> I'm a bit worried about the additional overhead it would bring - thats
>> alot of XMPP instances&  connections to manage if the number of
>> vehicles gets high.
>>
>> Can anyone see a neater way of doing this? Or how its been done previously?
>>
>> Thanks!
>>
>> Vincent
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Jason-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jason-users
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where to place XMPP data - Environment or Agent?

Jomi Hubner
Dear Vin,

in the class constructor the agent is not initialised yet. The easiest solution is to place your code in a init method:

@Override void init() {
.....
}

HTH,

Jomi


On 14/05/2012, at 16:23, Vin Baines wrote:

> Hi Rafael,
>
> In the end, I went for decentralised via extension of AgArch class, as  
> I think will work better in alot of ways.
>
> However, I want to use the agents name as a (hopefully!) unique  
> identifier for the XMPP communication, and I thought I could just used  
> the getAgName() method in my extension, e.g. small example:
>
> public class VehicleArch extends AgArch {
>   public VehicleArch() {
>     //setup all the XMPP threads, use Agent name to name  
> publish/subscribe stuff
>     System.out.println("started as agent " + getAgName());
>     //start XMPP thread specific to agent name..
>   }
>
> But, I get:
>
> [test1] starting test1
> started customized agent arch and starting XMPP
> ....
> started as agent no-named
>
> So, inside the Jason agent, the .my_name(N); is giving the correct  
> name, but getAgName() returns no-named?
>
> Am I missing some initialization steps? I'm using Jade, and looking  
> through documentation I can see there's some specifics for registering  
> agents in Jade but I wasn't sure this was needed for something like  
> this.. maybe I'm wrong?
>
> Thanks!
>
> Vincent
>
> Quoting Rafael H Bordini <[hidden email]>:
>
>> Hi Vincent,
>>
>> I don't know of anyone else who used XMPP feeds. From the point of view
>> of Jason, these are clearly the 2 alternatives: centralised via
>> Environment or decentralised via agent architecture. Which will work
>> best for you will depend on the particular characteristics of XMPP, so
>> I'm afraid I can't help. I hope someone else in the list will be able to
>> help in this case.
>>
>> Best,
>>
>> Rafael Bordini
>>
>>
>> On 03/05/2012 18:36, Vin Baines wrote:
>>> Hi Everyone,
>>>
>>> I'm looking to decouple my agents and the simulation side, replacing
>>> simulated local vehicles with an XMPP feed of position, speed etc,
>>> which could be real or simulated vehicle.
>>>
>>> Initially I'd thought, extend the environment class with an XMPP
>>> send/receive which would handle getting it to/from the correct agents.
>>> As the 'environment' is being accessed through this XMPP connection,
>>> it seemed sensible, one connection in and out to get our feed of the
>>> environment.
>>>
>>> But, now that I've started implementing this, I wondered if it makes
>>> more sense to have a customised agent class instead, so each agent
>>> will have its own XMPP connection. This seems neater in someways, but
>>> I'm a bit worried about the additional overhead it would bring - thats
>>> alot of XMPP instances&  connections to manage if the number of
>>> vehicles gets high.
>>>
>>> Can anyone see a neater way of doing this? Or how its been done previously?
>>>
>>> Thanks!
>>>
>>> Vincent
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Jason-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/jason-users
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Jason-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jason-users
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...