Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-13-2006
davidcr1983 davidcr1983 is offline
Registered User
 
Name: David Vallejo Fernández
Organization: Universidad de Castilla-La Mancha
Project: basic-fipa-multiagentsystem
 
Join Date: Jul 2005
Location: Ciudad Real (Spain)
Posts: 41
Callbacks in Glacier2

Hello!

I am developing a render grid under the architecture of a multi-agent system, in which main services are located through IceGrid and agents are in Internet. I use Glacier2 to allow agents to contact with the main services, and I use callbacks to permite main services to notify new works to agents.

When a service (Service A) notifies a new work to an agent, this agent gets the notification correctly, but it locks itself when it tries to get data from another service (Service B: different to the Service A, which notifies the work). This last action is performed when the callback is done by the ServiceA.

I enable the log, but it doesn't appear any conflict.

An important question is that agents are subscribed to the Service A previously, and this subscription consists in that an agent supplies a proxy to the callback object. This way, Service A can iterate through its list of agents and it can notify the new work. I am confused with this approach, and I don't know if it is a correct form of operate in such context.

I would like to use callbacks because agents will be behind a firewall and callbacks allow me to solve the problem which represents an hostile network environment.

Thank you very much,
David.
__________________
Full name: David Vallejo Fernández
University of Castilla-La Mancha (Spain)
ICE Project: basic-fipa-multiagentsystem
Reply With Quote
  #2 (permalink)  
Old 08-13-2006
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
What version of Ice are you using? What operating system? A diagram of the calling sequence and where the various services are located in the network particularly in respect to inside/outside of the firewall would be helpful.
Reply With Quote
  #3 (permalink)  
Old 08-14-2006
davidcr1983 davidcr1983 is offline
Registered User
 
Name: David Vallejo Fernández
Organization: Universidad de Castilla-La Mancha
Project: basic-fipa-multiagentsystem
 
Join Date: Jul 2005
Location: Ciudad Real (Spain)
Posts: 41
I use Debian Sid, Ice 3.1.0, and Python.

Currently, I am developing the system in my notebook, which is in a local area composed of three computers behind a firewall. Therefore, all the services and the agents are being executed in my notebook. I have forwarded the port 8000 to Glacier2, which is executed in my notebook (192.168.1.4).

This is the calling sequence:

1.- An agent starts up and execute the operation 'subscribe' of the service A:

interface Master {
....
void subscribe(string agentName, RenderAgent* agent);
....
};

2.- The service A has a dictionary <agentName, prxAgent> and add the new entry.

3.- A new work is notified to the service A. Then, the service A notifies the new work to its subscribed agents:

interface RenderAgent {
....
void notifyNewWork(TZones zones, int idWork, int benchmarkValue);
....
};

4.- An agent tries to get data from the service B. It uses the registry of the IceGrid service to resolve indirect proxies. This is the interface of the service B:

interface ModelRepository {
....
nonmutating string get(int idModel, out ByteSeq model);
....
};

5.- The agent locks in this step.

This is the glacier2router config file:

Glacier2.Client.Endpoints=tcp -h 192.168.1.4 -p 8000
Glacier2.Client.PublishedEndpoints=tcp -h ladorada.dyndns.org -p 8000
Glacier2.Server.Endpoints=tcp -h 192.168.1.4
Glacier2.CryptPasswords=config/passwords.cfg
Ice.Default.Locator=IceGrid/Locator:tcp -h 127.0.0.1 -p 10000

#Other properties
Ice.Trace.Network=2
Ice.MessageSizeMax=20480

And this is the agent config file:

Ice.Default.Router=Glacier2/router:tcp -h ladorada.dyndns.org -p 8000
MyAdapter.Router=Glacier2/router:tcp -h ladorada.dyndns.org -p 8000

Ice.ACM.Client=0
Ice.MonitorConnections=60
Ice.RetryIntervals=-1
Ice.Trace.Network=2
Ice.MessageSizeMax = 20480
Ice.Warn.Connections=1

Thank you,
David.
__________________
Full name: David Vallejo Fernández
University of Castilla-La Mancha (Spain)
ICE Project: basic-fipa-multiagentsystem
Reply With Quote
  #4 (permalink)  
Old 08-14-2006
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
I suspect you need to increase the size of the client side thread pool in the agent. Try setting:

Ice.ThreadPool.Client.Size=<some value more than 1>

You can read more about this in the Ice manual in section 34.7.
Reply With Quote
  #5 (permalink)  
Old 08-14-2006
davidcr1983 davidcr1983 is offline
Registered User
 
Name: David Vallejo Fernández
Organization: Universidad de Castilla-La Mancha
Project: basic-fipa-multiagentsystem
 
Join Date: Jul 2005
Location: Ciudad Real (Spain)
Posts: 41
Your suspicions are well-founded.

Thank you,
David.
__________________
Full name: David Vallejo Fernández
University of Castilla-La Mancha (Spain)
ICE Project: basic-fipa-multiagentsystem
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glacier2+Callbacks KE5CRP Help Center 6 04-13-2005 07:55 PM
Ice timeouts, callbacks, and shutdown. rhochmuth Help Center 1 09-09-2004 11:50 AM
The use of context for callbacks catalin Help Center 1 08-29-2004 01:42 PM
Server To Client Callbacks kssreeram Help Center 14 10-15-2003 02:40 PM
Repeating callbacks Lance Help Center 3 08-12-2003 10:49 AM


All times are GMT -4. The time now is 12:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.