Developing a Concordia Agent is a fairly straightforward process. In many ways, it is no different than developing a non-mobile program. However, it is possible to partition the work that an agent accomplishes into smaller tasks, and then perform each task on the machine on the network where it can be most efficiently accomplished.
Consider the example of using an agent to query a remote database. In traditional client-server database programming, a client-side API would be used to remotely access the database. Potentially, every call into the client side API could result in network traffic since it might require some sort of communication with the database server.
In using an agent to access the database, we have an advantage over the client-server solution: the agent can actually travel to the machine where the database server resides and access the database locally. The agent can travel to the database server, query the database, and intelligently perform calculations and optimize the results. All of this work takes place on the database server and avoids the network overhead associated with the database client API. The agent can then travel back to the user and report the results.
It is important to note that the agent approach mentioned above will only be more efficient than the client-server approach if the network overhead needed to transport the agent from the user's machine to the database server is less than the overhead required to access the database remotely via its client side API. To transport an agent, Concordia's AgentManager must transport both the agent's data and its code. A few rules should be followed to gain the most advantage from the agent approach:
Next, we will adapt a non-mobile database access program and turn it into a Concordia Agent.