Guides/Platform Development/Components/Object Host

From Sirikata Wiki
Revision as of 02:19, 26 May 2012 by Ewencp (talk | contribs) (Remove bogus reference to other page giving more detail.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Object Host

The object host handles simulation of objects and provides utilities or them to interact with the space, other objects, and the CDN. It is where object scripts (or behaviors) are loaded and run.

The object host has 3 main duties:

  • Object simulation, including running object scripts, performing any local physical simulation that may be necessary
  • Session management for objects, including communication for basic services such as location management, proximity queries, and message routing.
  • Expose utilities to objects. Examples might include persistent storage, higher level communication abstractions, timers, an inventory service, animation utilities, and so on.

In some sense, the choice of scripting language is just an extension of the first and third duties. Because we define a network protocol which the components use to communicate, the choice of scripting language is not fixed -- as long as the language can encode our messages (or connect to our library which can encode the core set of messages), it can work with the rest of the system. Scripts written in a convenient scripting language such as Python, Lua, or Ruby are just one way to extend objects. The object host may also provide other extensions (implemented as plugins) which provide other fixed functionality for objects via the same extension interface. Examples of these might be timers, an interface for web requests, or an inventory service.