<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://osimdev.org/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenSimulator_Internals%2FCode_Map%2FShared</id>
	<title>OpenSimulator Internals/Code Map/Shared - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://osimdev.org/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenSimulator_Internals%2FCode_Map%2FShared"/>
	<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Code_Map/Shared&amp;action=history"/>
	<updated>2026-08-04T15:31:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Code_Map/Shared&amp;diff=44&amp;oldid=prev</id>
		<title>Jwbshaw: first</title>
		<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Code_Map/Shared&amp;diff=44&amp;oldid=prev"/>
		<updated>2026-06-28T10:13:37Z</updated>

		<summary type="html">&lt;p&gt;first&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= OpenSimulator Internals/Code Map/Shared =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Both ROBUST and OpenSim.exe are built from the same source tree and share the same DLL output. The code listed here is used by both processes -- not just one side calling the other.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Core Data Structures ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Framework/&lt;br /&gt;
&lt;br /&gt;
Contains the fundamental data types that flow between all parts of the system. Neither ROBUST nor the simulator can function without these.&lt;br /&gt;
&lt;br /&gt;
Key types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| AssetBase || Asset metadata and binary data -- passed between asset service and callers&lt;br /&gt;
|-&lt;br /&gt;
| GridRegion || Region descriptor -- returned by GridService queries, used by simulator and ROBUST&lt;br /&gt;
|-&lt;br /&gt;
| InventoryItemBase || Inventory item -- passed between inventory service and callers&lt;br /&gt;
|-&lt;br /&gt;
| InventoryFolderBase || Inventory folder&lt;br /&gt;
|-&lt;br /&gt;
| RegionInfo || Region configuration -- loaded from Regions.ini, used by simulator startup&lt;br /&gt;
|-&lt;br /&gt;
| UserAccount || User account data -- passed between UserAccountService and callers&lt;br /&gt;
|-&lt;br /&gt;
| UUID || OpenMetaverse UUID wrapper -- used everywhere as primary identifier&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also contains utility classes used by both processes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Class !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Util || General utilities: coordinate conversion, string helpers, Unix timestamps, UUID parsing&lt;br /&gt;
|-&lt;br /&gt;
| Constants || Grid constants: RegionSize, MaximumRegionSize, region coordinate limits&lt;br /&gt;
|-&lt;br /&gt;
| RegionFlags || Enum of region flag bitmask values -- used by GridService and simulators&lt;br /&gt;
|-&lt;br /&gt;
| AssetType || Enum of asset type numbers&lt;br /&gt;
|-&lt;br /&gt;
| AssetFlags || Enum of asset flag bitmask values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Service Interfaces ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Services/Interfaces/&lt;br /&gt;
&lt;br /&gt;
All service contracts are defined here as C# interfaces. Both ROBUST (which implements them) and the simulator (which calls them) depend on these interfaces. Neither side depends on the other&amp;#039;s implementation.&lt;br /&gt;
&lt;br /&gt;
Key interfaces:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Interface !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| IAssetService || Get, Store, Delete, AssetsExist, GetData, GetMetadata&lt;br /&gt;
|-&lt;br /&gt;
| IGridService || RegisterRegion, DeregisterRegion, GetRegionByUUID, GetNeighbours, etc.&lt;br /&gt;
|-&lt;br /&gt;
| IInventoryService || GetRootFolder, GetFolderItems, AddItem, DeleteItems, etc.&lt;br /&gt;
|-&lt;br /&gt;
| IUserAccountService || GetUserAccount, CreateUser, SetUserAccount&lt;br /&gt;
|-&lt;br /&gt;
| IPresenceService || LoginAgent, LogoutAgent, GetAgents&lt;br /&gt;
|-&lt;br /&gt;
| IAuthenticationService || Authenticate, Verify, SetPassword&lt;br /&gt;
|-&lt;br /&gt;
| IAvatarService || GetAvatar, SetAvatar&lt;br /&gt;
|-&lt;br /&gt;
| IFriendsService || GetFriends, StoreFriend, Delete&lt;br /&gt;
|-&lt;br /&gt;
| IGridUserService || LoggedIn, LoggedOut, SetHome, GetGridUserInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In standalone mode, the simulator holds a direct reference to the service implementation. In grid mode, it holds a reference to a remote connector that calls ROBUST over HTTP. The interface is identical either way.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== HTTP Server Infrastructure ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs&lt;br /&gt;
 OpenSim/Framework/Servers/MainServer.cs&lt;br /&gt;
