Share

DIET Agents

File Release Notes and Changelog

Release Name: 0.97

Notes:
----------------------------------------------------------------------
  DIET Agents Platform, Version 0.97
----------------------------------------------------------------------


* INTRODUCTION

DIET Agents is a multi-agent platform in Java. A bottom-up design is
used to ensure that the platform is lightweight, scalable, robust,
adaptive and extensible. It is especially suitable for rapidly
developing peer-to-peer prototype applications and/or adaptive,
distributed applications that use bottom-up, nature-inspired
techniques.


* SYSTEM REQUIREMENTS

- A Java Runtime Environment, Java 1.4 or higher. 
  
  Note: The dependency on features introduced after Java 1.2 is quite
  minimal. Therefore, without too much effort it is possible to modify
  the source code so that it is compatible with Java 1.2, should this
  be necessary.

- Any Operating System supporting the above Java runtime environment.


* CONTENTS

The complete DIET Agents software distribution is contained in two zip
files:

  * diet-agents-0_97.zip 
 
      This is the main release file. It contains the DIET Agents
      source code, as well as the binary Java archive file.

  * diet-agents-api-0_97.zip

      This is an auxiliary file. It contains the DIET Agents API
      documentation. The documentation is not included in the main
      release file as it is relatively large and can be automatically
      generated from the source code using the "javadoc" tool. For
      your convenience, however, it is available for download as well.


Together, they contain the following files:

  README.txt    This file.
  COPYING.txt   Contains the licensing terms.
  CHANGES.txt   Contains a history of changes.

  diet-agents-0_97.jar
                Contains the compiled Java files.

  src/          Contains the Java source files.

  doc/          Contains the API documentation.


* LICENSE

The DIET Agents software has been released as Open Source under the
GNU General Public License. See COPYING.txt for details.


* RUNNING THE SAMPLE APPLICATIONS

You can start by running the sample applications. Make sure that the
classpath includes the "jar" file. Here is an example command line:

  java -classpath diet-agents-0_97.jar com.btexact.diet.app.sorting.SortingApp

This works if you have a Java Runtime Environment installed, the Java
interpreter is accessible as "java", it supports the "-classpath"
argument for setting the classpath, and you are in the directory that
contains the DIET Agents "jar" file. If you experience any problems,
try asking your local Java guru for help.


* THE WEB SITE

For more help about using the DIET Agents platform, please visit the
DIET Agents website at http://diet-agents.sourceforge.net. The website
includes additional resources, such as tutorials, FAQs and mailing
lists.


* CONTACT DETAILS

The DIET Agents platform has been developed within the Intelligent
Systems Lab and the Pervasive ICT Research Centre at BT. Please visit
the DIET Agents website at http://diet-agents.sourceforge.net for
details on how to contact us. If all else fails, try contacting the
members of the DIET Agents team at the following postal address:
Pervasive ICT Research Centre, BT, Adastral Park, Martlesham Heath,
Ipswich, IP5 3RE, England.
 


