mud: terminology
Object
This is your basic thing. Usually, it's meant to represent a physical object or some discernible concept, but it doesn't have to. Unless the system's rules prevent it, an object can contain and be contained by other objects.
Agent
An agent is an object being controlled by an artificial intelligence. Most agents don't move, though it's common to have them in more than one room at a time. They can manipulate objects and move them through the system. As software, they can also make actions outside the system, such as writing to a database. Some agents perform vital functions of the system while some are meant to interact with avatars.
Avatar
When a user logs in, an object is created within the system meant to represent that user. This is called an avatar. The avatar may have artificial intelligence attached to it as well as being controlled by the user. The avatar may remain in the system when the user logs off.
Room
This is also an object, but it's called a room because the system allows other objects to be contained within it. That is, the room can share a "contains/is in" relationship with another object. It's best to keep to the metaphor for the sake of human users, but the system is not limited by it. For instance, avatars being contained within more than one room at the same time is no more confusing than being in more than one chat room at the same time.
Agent vs. Room
Keeping the system's structure and functionality separate makes maintenance and control a much simpler task. The way to do this is to keep rooms dumb (that is, forbid agents to function as rooms or act upon objects within them). The functions of the system are handled by agents who remain invisible to avatars. In this way, the system can be responsive to the user without them realizing that the avatar was the mechanism. Activating and deactivating the functions of a room is only a matter of adding or removing the resident agent. Changing the functions of a room can be done by replacing the agent with another. And a room that becomes a bottleneck can be alleviated by simply adding more agents (each with their own thread/distributed server).
Door
A door is a special type of room that connects two other rooms. If it helps to imagine the metaphor, think of a door way with space, like a revolving door, elevator, or double door security system (that banks and airplane cockpits have). While the metaphor is simple, some of the details get a bit complicated.
  • A door can be "shut" in two ways. It can refuse new objects or keep objects it already contains (or both).
  • Most doors only accept objects coming from a specific room. Others can be thought of as pools or collection points that connection two areas rather than two doors.
  • Doors should be built in such a way that they don't need to know where the object entering them has come from. It should only be concerned with where it's going next, so you should think of all doors as being one-way. For instance, a system where it makes sense for objects to pass back and forth between two rooms should not use the same door. Instead, it should be more like those in-only and out-only doors to the kitchen at some restaurants. That way, each door only has to validate the enterance to one room and it doesn't contain objects heading in different directions.
Doors vs. Rooms
It can be unclear what the exact difference is between a door and a room. As far as the system is concerned, there's no difference. It's all in how you build the system, but as a rule of thumb, a room is where "things happen" and a door is where "things are considered".

For instance, you may exit a room to its "exit door", which evaluates if it's truly valid to exit (perhaps it is, but database connectivity has not yet updated that fact, so the exit door is there to ensure that fact). From the exit door, it may enter a room that could be called an "entrance room", which just validates that it is truly valid to enter. If valid, then it enters the "actual" room.

In this example, every location was a room, but the rooms that were called doors were only concerned with where the object should go next.
Door Agent
Most doors contain a Door Agent. This agent is responsible for closing doors and moving the door's contents into the next room. It might be equiped with the ability to validate the objects. In this case, it might hold onto objects until they are valid or forward them on to places where invalid objects are handled. Door Agents are excellent candidates to take part in the logic of regulating the workflow. Simply by counting the objects within the door, a door agent can recognize a bottleneck.
Building
A building is a complete set of rooms that only lead to each other. Buildings represents a specific concept. For instance, one building may describe physical space while another describes mood. As such, objects can exist in multiple buildings at once, as long as the buildings describe different aspects of the object.
Factory
A factory is just a building meant to represent a process. Generally, it's full of agents or avatars stationed at specific rooms to process any object that enters that room. Sometimes the status of an object being processed by a factory can be partially determined by its location within that factory.