Saturday, February 4, 2012

Ho To: easy Java agent development

Widely spread practice to write java code in the agent. Some coll guys will say, you need to write in library and append library to the agent.

I want to show you a more clear scheme:
So you will be able to easy manage code of all agent in one place.

Mode explanation under cut

To realize our idea we will need our own AgentBase class. We will use this class as base for all our agent. This will allow us to write an simple code in each agent like:

Only class names of agent's will be different in different agents - that's all

Code of our agent

And the salt - ExtendedAgentBase
This scheme will allow you to run agent "emulation" form eclipse on any database you want


Dmytro Pastovenskyi said...

what it we would have 100 agents in 1 library? maybe it has sense to split library on few libraries with specified types: schedule agents, submit agents, some another kind of agets?

what do you think

Andriy Kuba said...

I think better to split it by different packages then.

The only one issue that could push to split it in to different libraries - performance, but I do not think it will change from number of classes in one library.