&lt;br /&gt;
Both ROBUST and OpenSim.exe run HTTP servers. Both use the same base classes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Class !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| BaseHttpServer || HTTP listener -- both processes instantiate this. Also contains IndexPHPHandler (line 2276) -- handles GET /index.php requests on the login port. Dispatches on ?method= parameter. Registered by both ROBUST (ServerMain.cs) and the simulator (OpenSim/Region/Application/OpenSim.cs) -- in standalone mode the simulator is its own login server.&lt;br /&gt;
|-&lt;br /&gt;
| MainServer || Singleton registry of all running HTTP servers. GetHttpServer(port) creates a server on demand for a given port. MainServer.Instance is the primary server.&lt;br /&gt;
|-&lt;br /&gt;
| BaseStreamHandler || Base class for all HTTP handlers that read/write streams&lt;br /&gt;
|-&lt;br /&gt;
| BaseRequestHandler || Base class for simpler request handlers&lt;br /&gt;
|-&lt;br /&gt;
| IOSHttpRequest / IOSHttpResponse || Request/response abstractions passed to all handlers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Plugin Loading and Serialization ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Server/Base/ServerUtils.cs&lt;br /&gt;
&lt;br /&gt;
Used by both processes to load plugins and serialize HTTP responses.&lt;br /&gt;
&lt;br /&gt;
Key methods:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Method !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| LoadPlugin&amp;lt;T&amp;gt;() || Loads a class from a DLL by name using .NET reflection -- used by both ROBUST and simulator module loading&lt;br /&gt;
|-&lt;br /&gt;
| BuildXmlResponse() || Serializes a Dictionary&amp;lt;string,object&amp;gt; to XML -- used by all ROBUST service handlers&lt;br /&gt;
|-&lt;br /&gt;
| SerializeResult() || Serializes an object via XmlSerializer -- used by asset and grid handlers&lt;br /&gt;
|-&lt;br /&gt;
| ParseQueryString() || Parses POST body key-value pairs -- used by all ROBUST handlers that accept POST&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Database Abstraction Layer ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Data/&lt;br /&gt;
 OpenSim/Data/MySQL/&lt;br /&gt;
&lt;br /&gt;
Both processes use the same database abstraction layer, but against different tables:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Interface !! Used by !! Tables&lt;br /&gt;
|-&lt;br /&gt;
| IRegionData || ROBUST (GridService) || regions&lt;br /&gt;
|-&lt;br /&gt;
| IAssetDataPlugin || ROBUST (AssetService) || assets&lt;br /&gt;
|-&lt;br /&gt;
| IInventoryDataPlugin || ROBUST (InventoryService) || inventoryfolders, inventoryitems&lt;br /&gt;
|-&lt;br /&gt;
| IUserAccountData || ROBUST (UserAccountService) || UserAccounts&lt;br /&gt;
|-&lt;br /&gt;
| IPresenceData || ROBUST (PresenceService) || Presence&lt;br /&gt;
|-&lt;br /&gt;
| ISimulationDataStore || OpenSim.exe (Scene) || prims, primshapes, terrain, land, estate_*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The MySQL implementations live in OpenSim/Data/MySQL/ and are loaded as plugins at runtime. Both processes use the same plugin loading mechanism -- only the interface and connection string differ.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[OpenSimulator Internals/Code Map]]&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/ROBUST]]&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/OpenSim]]&lt;br /&gt;
* [[OpenSimulator Internals/Connector Architecture]]&lt;br /&gt;
* [[OpenSimulator Internals/Databases]]&lt;/div&gt;</summary>
		<author><name>Jwbshaw</name></author>
	</entry>
</feed>