[Aglets-developer] Re: [Aglets-users] Using ManagerAgent -- Is messaging NOT a problem with curre
Status: Beta
Brought to you by:
cat4hire
From: Phani I. <pha...@ya...> - 2005-10-16 07:07:48
|
Hi Luca and ALL, So you are saying to use an agent (called Manager agent) just for maintaining taskids info. I guess this ManagerAgent should always be running on every system once the aglets Server (Thahithi) is running .Good technique. So in my application .. when the first aglet comes in to the aglets server , it sends a message ( passing the task id in message ) to the ManagerAgent asking whether the taskid it is sending is in the current TaskIDs list or not . The ManagerAgent checks for the in coming taskid with the taskids ( that are stored in an arrya or vector) and send a results back .While checking for the existing taskids ,if it is not present it will append the new taskid to the current taskIds list and send the result back as a message as "NO" and if the task id exists reply message is "YES" . If the taskid exists( i.e for reply YES) the agent will get disposed. Else( i.e for reply NO ) the agent starts its processing and when it is finished its processing it will send a messsage ( REMOVE <taskID> ) to ManagerAgent to remove the taskID from its list. Then the ManagerAgent removes its task ID. Let me know if there is any other efficient way for achieving this. But Looks like messaging is not working with the current version of aglets. I am seeing mails from "AnilKumar" in AgletsUser and Aglets Developer archive list that aglets local and Remote messaging is not working at all.Will there be a solution soon to fix those problems.If so i will go ahead and try implement my ManagerAgent using messaging. Thankd for your help .. Thanks Phani --- Luca Ferrari <cat...@us...> wrote: > Phani Indhra's cat, on 11/10/2005 6.47, walking on > the keyboard wrote: > > Once the first aglet comes in i create a file > with the name "TASKIDS.txt " , if it is not already > created.And write the task ID to it in a line and > proceed doing the work for the task . > > If "TASKIDS.txt " is already created i read each > line in the file and compare it with the taskdID of > the just arrived aglet. ( Note : Comparision is > for as there can be multiple disict TaskIDs in this > file at a time ) . If taskID does not exist proceed > further with work .If it exists , > > the aglet gets disposed(); > > > > This is a possible solution, but I suggest you to > use a manager agent on > each system. In other words, exploit an agent as > interface to the > running tasks, thus incoming agents asks for running > tasks to it and > communicate to it when tasks are finished. In this > way, you can keep the > table in memory or, in future release, can use other > storing systems > (DBMS) without requiring any changes to the task > agents. > > Hope this helps, > Luca > > -- > +-------------------------------+ > Luca Ferrari > cat...@us... > > The Aglets Project: > http://aglets.sourceforge.net > +-------------------------------+ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, > downloads, discussions, > and more. > http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Aglets-users mailing list > Agl...@li... > https://lists.sourceforge.net/lists/listinfo/aglets-users > __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ |