What comes after Java and .Net? Agents.

by Paul Browne

Most systems until now have been centralised : A bit like the old Soviet Union, everything is centrally planned. The trouble is real-life isn't like that - it's a market economy with no central control. There's a story about a Russian Diplomat posted to New York in the 60's. On a visit to a bakery he asked - who decides how many loaves are baked in the city? The answer is no-one - each baker individually decides how many to bake based on how many he sold the day before. Somehow (almost) everybody gets fed.


Current OO systems are like the Russian's view: everything is centrally controlled. Agents are more like New-York (or Dublin) city today - a place full of people (agents) acting in their own self interest. Somehow everything works ok. Economists have a theory that backs this up ; in general a set of people acting in their own self interest gives the best solution at a global level. Or, if you prefer it's a bit like Ants. Individual Ants are stupid, but together they are clever enough to mark a trail to food and carry it back to the Anthill. It's called Emergent Behaviour - simple programs combining to give the answers to complex problems.


How does Web 2.0 give a push to Agents? Before, Systems were standalone , and everything planned in advance. With Web 2.0 everything is connected and too complex to manage by one person. We need to look at what works successfully in real life. Just as Market economies overcame the 'Command and control' of communism, so Agents will overcome the Command and control of Objects. It may not be perfect, but it will be (slightly) better.


Will agents replace Java and .Net ? A sign that 'the future is already here' is that when you read the list 'what makes an agent' , you may go 'but we're doing that now'. Java and .Net have been around for so long now that it's easy to forget the Object Orientated Programming (OOP) was once a radical new departure. It's also easy to forget that languages such as C++, Visual Basic 6 and Powerbuilder were once 'king of the hill' and commanded respect from your colleagues when you mentioned your latest project was using them.


So what are agents? Compared to Objects :



  • Agents act in their own self interest , they may decline a request if they think it makes them better off.Objects always respond to a request.

  • Agents have their own thread of control , 1 for each agent. Objects may have their own thread, but most objects don't. - Agents are pro-active, and seek to improve their lot , according to pre-defined goals.

  • Agents are 'Coarse Grained' that is, a system will probably have a few agents will a lot of normal , dependent , objects. It's similar to the way Enterprise Java Beans are used : not everything is an EJB , and there a still lots of Plain Old java Objects.

  • Objects are designed from the start to work together. Agents can be written by different people , perhaps with widely different goals in mind.


Just like C++ was a procedural language with object orientated 'bits' attached, Agents are currently implmented in languages like Java , with agent-y bits attached. Probably the most useful set of bits is Cougaar. Cougaar is an open source project with a live community at Cougaarforge and an Eclipse based IDE. Cougaar gives you the basic infrastructure for creating and managing agents.



Of course , there's nothing to stop you building your own agents. According to the above definition, most systems that have workflow tieing together entities making decisions according to their own business rules are not far off being agents. Especially when they have a scheduler (i.e. their own 'thread of control').


What do you think? Leave a comment below.



Paul also blogs on 'Technology in Plain English'

15 Comments

Reuven Lerner
2006-06-11 14:21:24
You're right in saying that agents are pretty handy tools for solving and understanding certain problems. My research group (the CCL, at Northwestern University) develops a programming language, NetLogo, which makes it extremely easy to build and modify agent-based simulations, or models, of many scientific, mathematical, and social phenomena. NetLogo comes with a large library of models in a wide variety of domains.


The software is free of charge, and is used by educators and researchers around the world. There are even provisions for user-authored extensions written in Java.


If you're interested in agent-based programming, I suggest giving NetLogo a look.

Tim O'Brien
2006-06-11 15:06:07
Agent technolgy has been kicked around for some time as the next big thing, the idea of autonomous, self-contained (possibly portable) - but I can't think of a realistic application that would really capture the concept. I think that most "agent" based applications are really just distributed computing applications where the components being distributed maintain some level of autonomy and communication with one another. But, I've never been able to get a firm definition for the term "agent-based computing".


The part I'm not 100% following is the dichotomy between Objects and Agents. It wold make more sense if the difference was between Server-side Logic and Autonomous Agents. The difference is clear though, agents are not in a request loop, they are not performing tasks driven by user requests, they are simply observing an environment and adapting to it. In terms of automated trading systems, this is nothing new - the financial industry has been using "agents" for some time now. We've all used notification schemes for the weather or for the markets, telling a service to notify you when the weather changes or when a stock reaches a certain level. These applications, and even Google's search appliance, could, in some sense of the word be considered an agent-based technology.


I worked for a company once that maintains a distributed network of "agents", and they even used the words "agent-based computing", but the end project didn't encompass the idea of a truly independent agent. Agent technology was simply another term for distributed, hierarchical, client-server networking. Anyway, the Cougaar stuff looks interesting, the community communication services take agent computing closer to an ideal situation, but I didn't see any support for portability.


Essentially, i'd like to see some sort of agent based technology where one could be a truly autonomous system, you'd design a piece of logic, you've give it what it needed to start working, and then it would be able to self-replicate across a network of nodes.


...take a look at the trend of these last two posts - both deal with a technology that involves Eclipse as an IDE. Interesting. thanks for writing this, I'm putting Cougar on my list of things to fiddle with.

Dave Tauzell
2006-06-11 20:40:41
This quote comes to mind:


"I'm sorry Dave, I'm afraid I can't do that"


Jeroen Wenting
2006-06-11 23:31:05
hmm, more deja vu...
Norbert Ehreke
2006-06-11 23:39:34
The idea does sound interesting and challenging. New ideas and concepts are always exciting. However, I am very doubtful, if this technology will really provide what it promises to deliver. Dave just put it right: With an agent based system it seems to be very hard to determine what the cause of failure is. I admit that I am by far not an expert with this technology, but I have the impression that it is not deterministic, similar to neural networks. Those did solve some problem, but the internal state of them was unknown. In the end, as far as I know, they do not play any role in enterprise computing.


It seems the main concern of mine is the question about deterministic behavior. I wonder what an agent based system will do in extraordinary circumstances. If we stick with the bakers of a city, what if the stock exchange of that city panics. Are the bakers affected? They should be, but how exactly? It's about controlling the system. I'd like to be able to transparently analyze a system figure out why it did what and what it'll do, as I let it run. Yes, that makes me a control freak. To me that is self preservation. If something ever goes wrong and people (boss, customer) want an answer why, they want it pronto. And I hate being yelled at.


I guess that I'd really start putting energy and time into a technology like this once I am convinced that it would help me doing things faster and more reliable compared to existing technologies. Sorry to say I am not convinced -- though I'd like to be.


Paul Browne
2006-06-12 02:00:09
Tim,


You're right that there is no *clear cut* difference between Agents and Objects (after all , most agents are implemented using Objects like Java).


The current situation is like OO for C++ programmers - the Agent semantics have been crafted onto an existing language . A lot of C++ programmers (I guess) did not use Objects until it final clicked how useful they could be. After that , they never looked back.


I think Agents are at a similar point. We're already at a similar point where we're doing a lot of 'Agenty' stuff, but we don't realise it.


In terms of commercial applications, thinking 'Emerging behaviour' - probably that are too hard to solve centrally , but simple when broken down into pieces. In that, some aspects of SETI or Grid computing could be said to be 'agent like'.


Norbert,


'Sorry to say I am not convinced -- though I'd like to be.' That is also my attitude to this: It is good to look at and evaluate, but never forget that a 'traditional' OO solution may still be more appropriate.


Paul

Graham Lea
2006-06-14 18:19:11
There are lots of systems that could be developed using agent technology, but I don't think they are a majority.


In my experience, the majority of new IT projects these days are still about storage and retrieval of data by humans, which is by definition reactive rather than proactive. I'd love to see agents become The Next Big Thing, but I don't see it happenning when the systems are just responding to user requests.

Simon
2006-06-14 22:30:42
To those talking about agents self-replicating across the network - the term 'viral computing' comes to mind. Such a powerful tool, but the potential for abuse is just about unlimited.
Paul Browne
2006-06-15 01:34:41
Simon,


You're right about the agent-virus thing - ironically , the best example of agents adapting in a hostile (to them) environment is Virus(es).


Graham,


Storage , search and retrieval is *big* problem. It's all to do with the scale of the data to manipulate. The other problem is the complexity of the data (e.g. multiple data sources , distributed over the web). In this case a Agent approach *may* help. After all , what are Google's spiders but a simple form of Agent?


Paul , Technology in Plain English

John McClean
2006-06-15 05:30:15
If the semantic web takes off, and it probably will _eventually_ in some guise, I think agent computing will be hugely important. There's a lot of research being done on the automatic classification of data, and when the amount of data that is easily machine readable increases the demand for agent technology will rocket.
I'd also suggest brushing up on the old 3D graphics skills - with technologies like Google Earth and Croquet - I think the writing's on the wall that that is the way UI is heading.
M. David Peterson
2006-06-15 16:42:51
I've been designing and building an agent-based language and architecture now for just over two years.


At a System-based level,

http://dev.extensibleforge.net/wiki/nuXle.us


This matches up with the language side of things via my AtomicXML project. If you access the source via the "Browse Source" link on the toolbar at the above link you can access


trunk/AtomicXml/conceptual_view


for a folder hierarchy view of the internals of what this Atom-based (yes, the XML Syndication Format) language looks like from a conceptual language. If you access,


trunk/Extf.Net/src/Extf.Net


you can access the current development stream that I am now building out the Agent-based processing library that uses Atom and APP do take this to the next level (conceptual > prototype)


and at present time,


trunk/Extf.Net/src/ASP.NET/src


what would normally be a default.aspx is instead a default.omx file which if you look inside you will see is just an Atom file that references other Atom files as well as any other type of non-Atom/non-XML resource file of your choosing.


So back to the Agents... Not sure about other Agent based systems, but one of the primary areas of my own focus has been to focus on a token-based security system (still in the research stage) which requires a signed token for every incoming request in which follows this request through the entire internal process, and back out again via the response stream. With each request the agent adds to each validated request an XML map file which is what defines where it goes and how it gets there. (think XML falling through the templates of an XSLT file, where the XML defines the path, the XSLT just processes the data when the processing engine determines the best match)


The token is used by the system to determine if the XML mapping file in the current request stream matches the proper signature. If at any point it doesn't not, the system rejects the entire request stream immediatelly.


One final point. By using Atom files as a way to define the resources that are contained inside of each agent-based ecosystem, ALL of the resources, yet ONLY the resources necessary for each agent to fulfill its intended purpose are allocated to each agent. The core underlying system itself is self contained, and does not allow access to any external process. When a system level file is requested, a copy of that file is given to the agent, so if, for example, the final process of an agent is to store a new file that has been created, it doesn't replace the old file, and instead becomes a new versioned instance of a given file. So if by chance something evil, awful, and horrible happens, and a file becomes corrupt, then two things can take place.


The system rejects the new version and reverts to the old.


Or it destroys itself if it can't.


Oh, and no agent can take actions outside of it own "nuxleus". It can make requests, but if those requests don't match the proper signature, then the requests are denied.


But with all of this said... I'm still only about 2/3rds the way through the final proof of concept code, so who knows if I'll ever get the damn thing to work :D ;)

John
2006-06-15 21:41:06
I have been under the impresion that this is what SOA is. How does the agent approach differ from SOA?
Sam Griffith Jr.
2006-06-18 23:33:53
What your describing is in a commercial framework created in the late 90's by Object Space. It is called Voyager and is still available. It runs anywhere Java does. It also supports more than agents and is a great building block for some very complex systems.


http://www.recursionsw.com/mobile_agents.htm

Stuart Clayman
2006-06-22 00:51:40
Definitely sounds like Object Space's Voyager. It's a great piece of software.
I build a distributed system with it in 1998, and it was great to use and so I can recommend it.
http://music-lyrics-61723a500.bigcitybucks.info/ music lyrics
2006-10-12 02:01:51
Hello


G'night