Changes: ====================================================================== DIET Agents Platform ====================================================================== ---------------------------------------------------------------------- Version 0.97, 14 Mar 2005 ---------------------------------------------------------------------- - core: Added AddressParser interface. - core.imp: BasicWorld provides #getAddressParser method to support parsing of addresses. The parsing methods that used to be in BasicWorldAddress have been removed. Compatibility alert: If you used the parsing methods in BasicWorldAddress, you should now use the parser provided by the BasicWorld class. E.g.: BasicWorldAddress.getEnvironmentAddress("04a4a-0bdbd@:4000/env1") -> BasicWorld.getParser().parseEnvironmentAddress("04a4a-0bdbd@:4000/env1") - core: Added AgentCreator interface. It is implemented by both Environment and EnvironmentImp. - app.shared: Added #createAgentCreatorWithRetry method to BasicApp. - arc.remote: Added ClientListener support to MasterMirrorJob. This can be used to track changes to its clients, so that for instance the mirror can terminate after it has served its purpose. - arc.remote: Added MirrorFactory interface and BasicMirrorFactory implementation. These can be used to let agents easily create Mirror agents when they require remote communication. - app.running: Updated to use mirror factories. - app.mirrorchat: Updated to use mirror factories. ---------------------------------------------------------------------- Version 0.96, 23 Dec 2004 ---------------------------------------------------------------------- Changes with respect to Version 0.95: - arc.jobs: Fixed bug in DatagramTransceiverJob. It incorrectly decoded some client IDs in UDP packets. - core.imp: Changed ThreadPool so that each executor has a unique name (useful for debugging). - core.imp.event: Added RunAdapter. - core.imp: Renamed WorldAddressImp to BasicWorldAddress. - core: Moved WorldImp, EnvironmentImp and EnvironmentNameClashException from core.imp package to core package. - core.imp: Entirely separated world, environment, agent and connection-end models from their implementations. As a result, listeners do not need a "cookie" at all anymore (which used to be necessary for access protection). Compatibility alert: Listeners now need to be added to the models directly, instead of to their core implementations. So instead using "world.addWorldListener(l)" to add listeners, you should now use "world.getModel().addWorldListener(l)". - core.model: New package for world, environment, agent and connection- end models. There is now also an abstract class for each of the models, which provides the event listening infrastructure (this can be useful for more advanced visualisation tools) Compatibility alert: If you are referring to these models in your code, you need to change the import statements accordingly. - core.model.event: New package for events generated by models. All the listener and event classes used to be in the core.imp.event package. Compatibility alert: If you have written your own listeners that observe core events, you need to change the import statements to importing the listener interfaces and events from this new package. - util: Added ToStringFormatter and BasicToStringFormatter helper classes, which are helpful for generating developer-friendly #toString output. - core.imp: BasicAgent now has a #toString that generates detailed output of the agent's state. Compatibility alert: If you have created your own agent classes, it is recommended that you override the #variablesToString method accordingly. - arc: Many classes including jobs, event managers and schedulers now implement a #toString method that generates detailed output. Compatibility alert: If you have created your own jobs or event managers, it is recommended that you override the #variablesToString method accordingly. - app.lookup: This application used to be app.job, but renamed it to LookupApp as this better reflects what it does (and it makes place for the new JobApp). Also improved functionality. Added different ways of generating requests (by default, all data items are now found more quickly). Added listener for dumping full agent #toString output once for each agent type. Extended the API documentation. Made various improvements to the jobs that are used. - arc.visit: Fixed silly bug in AbstractAgentVisitorGuide. It would throw a NullPointerException when there were no listeners. - diet.util: Moved the BufferWithRejection interface and classes that implement it from the diet.core.imp package to the general utilities packages. Also renamed the classes while doing so: BufferWithRejection -> Buffer ArrayBufferWithRejection -> ArrayBuffer LinkedBufferWithRejection -> LinkedBuffer Finally, renamed some of the methods to be similar to that of the java.util.Queue interface (for clarity). Compatibility alert: Most agents and jobs never directly accessed these buffers, but if they do, they should be updated accordingly. - diet.util: Added #canRejectElements method to Buffer. This is particularly useful for jobs that want to enforce that the agent should not reject any disconnection events. - diet.arc.remote: Changed MessageChannelProviderJob and MasterMirrorJob so that they require a disconnection buffer with infinite capacity. This makes the jobs simpler and more efficient. Removed the #missedDisconnections methods accordingly. - diet.core.imp: To reflect the changes to the buffers, the parameters that configure the buffer capacities in BasicAgent.Params have been renamed accordingly (to avoid confusion between #size and #getCapacity). Compatibility alert: If you changed these parameters from their default values, you have to update your code to reflect the new parameter names. - diet.arc.remote: Improved implementation of MessageChannelProviderJob and MessageChannelEventManager. This fixes a few minor bugs, which could occur under high load (when events could be rejected). - diet.arc.remote: Added the ability to limit the number of listening and active channels to MessageChannelProviderJob. See the #setMaxListeningChannels and #setMaxActiveChannels methods. - diet.arc: Added EventManagerContainer. This can be used to wrap multiple event managers as if they are one. It is useful for atomically adding and removing a group of event managers. - diet.arc: Added a #removeEventManager method to EventManagingAgent, Also changed implementation of #addEventManager so that adding and removing are symmetrical. Updated AgentGuts accordingly. Compatibility alert: If you previously added a chain of event managers with one call to #addEventManager, you should now wrap them in an EventManagerContainer first. - diet.arc.jobs: Added #start and #terminate to DatagramEventManager to enable graceful shutdown. Implemented #startUp and #closeDown DatagramTransceiverJob accordingly. - diet.util: Added IntegerGenerator interface, together with two implementations (ConstantIntegerGenerator and UniformRandomIntegerGenerator). For an example use, this diet.arc.jobs.AbstractDelayJob (and subclasses). - diet.arc.jobs: Added AbstractDelayJob, DelegatingDelayJob and TerminatingDelayJob. - diet.arc.jobs: Removed ScheduledRandomWalkJob, as it is not necessary anymore. Compatibility alert: If you used this, you should now use a normal RandomWalkJob wrapped inside a DelegatingDelayJob. - diet.arc: Added #isJobActive method to JobMonitor. All job managers in the ARC layer have been updated accordingly. Added #isActive method to job that uses this new functionality. Compatibility alert: If your classes implement this interface, you should now implement this method as well (see API for details). - diet.arc: ScheduleEvent now implements Comparable. - diet.arc.jobs: Improved implementation of jobs to properly obey startup/shutdown contract. I.e. on closedown each job now makes sure that any event managers it added are removed again, and also that all schedule events it scheduled are disabled. In particular, the following jobs have been updated: AlarmClockJob, ExternalControlJob, MessageOrderingJob and SchedulerJob. - diet.arc.jobs: Added RepeatJob and RepeatLimiterJob. - diet.app.job: New application to demonstrate basic jobs in the ARC layer. (The application that used to be JobApp has been renamed to LookupApp). - diet.core.imp: BasicWorld#getEnvironments now returns the environments in the order in which they were added (it used to be an arbitrary order). - diet.arc: Added different modes of execution to SerialJobManager: reset on start-up, loop on completion and single job execution. The new capabilities are demonstrated in the new JobApp. - core.imp.event: Changed SocketManagerListener. The "socketOpenFailed event has been split into two, to more clearly indicated why the socket could not be opened. The new "socketOpenRejected" event means that the world did not attempt to open the socket because it has reached its local socket limit. The "socketOpenFailed" event now means that it attempted to open the socket, but that this somehow failed. Compatibility alert: If you implement the SocketManagerListener interface, you need to update your code accordingly. - arc.listeners: Added SocketRejectionDumper. - arc.jobs.ResourceConstrainJob: Changed implementation so that it does not anymore switch in the charging environment itself. Instead it fires a property event with the account. - arc.util.resource: Added ResourceAccountCapture utility class, for grabbing the accounts of agents. - app.resource: Added EnvironmentSwitcher listener which switches in a charging environment for all agents that support an account. ---------------------------------------------------------------------- Version 0.95, 1 Nov 2004 ---------------------------------------------------------------------- Changes with respect to Version 0.94: - core.imp.net: Now using socket factories (which enables use of SSL sockets). - util.net: Added ConfigurableServerSocketFactory generic helper class. - app.shared: Added support for SSL sockets, using "--use-ssl-socket" commandline argument. See the online FAQ for some help about using SSL. - app.shared: Can now control for each monitor/listener if it outputs to stderr or to stdout, using new "--toggle-stdout" and "--toggle-stderr" options. - app.shared: Removed support for lock monitors (only useful for kernel developers, and even then rarely used). - app.shared: Added support for creation of UDP transceiver agents (under commandline control). - app.shared: Made it more suitable for subclassing. E.g. #createWorld now throws an exception, instead of calling System.exit on failure. Also split createAgents into several helper methods. Compatibility alert: #createWorld now throws an IOException, which must be declared or caught if you call this method directly. - arc: Fixed silly bug in ConnectionSharingConnectionManager (disconnection events were forwarded to handleConnection). - arc.jobs: DatagramEventManager now maintains the maximum size of packet it has sent as a property. This is useful to emperically establish what the maximum packet size should be in certain applications. - arc: ExternalControl#invokeLater now returns a boolean to indicate if agents has (obtained) a thread for handling the action. - core: Added ability to lock an agent. This makes it possible to stop a dormant agent from being awoken. See #lock, #unlock and #isLocked in AgentImp and BasicAgent. - core.imp: Changed serialisation of state in BasicAgent so that an agent can be serialised while it is still hosted. - core.imp: Made ConnectionEnd serialisable. However, after deserialisation the connection is always disabled so it is only useful for maintaining the address and the context associated with the connection. - core.imp: Added ability to queue tasks to ThreadPool. This way, if there are temporarily no threads are available, tasks can be executed as soon as threads become available. - core.imp: Changed BasicAgent so that it can now accept events even if it cannot be directly given a thread (as long as it will eventually get one). - app.shared: Added "max-queue-for-threads" commandline option to configure whether or not agents can be queued for threads. - arc.visit: Added new package providing support for "visiting" a collection of agents. This can be used to apply an action (e.g. backing up state) to a group of agents in a thread-safe manner. It supports various ways of visiting agents. Most importantly, agents can be visited synchronously or asynchronously. The accompagnying arc.visit.event package provides an event listener infrastructure. - util: Added ReadWriteAccess interface that can be used to manage concurrent reading/writing of data. Also provided LazyCopyOnWrite class as one specific implementation. - arc: Added ExternalControlCapture helper class. - app.persistentsorting: Added new application to demonstrate (one way) of using agent persistence. It extends the sorting application so that linker agents can be stored to file, either synchronously or asynchronously. - app.sorting: Improved Linker and Crawler behaviour to make it more robust. - core: Using customised serialisation (to make it slightly more lightweight) for the following classes: Tag, AgentIdentity, AgentAddress, EnvironmentAddress, WorldAddressImp. - core.imp: Bug fix. Changed serialisation of BasicAgent so that on deserialisation the event count of the external event portal is always zero. This prevents a simple DOS attack, but also avoids inconsistent state when new events arrive while the agent is being serialised. [compatibility alert]: It is now the responsibility of event handlers that use the external event portal to re-signal any events they have when they are deserialised. Event handlers should also never serialise a reference to the external event portal, as it is replaced on deserialisation. To uncover bugs, the ExternalEventPortal has therefore been changed so that it is not Serializable anymore. - arc: Updated BasicExternalControl so it resignal events when it is being deserialised (as is now required). Prevented serialisation of DatagramEventManager and MessageChannelEventManager as it is not clear if serialisation makes sense here and/or how it should be done. - arc.remote: Fixed bug in MasterMirrorJob. Before this, it could throw a ConcurrentModificationException in its #handleMessage. - arc.remote: Fixed bug in MasterMirrorJob. It now properly handles a disconnection initiated by the message channel provider (which is unlikely, but can happen when there are too many incoming packets). - arc.remote: Fixed bug in MessageChannelProviderJob that could lead to a ClassCastException in #disconnect. - core.imp.net: Fixed bug in SocketManager that could prevent sockets from being closed after they had been idle for too long. ---------------------------------------------------------------------- Version 0.94, 29 Jun 2004 ---------------------------------------------------------------------- Changes with respect to Version 0.93: - core.imp.net.SocketManager: Fixed a socket connection bug, so that an attempt to connect to an unreachable world times out after a specified period. Furthermore, sockets to other worlds can now be set-up while an attempt is in progess to set-up a socket to a world. - core.imp.net: Generalised SocketManager (and related classes) so that it is not specifically for agent migration between worlds anymore: - WorldAccessSocket has been removed, and its functionality has been taken over by the SocketManager. - Added DataPacket, DataPacketHandler and DataPacketHandlerException. - core.imp.WorldAddressImp: Changed to use InetSocketAddress (instead of internal "int" representation). - Changed output of socket related errors so that it is optional instead of always going to System.err: - core.imp.event: Added SocketErrorListener and corresponding Event. - core.imp.net: Updated SocketHandler and SocketManager to fire "error" events. - arc.listeners: Added SocketErrorEventDumper and Tracker. - app.shared: Updated TestApp to support dumping of socket-error events, and also dumping of all socket events. - arc.remote: Added messages channels as a method of remote communication. See MessageChannelProviderJob for details. - arc.remote: Created "Mirrors" as a method of remote communication. See MasterMirrorJob for details. - app.chat, app.channelchat, app.mirrorchat: Created chat demo applications. The "chat" application provides the basic chat functionality, but only allows local chatting. The other two applications extend the basic application to enable remote chatting (i.e. between users on different computers). One uses "Message Channels" for remote communication, the other uses "Mirror" agents. - arc.shared: Added support for creation of agents on startup, with a default number of creation attempt per agent, and a specified delay to wait on failure. - app.running: Created "running" sample application. It demonstrates the convenience of using Mirrors for remote communication, and allows experimenting with the automatic mirror connection liveness tests. - core.imp.BasicAgent: Added "set" convenience methods to Params member class. This for instance allows the following syntax: env.createAgent(MyAgent.PROTOTYPE, new MyAgent.Params().setFriendlyName("Harry")); Also added ability to reject incoming messages and/or connections on agent creation. - arc.jobs: Added new MigrateJob, providing agents with the ability to migrate (once) on start-up. - core.WorldAddress: Removed dumpWrite method from interface. It is not really useful in an interface, as the complimentary dumpRead cannot be provided. - core: Removed #dumpWrite and #dumpRead methods from AgentIdentity, AgentAddress, EnvironmentAddress and WorldAddress. These methods are now only in the Tag class, as it would be less efficient to achieve the same elsewhere. The reason that the methods have been removed from the other classes is that it unnecessarily contaminated the API, and that it never worked properly anyway, as many classes could not offer a #dumpRead method (as it depends on the particular WorldAddress that is used). [compatiblity alert]: If you were using these methods, you should now instead do the writing to and reading from streams directly, potentially by way of helper dumper objects. - arc: Added DaemonJobManager. - app.shared.BasicApp: Made initialisation methods more consistent. Renamed #addListeners() to #createMonitors(), and removed #addListeners(BasicAppArgumentParser). Renamed #setupWorld to #createWorld. Renamed #fillWorld to #createAgents, and changed method argument from BasicEnvironment[] to EnvironmentImp[]. [compatibility alert]: You will need to update your applications accordingly (simply rename the methods). The compiler will issue an error if you are still overriding or calling the old methods. - arc.shared: Added support for various event counters. Using the command line arguments, you can now count environment, agent and connection events. - core.imp: Fixed minor bug in BasicEnvironment to do with event generation. It could happen that an agent creation/arrived event was generated after an agent had already received a connection. - app.job: Improved implementation, in particular that of HandleDataNotificationJob and HandleDataRequestJob. These now better cope with disconnections, so that connections are always destroyed, even in the face of missed messages and/or disconnection events. connections. - core.imp: Made BufferWithRejection an interface. BasicAgent now uses LinkedBufferWithRejection, allowing buffers of "infinite" capacity. Note: It is strongly discouraged to use an unlimited capacity for the message and connection event buffers, except for debugging. Only for the disconnection event buffer does it for certain types of agent make sense to have an unlimited capacity. - arc: Fixed minor bug in SerialJobManager (so that it terminates when it should). - app.shared: Added ability to explicitly specify the internet address for the world (using the "--host" argument). This is useful on machines where the automatic detection of the host address fails (e.g. when it resolves to the loopback address). ---------------------------------------------------------------------- Version 0.93, 7 Jan 2004 ---------------------------------------------------------------------- Changes with respect to Version 0.92: - arc.jobs: Fixed bug in DatagramTransceiverJob, and added short-cut for sending "local" messages. - arc: Fixed silly bug ConnectionSharingJobManager. - Update package API comments (in package.html files) by replacing infohabitant by agent everywhere (to reflect changes introduced in Version 0.91). - core.imp: Minor change to reporting of "run crashed" events in BasicAgent so that it better copes with listeners that throw runtime exceptions. - core.imp: Added #isOwner method to ConnectionEnd. - core.imp: Changed WorldFactory and World so that all worlds generated by the factory use the same cookie (this can be useful for visualising two "remote" worlds in a single VM). - arc.listeners: Made output stream for event dumpers configurable (it used to always go to System.err which is still the default). - core.imp: Added new WorldModel, WorldImp, EnvironmentModel, EnvironmentImp, AgentModel, ConnectionEndModel interfaces. These are strictly for use by visualisation/debugging classes. These new interfaces make it, amongst others, easier to filter and to replay of events. - core.imp: Made AgentGuardian and ConnectionEnd package protected. This is possible now that the model interfaces are used. [compatiblity alert]: Any class that refers to AgentGuardian should now probably refer to it as "AgentModel" but occassionally as "Environment". Any class that refers to ConnectionEnd should now probably refer to it as "ConnectionEndModel" but occassionally as "Connection". - core.imp: Renamed World to BasicWorld as this is more consistent given the new model interfaces. [compatiblity alert]: Where you create a "World" directly you should now construct a "BasicWorld" instead. On the other hand, you are refering to an existing world, you can problably change the type of the reference to "WorldModel" or "WorldImp". - core.imp.event: Updated the event classes to refer to the new model interfaces. - core.imp.event: Cleaned up "AgentEvent" class. Some superfluous member variables have been removed (as they could be determined in other ways). [compatiblity alert]: Instead of getNearConnectionEnd() use getConnectionEnd(). Instead of getFarConnectionEnd() use getConnectionEnd().getOtherConnectionEnd(c). Instead of getInitiatingAgent() and getPassiveAgent() use didNearAgentInitiate() instead together with either getConnectionEnd().getAgent(c) or getConnectionEnd().getOtherConnectionEnd(c).getAgent(c). - core.imp.event: Cleaned up "ConnectionEndEvent" class. Some superfluous member variables have been removed (as they could be determined in other ways). [compatiblity alert]: Instead of getSender() and getReceiver() use the context in which the event was fired to get the sender/receiver. For "messageSent", "messageAccepted" and "messageRejected" events, the sender is getConnectionEnd().getAgent(c). For "messageReceived" events the sender is getConnectionEnd().getOtherConnectionEnd(c).getAgent(c). - core.imp.event: Removed toString support from events. This has now been moved to the event dumpers in arc.listeners. - core.imp: Added limit on number of agents to BasicEnvironment, and added corresponding AgentLimitReachedException. - app.shared: Added "--max-agents-per-env" argument to BasicApp to configure maximum number of agents per environment. - core: Made AgentIdentity "Comparable". - arc: Fixed bug in AbstractMultiJobManager and ParallelJobManager to prevent IndexOutOfBoundsException when last job removes itself. - arc: Added "InterdependentJobManager". - arc: Renamed JobManager to JobMonitor. - app.sorting: Fixed bug in Linker, which was introduced in Version 0.92. ---------------------------------------------------------------------- Version 0.92, 25 Sep 2003 ---------------------------------------------------------------------- Changes with respect to Version 0.91: - core.imp: Created WorldFactory (and corresponding event listeners). This can be used to attach visualisers and simular tools to the platform. There was no good way of doing this after World had been changed so that it was not a Singleton anymore. - app.sorting: Fixed bug in Linker, which could leave connections open when messages are rejected (due to system overload). - arc.services: Fixed Mirror implementation to reflect change in AgentIdentity. Since Version 0.91 the name tag and family tag must always be non-null. Whereas the old implementation of the Mirror sometimes used a null name tag. ---------------------------------------------------------------------- Version 0.91, 12 Sep 2003 ---------------------------------------------------------------------- Changes with respect to Version 0.90: - core.imp: Changed the order in which BasicInfohabitant handles external events in its #handleExternalEvent method. The order is now connection events first, then messages, and finally disconnection events. - arc: Changes to jobs and job managers so that a job's guts are unset when a job is removed. - arc: Added #getJobManager method to Job. - arc: Added ConnectionSharingJobManager, an advanced job that lets multiple jobs handle the same connection(s). - core.imp: Made TerminateRunException a Singleton (for efficiency). - core: Moved ConnectionDisabledException, InfohabitantIdentityClashException and InfohabitantNotFoundException from core package to core.imp package. [compatibility alert]: If you catch these exceptions (probably not, as typically you catch a more general base exception), you may need to update the import statements. - core.imp: ConnectionEnd#send now explicitely declares the specific exceptions it throws (instead of general ConnectionException). - arc.jobs: Added ScheduledRandomWalkJob. - Cleaned up code by removing all unused variables and import statements. - Changed all identifiers based on the term of "Infohabitant" to use "Agent" instead. Renamed classes: BasicInfohabitant -> BasicAgent EventManagingInfohabitant -> EventManagingAgent IndexedInfohabitantGuardian -> IndexedAgentGuardian InfohabitantAddress -> AgentAddress Infohabitant -> Connection InfohabitantCreationException -> AgentCreationException InfohabitantEvent -> AgentEvent InfohabitantEventCounter -> AgentEventCounter InfohabitantEventDumper -> AgentEventDumper InfohabitantEventTracker -> AgentEventTracker InfohabitantGuardian -> AgentGuardian InfohabitantGuts -> AgentGuts InfohabitantIdentity -> AgentIdentity InfohabitantIdentityClashException -> AgentIdentityClashException InfohabitantImp -> AgentImp InfohabitantInitialisationException -> AgentInitialisationException InfohabitantListener -> AgentListener InfohabitantLockMonitor -> AgentLockMonitor InfohabitantNotFoundException -> AgentNotFoundException InfohabitantRejectedDumper -> AgentRejectedDumper JobInfohabitant -> JobAgent Note: "Infohabitant" has been renamed to "Connection" instead of "Agent" or something similar, as "Connection" best describes what the class represents. Renamed methods: addInfohabitant -> addAgent addInfohabitantListener -> addAgentListener fireInfohabitantArrivalFailed -> fireAgentArrivalFailed fireInfohabitantArrived -> fireAgentArrived fireInfohabitantCreated -> fireAgentCreated fireInfohabitantCreationFailed -> fireAgentCreationFailed fireInfohabitantDeparted -> fireAgentDeparted fireInfohabitantDepartureFailed -> fireAgentDepartureFailed fireInfohabitantDestroyed -> fireAgentDestroyed getInfohabitantAddress -> getAgentAddress getInfohabitant -> getAgent getInfohabitantGuardian -> getAgentGuardian getInfohabitantIdentity -> getAgentIdentity getInfohabitantImp -> getAgentImp getInitiatingInfohabitant -> getInitiatingAgent getNumInfohabitantArrivalFailed -> getNumAgentArrivalFailed getNumInfohabitantArrived -> getNumAgentArrived getNumInfohabitantCreated -> getNumAgentCreated getNumInfohabitantCreationFailed -> getNumAgentCreationFailed getNumInfohabitantDeparted -> getNumAgentDeparted getNumInfohabitantDepartureFailed -> getNumAgentDepartureFailed getNumInfohabitantDestroyed -> getNumAgentDestroyed getPassiveInfohabitant -> getPassiveAgent infohabitantArrivalFailed -> agentArrivalFailed infohabitantArrived -> agentArrived infohabitantCreated -> agentCreated infohabitantCreationFailed -> agentCreationFailed infohabitantDeparted -> agentDeparted infohabitantDepartureFailed -> agentDepartureFailed infohabitantDestroyed -> agentDestroyed infohabitantIn -> agentIn infohabitantOut -> agentOut removeInfohabitantListener -> removeAgentListener removeInfohabitant -> removeAgent setInfohabitantGuardian -> setAgentGuardian setInfohabitantGuts -> setAgentGuts Renamed variables: All relevant member variables as well local variables have been renamed. E.g. "ihab" has been changed to "agent", "infohabitant" to "agent" as well, etc. Affected API and text: The API, text that is outputted, and commandline arguments have been updated as well. [compatibility alert]: Nearly all software built on top of the platform will be affected by these changes. However, there is a conversion script available to automatically upgrade code that uses Version 0.90 to use Version 0.91. ---------------------------------------------------------------------- Version 0.90, 5 Aug 2003 ---------------------------------------------------------------------- Changes with respect to Version 0.52: - Changed package root from "org.ist_uie.diet" to "com.btexact.diet" [compabitility alert]: Conversion script can be used to update old code. - Updated all file headers. They are now combined with class header, and not separate anymore. - core: Renamed CommunicationPacket to Message, and renamed its #getMessage method to #getText. Also, in core.imp, renamed Message to MessageEvent. [compabitility alert]: Conversion script can be used to update old code. - core: Renamed methods in Environment interface: #connectMeAsPeer changed to #connectMe, #migrateMeTo changed to #migrateMe. [compabitility alert]: Conversion script can be used to update old code. - core.imp: Changed World so that it is not a singleton anymore, but just a normal class. This allows multiple worlds per JVM. This is in particular useful when running multiple applets in a browser. - core: Removed the Context interface. Infohabitant#setContext now takes any Object. [compabitility alert]: Need to update old code accordingly, which mostly involved removing "implements Context" in class declaration. - core: Changed the #disconnect method in Infohabitant so that it does not throw an exception anymore, but returns a boolean flag instead. This avoids the need for double nest try statements. [compabitility alert]: Need to update old code yourself, but changes are straightforward. - arc: Renamed JobIhab to JobInfohabitant. [compabitility alert]: Conversion script can be used to update old code. - app.sorting: Removed use of SortingInfohab baseclass. - app.shared: Renamed DemoApp to BasicApp. [compabitility alert]: Conversion script can be used to update old code. - arc.util.directory: Removed this package. It was there to illustrate an idea (that you can use a Yellow pages approach in DIET), but not actually used in practise. - arc.util.bundle: Removed this package. It is still too much "work in progress" to be included in public release. - arc.services: Removed Handle. This method of remote communication has not been sufficiently used and tested. If we want to support it, it would need to be rewritten. - arc.services.middleman: Removed this package. Functionality to specialised to be in platform. - app: Removed the following outdated sample applications: "directory", "handle" and "multicast". ---------------------------------------------------------------------- Version 0.52, 3 Jul 2003 ---------------------------------------------------------------------- Changes with respect to Version 0.51: - Changed DatagramTransceiverJob so that local client ID is always in [1...65536] range. - util: Added Operator interface. - arc: Split MultiJobManager into interface (with the same name) and abstract implementation (AbstractMultiJobManager). - arc: Improved iteration in ParallelJobManager. It now iterates in ascending order, and implements strict checks to prevent concurrent modification. The implementation is fast and memory efficient, but therefore not as concise and easily re-usable. - arc: Updated ExternalControlJob so that it directly returns an external control (which, however, still cannot be fully used until the infohabitant has started up). Also changed BasicExternalControl and ExternalControlEventManager to enable this. ---------------------------------------------------------------------- Version 0.51, 26 March 2003 ---------------------------------------------------------------------- Changes with respect to Version 0.50-ext1: - core.imp: Added #fireAllProperties method to InfohabitantGuardian that takes a specific property listener as an argument. [compatibility alert]: It is recommended that property listeners always use this new method, instead of #fireAllProperties provided by BasicInfohabitant. - core.imp: Updated API to support concept of "persistent" and "volatile" properties. - arc: Fixed bug in BasicExternalControl. It prevented migrated infohabitants in zombies app from giving up their thread. - app.primes: Disabled output from infohabitants. Output can now be generated by way of a dedicated listener, the PrimeMasterDumper. - arc.jobs: Added DatagramEventManager, which can be used by infohabitants to manage their own datagram socket. Updated DatagramTranceiverJob to use this new event manager. - core.imp: Fixed loophole in InfohabitantGuardian which (in theory) could allow an infohabitant to own more that its allowed number of connections (by accessing it from multiple threads). - core.imp: Fixed security loophole in BasicInfohabitant (by using separate "guardian" member variable and new "ALIVE" state bit). This prevents the infohabitant from inserting its own proxy object. Doing so would allow thread-hijacking because the guardian's method are called from the "kernel" parts of the infohabitant. - core.imp: Removed EnvironmentImp interface. It is not needed anymore now BasicInfohabitant directly references its infohabitant guardian. - core: Removed #isHostingMe method from Environment, which had been deprecated for a while already. - core(.imp): Replaced Debug.assertTrue statements with more specific exceptions. Proper assertions now throw a RuntimeException. For some checks IllegalStateException and IllegalArgumentException are thrown instead. - core.imp: Removed empty "freeze" and "defrost" placeholder methods from BasicEnvironment. - core.imp: Updated NameClashException to include the name of the other environment that caused the name clash (as it is not necessarily the same as the name of the environment that was being added). - core(.imp): Renamed various exceptions to have more consistent names. In particular, IdentityClashException became InfohabitantIdentityClashException. TargetNotFoundException became InfohabitantNotFoundException. NameClashException became EnvironmentNameClashException. Also changed public exception member variables of to protected (and added accessor methods instead). [compatibility alert]: If you caught these specific exceptions, you need to update your code accordingly. - arc.jobs: Renamed DatagramTranceiverJob to DatagramTransceiverJob. [compatibility alert]: If you used this job, you need to update your code accordingly. - arc.services: Added DatagramTransceiver infohabitant (which simply uses DatagramTransceiverJob). - util.listeners: Moved entire package to "arc.listeners", because this is where they belong. The classes in "util" are stand-alone utilities not specific to DIET, whereas these listeners are really DIET ARC components. [compatibility alert]: If you are using these generic listeners, you need to change your import statements accordingly. - core.imp.net: Made version of serialisation protocol that is used configurable (to enable optional compatibility with Java 1.1). Updated DemoApp as well to support this. - core.imp.net: Added #signalAboutToSend method to SocketHandler to prevent socket from terminating just before an infohabitant is going to be sent across it. Also improved synchronisation of SocketHandler in general. ---------------------------------------------------------------------- Version 0.50-ext1, 28 January 2003 ---------------------------------------------------------------------- Changes with respect to Version 0.50: - core.imp: Added public #getThreadPool(Object cookie) to BasicEnvironment. (Not sure if we should keep this method, it may be gone again in a future release). - core.imp: Added #waitForExecutor to ThreadPool. - arc.util: Added ExecutorThread. - arc.jobs: Fixed DatagramTranceiverJob. Although it compiled, the first implementation did not actually run properly. - core: Fixed minor bugs in Tag (only occur when there are "unused bits"). - app.shared: Added output-level commandline argument. - app.sorting: Disabled output from infohabitants. It is now generated by dedicated listeners which can be disabled using the new output-level commandline argument. - core.imp.event: Added PropertyAdapter. - core: Added #awake method to InfohabitantImp interface. - arc: Added ExternalControl interface, and BasicExternalControl implementation. Updated ExternalControlEventManager to use the latter. - arc.jobs: Added ExternalControlJob, which enables external control over an infohabitant. - app.zombie: New sample application that demonstrates how infohabitants can be controlled externally (e.g. by way of a GUI). ---------------------------------------------------------------------- Version 0.50, 23 September 2002 ---------------------------------------------------------------------- Changes with respect to Version 0.41-ext1: - core: Changed the various dumpRead and dumpWrite methods to use DataInput and DataOutput instead of DataInputStream and DataOutputStream. - core.imp: Created EventPortal interface. As a result, the old EventPortal class has been renamed to ExternalEventPortal. - core.imp: Removed the BasicEventHandler and related event handling interfaces from the core. [compatibility alert]: If you used these interfaces (which you probably didn't anyway) rewrite your code accordingly. - core.imp: Made "external_events" in BasicInfohabitant private to prevent potential for thread hijacking. [compatibility alert]: Infohabitant that directly refer to this member variable, should now use getExternalEventPortal(). - core.imp: Better handling of events portal on migration in BasicInfohabitant. To do so, added #signalEventsDropped method to ExternalEventPortal, and let BufferWithRejection#clear() return the number of rejected elements. - core.imp: Changed serialisation of BasicInfohabitant so that the event portal is not stored, only the number of pending events. - arc: Added new class InfohabitantGuts that provides access to the interal parts of BasicInfohabitant (which are by default protected). Access includes the event portal, the environment, the buffers used for connections, messages and disconnections. Also allows provides access to the event manager. - arc: Updated Job to use new InfohabitantGuts. Its #setInfohabitantImp and #getInfohabitantImp methods have been replaced by #setInfohabitantGuts. [compatibility alert]: If you have written your own jobs, these need to be updated to use guts. - arc: Added #missedConnections, #missedMessages and #missedDisconnections methods to Job interface. Of these, missedDisconnections is the most useful, as it can be used to discard state associated with an infohabitant that has (maybe unexpectedly) disconnected. Updated JobIhab, ParallelJobManager and SerialJobManager accordingly. - arc: Merged EventPortal and EventHandler into EventManager interface. Event managers have been designed so that they can be cascaded, and each event manager is responsible for dealing with a specific type of event. Updated Guts and JobIhab accordingly. - arc: Added EventManagingInfohabitant. An intermediate Infohabitant between BasicInfohabitant and JobIhab. - arc: Added AbstractEventManager and BasicEventManager. These are both abstract classes. The first is useful for writing any event manager. The second is more specific, and is intended to be a base class for very simple event managers. - arc: Added SchedulerEventManager to provide scheduling functionality to infohabitants. This functionality used to be provided by SchedulePortal, which has now disappeared. [compatibility alert]: Infohabitants that used to use SchedulePortal should now use a SchedulerEventManager as a Scheduler. To do so, the infohabitant needs to subclass EventManagingInfohabitant, and use addEventManager to install the event manager (this will automatically handle the schedule events and external events, so there is no need to do so explicitely). - arc: Added ExternalControlEventManager, a pluggable event manager that allows other threads to specify actions to be executed by the infohabitant. - arc: Moved many packages and classes to different location: - arc.jobs: New package for reusable behaviours. - arc.util: New package, so far only containing subpackages with functionality for occasional use. - arc.util.resource: Used to be arc.services.resource. - arc.util.directory: Used to be arc.services.directory. - arc.services.middleman: Used to be arc.services.middleware. - arc.services.schedule: This old package has entirely disappeared. [compatibility alert]: You may need to change import statements accordingly. - arc.jobs: Added DatagramTranceiverJob, which offers service provider capabilities that can be used to send/receive UDP packets. - arc.jobs: Added AlarmClockJob, which can "wake up" infohabitants at a specified future time. Useful for infohabitants that want to use scheduling, yet want to be able to give up their thread. Added corresponding AlarmClock infohabitant in arc.services. - arc.jobs: Added MessageOrderingJob, which allows infohabitants to handle message according to a priority associated with each message. An early implementation of this class used to be in app.priority package. - arc.util.bundle: Created utility classes that support the sharing of data objects between infohabitants in the same environment. Subject to change. - arc.util.retry: Created basic utility classes for failure handling. Basic backoff strategies are included, recommended components for use with scheduling and job infrastructure. Expect further RetryActions and RetryStrategies in next release. Subject to change. - arc: Made ScheduleEvents Runnable. They are now always handled by running them. As a result, removed the ScheduleEventHandler interface. [compatibility alert]: Code that uses scheduling should be updated by adding a run method to all schedule events. This should make the code simpler, because schedule events do not need to be handled explicitely anymore. - arc: Improved Scheduler interface (is has now more methods for accessing the schedule events). - arc: Improved SchedulerJob to use AlarmClock instead of SchedulerIhab. - arc: Modified SchedulerEventManager to use SortedList for maintaining events (it should be more efficient now). - arc: Changed ParallelJobManager such that it now always copes properly when one or more of its child jobs finish. - arc.util.ressource: Renamed ResourceEnvironment to ChargingEnvironment. Renamed ResourceInfohabitantRegister to EnvironmentRentCollector. - arc.util.resource: Entirely re-engineered ChargingEnvironment and EnvironmentRentCollector to remove dependence on specific conserved resources and to eliminate requirement for EnvironmentListener approach to support resource constrained infohabitants. Resource constraints can now be plugged into JobIhab, by giving it a ResourceConstrainJob. Added EnvironmentPrices as a basis for pluggable charging policies for ResourceEnvironments. See package for current support. Subject to change. - util: Improved SortedList interface by adding #addFromFront and #addFromBack methods. These allow control over placement of objects that are equal (according to their order). - util.listeners: Added ThreadMonitor which can monitor thread use by infohabitants. - app.helloworldjob: Added job-based implementation of classic "hello world" application (see app.helloworld for a lower level implementation of the same application, which does not use jobs). - app.shared: Added support for monitor thread to demo app. Added support for running (periodic) actions. Added optional automatic termination of demo app after specified time. Added optional automatic creation of alarm clock service providers. - app.priority: Changed from non-job based implementation to completely use jobs. - app.*: Changed all applications to reflect updated job infrastructure, schedule infrastructure and other changes in the ARC layer. ---------------------------------------------------------------------- Version 0.41-ext1, 13 August 2002 ---------------------------------------------------------------------- Changes with respect to Version 0.41: - app.schedule: Changed ScheduleExampleIhab to subclass ConfigurableJobIhab to enable more flexible parameterisation. Further simplified ScheduleExampleIhab. Now does not implement Scheduler, but rather provides a getScheduler() convenience method. Modified direct descendants to match. - app.mirror, app.resource, app.schedule: Inserted getScheduler() call, since Scheduler is now pluggable in ScheduleExampleIhab. - util: Added SortedList interface and corresponding LinkedSortedList implemention. These maintain a list of objects, some of which can be "equal" or can have the same "order". For instance useful for ordering prioritised messages. - app.priority: Created sample application to demonstrate prioritised message handling. - arc.services.middleware: Added middleware functionality to facilitate services among users. The services provided by the middleware include: registering user information, searching information resources for users and organising users into communities of interests. - app.communities: Created "communities" application to demonstrate the technology of "self-organising communities" and demonstrate how DIET can be used in a simulated distributed information system. ---------------------------------------------------------------------- Version 0.41, 22 May 2002 ---------------------------------------------------------------------- Changes with respect to Version 0.40-ext1: - core: Fixed non-fatal bug in String construction of Tag. - core: Changed the local identifier of environment addresses from a string to an integer value. This has the advantage that every environment address can be represented in a fixed number of bytes. This is, amongst others, useful when it is used as part of fixed size UDP datagram packets. [compatibility alert] Only applications that directly refer to the environments local name are affected. However, most applications should not do so anyway, and it should be straightforward to update any affected code. Each environment still has a name associated with it (see the new BasicEnvironment#getFriendlyName() method) that is used to generate the integer identifier. You can still use the friendly name to specify neighbourhood links as well. - core: Added extra methods to facilitate navigation of the DIET hierarchy by debugging and visualisation tools. See: ConnectionEnd#getOtherConnectionEnd(Object), ConnectionEnd#getInfohabitantGuardian(Object), InfohabitantGuardian#getEnvironment(Object). - core.imp: Changed serialisation of BasicInfohabitant so that its buffers are not stored, only their size. - util.listeners: Added ConnectionEndEventCounter, InfohabitantEventCounter and EnvironmentEventCounter listeners. Useful for basic debugging. - core.imp.net: Removed bug in sockets that would cause distributed applications to run out of memory eventually (amongst others). - core.imp and core.imp.event: Added #infohabitantDepartureFailed method to EnvironmentListener interface. Updated BasicEnvironment to generate this event. [compatibility alert] Any listeners that implement the EnvironmentListener interface need to be updated. - util.listeners: Updated all listeners that were affected by the above change to the EnvironmentListener interface. - core.imp.net: Removed bug in sockets that could leave sockets that failed to be set up properly to linger. - arc.services: Updated CarrierJob so that it can wait for a reply. - arc: Changed Job Management infrastructure to increase flexibility. Further developments expected. - arc: Changed ConfigurableJobIhab to play nicer in releasing Thread. - arc: Changed SingleJobIhab to support invokeLater(...) call, allowing other threads to insert runnables to carry out operations in the infohabitant's thread (e.g. initiated by GUI control). - arc: Added RandomFactory for convenient generation of multiple distint random number generators. - arc: Added RandomWalkJob. - app: Changed System.out to System.err in multiple locations. Where possible, these console debugging outputs will be replaced by debugging listeners controlled by the command line in app.shared.DemoApp. - app: Changed demonstrators to reflect changes in Job infrastructure. - app.selfheal: Added code for management of self-healing peer network. This automates the management of DIET neighbourhoods through exchange of Peer addresses between DIET environments. At present this is a naively implemented but functional version. Future versions which are more easily parameterised can be expected. - app.helloworld: Created basic "hello world" application to demonstrate simplicity of composing DIET applications and encourage adoption of DIET as mobile process toolkit. ---------------------------------------------------------------------- Version 0.40-ext1, 15 Feb 2002 ---------------------------------------------------------------------- Changes with respect to Version 0.40: - core: Added "awake" method to BasicInfohabitant. - core: Removed synchronization of Environment methods in InfohabitantGuardian. - core and core.imp: Added ability to generate address objects from text strings. See WorldAddressImp#getEnvironmentAddress(String), WorldAddressImp#getInfohabitantAddress(String) and WorldAddressImp#WorldAddressImp(String). - util: Renamed Debug#assert methods to Debug#assertTrue. This is necessary because "assert" has become a reserved keyword in Java 1.4. To maintain compatibility with earlier Java versions, the new Java "assert" feature is not yet used, nice though it is. ---------------------------------------------------------------------- Version 0.40, 25 Jan 2002 ---------------------------------------------------------------------- Changes with respect to Version 0.30: - core: Fixed synchronization bug in InfohabitantGuardian. When two connected infohabitant's detach from their environments simultaneously there was the potential to get into an invalid state, resulting in an exception. This has been fixed. - core: Added "infohabitantCreationFailed" and "infohabitantArrivalFailed" methods to EnvironmentListener. [compatibility alert] If you have implemented EnvironmentListeners yourself, you may have to update them to incorporate the new methods. - core: Added "runResumeFailed" and "runCrashed" methods to RunListener. [compatibility alert] If you have implemented RunListeners yourself, you may have to update them to incorporate the new methods. - util.listeners: Added "InfohabitantRejectedDumper", "RunFailedDumper" and "RunCrashedDumper" for logging failure events. The first two listeners log events that are typically due to a lack of threads. They are therefore useful to analyse the system when it is (nearly) overloaded. The "RunCrashedDumper" dumps a message whenever an infohabitant terminated abnormally, i.e. because a runtime exception occured. As this is typically due to programming errors and you want to be aware of those, this dumper is enabled by default in DemoApp. However, when you are confident that your application is running fine, you can disable it to reduce the extra overload (at least a few bytes per infohabitant) it imposes on the system. - app.shared: Added support in DemoApp for the above additional event dumpers. - core: Used finer granularity of synchronisation in BasicEnvironment. - core: Reduced memory used by BasicInfohabitant by eliminating two member variables (threadpool and run_watcher). Also changed when run events are fired, which is now synchronized by "state_lock" (so that it the infohabitant's state can be checked to ensure that infohabitants do not cheat by spuriously firing events). - core: Fixed synchronization bug in BasicInfohabitant, which occured after the above change had been made. The "state_lock" was inadvertently initialised at the field declaration. Due to the prototype mechanism for creating infohabitants, this meant that multiple infohabitants could be using the same lock which could lead to dead-locks. - util.listeners: Added "InfohabitantLockMonitor" and "EnvironmentLockMonitor" for analysing multi-threading synchronisation. - util: Added "LockMonitor" and "LockMonitorObserver" for analysing multi-threading synchronisation. - core: Removed "RunWatcher", added "Executor" and "EnvironmentImp" interfaces. - core: Reduced memory used by BasicInfohabitant by eliminating two member variables (threadpool and run_watcher). Also changed when run-events are fired (now within state_lock). - core: Used finer granularity of synchronisation in BasicEnvironment. - core: Added "infohabitantCreationFailed" and "infohabitantArrivalFailed" methods to EnvironmentListener. [compatibility alert] If you have implemented your own EnvironmentListener, you may have to update them to incorporate the new methods. - core: Added "runFailed" method to RunListener. [compatibility alert] If you have implemented RunListeners yourself, you may have to update them to incoorporate the new method. - core: Fixed synchronization bug in InfohabitantGuardian. When two connected infohabitant's detach from their environments simultaneously there was the potential to get into an invalid state, resulting in an exception. This has been fixed. - arc: Added 'Job' infrastructure ; a foundation for plug and play Infohabitant behaviours. This helps to simplify the programming of behaviour a great deal, and promotes re-use. In this way, the implementation of common behaviours can be shared between multiple infohabitants without being restricted to subclassing. This is a provisional version of the Job infrastructure, and is likely to change over time in response to user comments. - arc: Modified Carrier to exploit Job infrastructure. - arc: Modified SchedulerIhab with Dynamic backoff algorithm to minimise contention when running large populations of infohabitants with Schedules. - arc.services.schedule : Added Scheduler interface and ScheduleEventServer object. Now possible to achieve plug and play scheduling either via SchedulePortal or via SchedulerJob (which handles interactions with external scheduler). ScheduleEventServer permits Jobs and other components to subscribe to ScheduleEvents where needed. - app.shared: Added support in DemoApp for lock monitors. Added control of max owned connections. - app.job: Added JobApp to demonstrate new Job and Scheduling functionality. - app.schedule: Modified ScheduleExampleIhab to demonstrate use of SchedulerJob, and improve performance. ---------------------------------------------------------------------- Version 0.30, 26 Jun 2001 ---------------------------------------------------------------------- Changes with respect to Version 0.20-ext1: - core.imp.event.net package: The platform now supports remote migration, i.e. infohabitants can now migrate to a different DIET worlds. A DIET world is in a different Java VM, and potentially, a different computer. The implementation uses sockets. See the API documentation with this package for details. [compatibility alert] If you have any infohabitants that migrate, you should make sure that they can be properly serialised. I.e. all objects that it should carry across to the destination VM should be serialisable. All member variables that cannot/should not be taken across should be marked "transient". Potentially extend BasicInfohabitant#startUp/closeDown or BasicInfohabitant#readObject/writeObject to perform additional preparation before and recovery after migration. - core: The address classes have changed slightly. The EnvironmentAddress empty interface has become a concrete class. Instead, there is now an empty WorldAddress interface. As a result core.imp.EnvironmentAddressImp has disappeared, but there is now a core.imp.WorldAddressImp class. Also fixed bug in InfohabitantAddress. It now has a proper "equals" and "hashCode" method. (sorry Harold!) - core: All core components that can potentially be carried by a migrating infohabitant are now Serializable. This excludes classes that are specific to a VM, such as the ConnectionEnd and InfohabitantGuardian proxies. As a result, infohabitants cannot take these with them when they migrate. They can, however, take infohabitant addresses and environments addresses with them. In a next release we will probably provide an ARC-layer component that makes it easier for infohabitants to maintain relevant connection history. - core.imp.BasicInfohabitant: Merged various boolean member variables a into single "state" byte. [compatibility alert] To (temporarily) reject any messages or connections you should now use respectively the #setAcceptMessages or #setAcceptConnections method. The "protected" boolean flags that used to control this have now disappeared. - core.imp.BasicInfohabitant: Removed potential deadlock (it could occur when it simultaneously tried to migrate while its connections where updated) core.RunWatcher: This new interface was added to avoid the above deadlock efficiently. The interface is not relevant to application developers. - core.imp.BasicInfohabitant: The #handleDisconnection, #handleDisconnection and #handleMessage methods now return a boolean flag to signal if the method processed the event. This makes it easier to extend the behaviour of an existing infohabitant. Changed the MessageHandler, ConnectionHandler and DisconnectionHandler interfaces accordingly. [compatibility alert] Infohabitants that override any of these methods should be modified to reflect these changes. This is very straightforward, see for instance the app.primes.PrimeChecker#handleMessage implementation. - core.imp.EventPortal: Returning from #waitForEvent without a timeout does not automatically decrease the number of pending events. This now needs to be done explicitely by calling #signalEventHandled when an event is retrieved from its buffer. It was taken for granted in the previous implementation that returning from the method would always be associated with the handling of an external event, and hence the event counter could be decremented. With the inclusion of internal events (such as scheduling), and other future developments, it is best that this counter is manipulated explicitly. [compatibility alert] Infohabitants that extend the #handleExternalEvent method need to be changed such that the external events portal is signalled when an event has been retrieved from its event buffer. See the implementation of BasicInfohabitant#handleExternalEvent for details. - core.imp.event.EnvironmentEvent: The event now contains the infohabitant's parent when it is used to signal infohabitant creation. - core.imp.event: Added listeners and events for remote communication events. See SocketHandlerEvent, SocketHandlerListenert, SocketManagerEvent and SocketManagerListener for details. - util.listeners: Added event dumpers and trackers for remote communication events. See SocketHandlerEventDumper, SocketHandlerEventTracker, SocketManagerEventDumper and SocketManagerEventTracker for details. These new dumpers can be activated by the demo application command line using "--show-events socket-handler" and "--show-events socket-manager". - app.shared: Extended command line control for the demo application. From the command line you can now also completely configure all the environments in the world, and how they are linked. Environments in different worlds may be connected in open-ended ways. The command line argument parser may be further extended to provide application-specific control. [compatibility alert] Many of the methods that were used to set up the worlds, the environments and their links have been changed. Much of the functionality can now be controlled from the command line. However, it is recommended that all applications by default create a suitable world (especially when the application require multiple environments). This should be done by overriding the DemoAppArgumentParser#setDefaultEnvironmentsAndLinks method. - arc.resource.ConservedResource: Security hole closed to prevent negative values of ConservedResource as a means of acquiring positive ConservedResources. - arc.resource: Added various classes that provide a basic resource accounting implementation. The ResourceEnvironment class is a surrogate environment which charges its infohabitant for environmental services. The ResourceIhab is an interface which should be implemented by infohabitants which can be charged for their use of environmental services. The ResourceInfohabitantRegister is a listener which controls registration and charging of ResourceIhabs in a given world. The UserIhab is an infohabitant with protected access to the creation of conserved resources which are accepted by the ResourceEnvironment. - arc.services.Mirror: Automatic mirror tidyup on destruction of client. Special command protocol introduced and 128 bit security for Carriers. Tested across multiple virtual machines - arc.services.ScheduleIhab: New scheduling functionality allows delegation of schedule to specialist SchedulerIhab, allowing thread to be released, and resources minimised for infohabitants which execute rarely. - arc.services.Handle: New infohabitant providing an alternative way for remote communication. The current implementation is an initial one. We plan to extend it significantly in upcoming releases. - arc.services.directory: New package that provides a basic directory for yellow-pages infohabitant look-up. - app.migrate: Extended application to run on multiple VMs. The behaviour of the Migrator infohabitant has been changed to better so that it tests the new functionality better. Also added extensive command line control. Added API documentation explaining how to run the application on multiple DIET worlds. - app.mirror: Added command line control. Users now subclass from ScheduleExampleIhab, allowing schedule delegation, and self-destruct to demonstrate Mirror tidyup. Tested with multiple virtual machines and serialisation. - app.resource: New application to demonstrate Resource Accounting implementation of DIET Core. Tested with multiple virtual machines and serialisation. - app.schedule: Now contains command line control. Demonstrates thread minimisation behaviour through reactivity and schedule delegation. Provides example ihab for subclassing. [compatibility alert] Infohabitants which previously subclassed from ScheduleExampleIhab will require some mods, in particular if they override #doRun, #update, #handleEvent, #handleExternalEvent or reference schedule_portal directly. - app.directory: New application demonstrating how the newly added ARC directory can be used. - app.handle: New application that uses the new Handle infohabitant for remote communications. - app.sorting: Minor modifications to reflect changes in core. - app.primes: Minor modifications to reflect changes in core. ---------------------------------------------------------------------- Version 0.20-ext1, 23 Apr 2001 ---------------------------------------------------------------------- Changes with respect to Version 0.20: - core.imp.BasicInfohabitant: Fixed synchronisation bug that sometimes caused a deadlock (only the MirrorApp sample application was affected by this bug) - arc.SchedulePortal: Removed superfluous debugging code. There was still an assert statement that checked if the sequence of events was in the right order, which reduced the performance of the scheduler, especially for large numbers of events. ---------------------------------------------------------------------- Version 0.20, 17 Apr 2001 ---------------------------------------------------------------------- Changes with respect to Version 0.15: - Added ARC "CarrierPigeon" service. Basic migrator with message, targeting individuals in remote environments, and delivering messages. Placeholder methods for experimentation with different failure handling strategies. - Added ARC "Mirror" service. This makes communication transparent to individuals in different environments, and is intended to be very easy to initiate. An infohabitant is created 'representing' each participant in the opposite participant's environment. Several different forms of targeting are available, (by family tag, by identity, limited numbers of clients). An infohabitant can mirror itself (as a means of creating a presence in a remote environment), or mirror another (as a means of interacting with them without migrating to their environment). The implementation of this class represents a classic use of the Context object. - Added ARC "Multicast" service. In addition to the glorified 'for loop' which is characteristic of multicast, convenience classes have been provided for shielding infohabitants from the complexities of handling multiple transactions. This is another demonstration of the use of contexts. - Added ARC scheduling functionality. The Scheduler allows an infohabitant to timetable events whilst still responding to incoming connection, message and disconnection notifications. A thread-efficient schedule delegation mechanism is currently under test for future releases. - Added ARC ConservedResource abstract baseclass. This class is intended to provide an uncheatable conserved resource. Access to the creation can be controlled for a given subclass. Once a ConservedResource object has been created, it may be separated into smaller parts, or recombined with another ConservedResource object of the same class but it is not possible to modify the total amount of the conserved resource, without the privileged access to creation. - Provided "shared.DemoApp" as a base class for DIET applications. All demo applications currently subclass from it. It allows you to configure certain properties from the commandline. Amongst others, you can control quite specifically which events are dumped to standard error output. Try invoking applications with a "--help" argument for full details on their options. - Added "PrimesApp" demo application. It demonstrates how to handle complex messages dependencies using a single thread. It is definitely useful to take a look at the source code for PrimeMaster. It's also good to experiment with various parameters. Use the command-line arguments to do so! - Added "MirrorApp" demo application. This demonstrates the use of the Mirror infohabitant as a means of communicating with remote infohabitants. The mirror infohabitant hides the details of the use of Carrier Pigeon infohabitants (another new utility in the core). The application shows a simple interaction between Service Users and Service Providers, who both use mirrors to try to find each other across three environments. - Added "ScheduleApp" demo application. This demonstrates the use of the SchedulePortal in a quality of service context. - Added "MulticastApp" demo application. The simplicity of using multicast in this implementation is best understood by looking at the code. Simple text output shows a single user initating a multicast, and handling the responses which come back. - Added various general utility classes to the "diet.util" package. Several are, for instance, used for handling command-line arguments. - Improved "SortingApp" and "MigrateApp" applications to handle command-line arguments and to support properties. Try running them with "--help" to see what all options are. You could for instance run the "MigrateApp" with respectively "--dont-share-threads" and "--share-threads" and observe the difference. - Added property support to infohabitants. Properties allow debug and visualisation tools to give you an idea what goes on inside infohabitants. A property has a name and can have any value. To support properties in your infohabitants you have to fire a property event whenever you change them. You should also implement the fireAllProperties method so that it is possible to determine the current values of all properties. See the various demo infohabitants (e.g. sorting.Trigger) for details. - Increased the types of event that are generated by the "RunListener". It, for instance, now also signals when infohabitants temporarily give up their thread, and subsequently resume execution. - Various improvements to BasicInfohabitant. Dormant infohabitants now also awake when they receive disconnection events. It does not maintain any listeners anymore (these have all been moved to its InfohabitantGuardian). Its internal state now better reflects the events generated by the run listener (see #isAwake() and #isHosted()). - Extended Environment interface to include various event firing methods. As opposed to the existing methods these are not methods corresponding to services provided by the environment, but methods that infohabitants use to implement their commitments to the environment. BasicInfohabitant already ensures that these are obeyed, so you should never need to invoke these methods when implementing your own infohabitant. - Added various additional "Tracker" and "EventDumper" listeners to "util.listeners". - Fixed some problems with line-breaks. - [compatibility alert] Renamed BasicInfohabitant#isRunning() to isAwake() - [compatibility alert] Added "cookie" arguments to some of the "removeListener" methods in InfohabitantGuardian. - [compatibility alert] Moved "run listener" support from BasicInfohabitant to InfohabitantGuardian. ---------------------------------------------------------------------- Version 0.15, 17 Jan 2001 ---------------------------------------------------------------------- Changes with respect to Version 0.14: - core.imp.BasicInfohabitant: Added notification of "disconnection" events. See #handleDisconnection and related methods. - core.imp.BasicInfohabitant: Added #handleExternalEvent method. - core.Tag: Added #getBit method. - core.Environment: [compatibility alert] Removed ability to connect to entirely arbitrary infohabitants. Suprising as it may seem, removing this method actually makes the platform more powerful. It means that you can completely limit the access to (the ability to connect to) an infohabitant to a specific group of infohabitants (typically only the one that created it, but possibly more). This can be used in various ways. - [compatibility alert] Added "cookie protection" mechanism to prevent infohabitants from using listener functionality. - core.imp.BasicEnvironment: [compatibility alert] Added "World" argument to constructor. - core.imp.BasicInfohabitant: Made event buffers private (for security reasons) - core.imp.ConnectionEnd: Removed connection near end/far end bug. - core.imp.BasicInfohabitant: Reset event portal and message/connection buffers after migration. ---------------------------------------------------------------------- Version 0.14, 17 Nov 2000 ---------------------------------------------------------------------- Changes with respect to Version 0.13: - [compatibility alert] Renamed "handleNewConnection" in BasicInfohabitant to "handleConnection" - [compatibility alert] Removed "Context" from "handleMessage" in BasicInfohabitant. The context can simply directly be retrieved from the sender. - Added #getMyAddress method to Environment, and corresponding #getAddress method to BasicInfohabitant. - Removed "Context" parameter from InfohabitantImp #receive method (and renamed #receive to #acceptMessage). - Added #setAcceptConnections(boolean) and #setAcceptMessages(boolean) to BasicInfohabitant. - Added get methods to InfohabitantAddress (note: the set methods have disappeared again, because it's better if objects of this class are immutable). - Removed "name clash" bug in BasicEnvironment. - Added string constructor for Tag. ---------------------------------------------------------------------- Version 0.13, 9 Nov 2000 ---------------------------------------------------------------------- Changes with respect to Version 0.11: - Implemented World listeners, Environment listeners, Infohabitant listeners, ConnectionEnd listeners and Neighbourhood listeners. - Provided basic "event dumper" implementations for all these listeners. These can be found in org.ist_uie.diet.util.debug and can be used for very basic debugging. - Updated SortingApp and MigrateApp. These now use the event dumpers for visualisation (and the old visualisation code has been removed from the infohabitant classes). - Infohabitants can now limit the number of connections they can simultaniously support. See InfohabitantImp#getMaxConnections - Changed BasicInfohabitant#handleMessage arguments. It now also uses CommunicationPacket. - Added Environment#isHostingMe method. - Renamed EnvironmentRegistry class to World. - Added InfohabitantImp#getFriendlyName. This provides a human-readable name that is useful for debugging. - BasicEnvironment now automatically registers itself with the world. ---------------------------------------------------------------------- Version 0.12, 6 Nov 2000 ---------------------------------------------------------------------- Changes with respect to Version 0.11: - Initial support for observers (see org.ist_uie.diet.core.imp.event) - [compabitility alert] Renamed "InfohabitantProxy" to "ConnectionEnd" - [compabitility alert] Renamed "EnvironmentProxy" to "InfohabitantGuardian" - The send and receive methods now use "CommunicationPacket"s. ---------------------------------------------------------------------- Version 0.11, 3 Nov 2000 ---------------------------------------------------------------------- Changes with respect to Version 0.10: - Added support for multiple environments (including neighbourhoods and migrating from one to another). - Added basic migration demo application. - A few minor differences, most of which I've mentioned yesterday. (eh?....) ---------------------------------------------------------------------- Version 0.10, 23 Oct 2000 ---------------------------------------------------------------------- Initial release containing: - core package: This defines core layer functionality. It provides all the basic functionality (managing infohabitants and their connections), but is not yet complete. It does not yet provide support for multiple environments, nor does it yet provide visualisation hooks. This will be added soon. - core.imp package: Basic implementation of core layer. It's worthwhile to check out the public classes. Do not bother with the other, non-public classes unless you really want to. These classes only embody specific implementation details and they are not used outside the kernel. - app.sorting package: Sample sorting application. The sample application has been used to test the core layer and demonstrates how to use the architecture. The output is still very boring and basic (eventually there will be some fancier visualisation), but do not let this put you off. The application is quite interesting. It is definitely worthwhile to understand what it is doing and how it does it, as it's very much bottom up and only uses very simple infohabitants to achieve some interesting behaviour (sorting). Read the API documentation for the "sorting" classes to find out more about the application and its three types of infohabitant. To get a feel of what the sample application does, it is useful to experiment with different parameter settings. This currently requires changing the static constants in BasicApp.java and compiling the file again. It may be interesting to change the output level to get an idea of how many messages are being sent (LIMITED_OUTPUT), or to even see all messages in detail (VERBOSE_OUTPUT). It is also interesting to decrease the amount that the Trigger infohabitants sleep, to cause the system to overload (infohabitants will then produce messages faster than they can handle it) without letting it actually break down. Other possibilities are: increasing the number of Linker infohabitants, reducing the timeout of the Crawler, etc.