Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Open Simulator Technical Help
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OpenSimulator Internals/Code Map/Shared
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= OpenSimulator Internals/Code Map/Shared = == Overview == 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. ---- === Core Data Structures === OpenSim/Framework/ Contains the fundamental data types that flow between all parts of the system. Neither ROBUST nor the simulator can function without these. Key types: {| class="wikitable" ! Type !! Notes |- | AssetBase || Asset metadata and binary data -- passed between asset service and callers |- | GridRegion || Region descriptor -- returned by GridService queries, used by simulator and ROBUST |- | InventoryItemBase || Inventory item -- passed between inventory service and callers |- | InventoryFolderBase || Inventory folder |- | RegionInfo || Region configuration -- loaded from Regions.ini, used by simulator startup |- | UserAccount || User account data -- passed between UserAccountService and callers |- | UUID || OpenMetaverse UUID wrapper -- used everywhere as primary identifier |} Also contains utility classes used by both processes: {| class="wikitable" ! Class !! Notes |- | Util || General utilities: coordinate conversion, string helpers, Unix timestamps, UUID parsing |- | Constants || Grid constants: RegionSize, MaximumRegionSize, region coordinate limits |- | RegionFlags || Enum of region flag bitmask values -- used by GridService and simulators |- | AssetType || Enum of asset type numbers |- | AssetFlags || Enum of asset flag bitmask values |} ---- === Service Interfaces === OpenSim/Services/Interfaces/ 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's implementation. Key interfaces: {| class="wikitable" ! Interface !! Notes |- | IAssetService || Get, Store, Delete, AssetsExist, GetData, GetMetadata |- | IGridService || RegisterRegion, DeregisterRegion, GetRegionByUUID, GetNeighbours, etc. |- | IInventoryService || GetRootFolder, GetFolderItems, AddItem, DeleteItems, etc. |- | IUserAccountService || GetUserAccount, CreateUser, SetUserAccount |- | IPresenceService || LoginAgent, LogoutAgent, GetAgents |- | IAuthenticationService || Authenticate, Verify, SetPassword |- | IAvatarService || GetAvatar, SetAvatar |- | IFriendsService || GetFriends, StoreFriend, Delete |- | IGridUserService || LoggedIn, LoggedOut, SetHome, GetGridUserInfo |} 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. ---- === HTTP Server Infrastructure === OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs OpenSim/Framework/Servers/MainServer.cs Both ROBUST and OpenSim.exe run HTTP servers. Both use the same base classes. {| class="wikitable" ! Class !! Notes |- | 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. |- | 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. |- | BaseStreamHandler || Base class for all HTTP handlers that read/write streams |- | BaseRequestHandler || Base class for simpler request handlers |- | IOSHttpRequest / IOSHttpResponse || Request/response abstractions passed to all handlers |} ---- === Plugin Loading and Serialization === OpenSim/Server/Base/ServerUtils.cs Used by both processes to load plugins and serialize HTTP responses. Key methods: {| class="wikitable" ! Method !! Notes |- | LoadPlugin<T>() || Loads a class from a DLL by name using .NET reflection -- used by both ROBUST and simulator module loading |- | BuildXmlResponse() || Serializes a Dictionary<string,object> to XML -- used by all ROBUST service handlers |- | SerializeResult() || Serializes an object via XmlSerializer -- used by asset and grid handlers |- | ParseQueryString() || Parses POST body key-value pairs -- used by all ROBUST handlers that accept POST |} ---- === Database Abstraction Layer === OpenSim/Data/ OpenSim/Data/MySQL/ Both processes use the same database abstraction layer, but against different tables: {| class="wikitable" ! Interface !! Used by !! Tables |- | IRegionData || ROBUST (GridService) || regions |- | IAssetDataPlugin || ROBUST (AssetService) || assets |- | IInventoryDataPlugin || ROBUST (InventoryService) || inventoryfolders, inventoryitems |- | IUserAccountData || ROBUST (UserAccountService) || UserAccounts |- | IPresenceData || ROBUST (PresenceService) || Presence |- | ISimulationDataStore || OpenSim.exe (Scene) || prims, primshapes, terrain, land, estate_* |} 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. ---- == See Also == * [[OpenSimulator Internals/Code Map]] * [[OpenSimulator Internals/Code Map/ROBUST]] * [[OpenSimulator Internals/Code Map/OpenSim]] * [[OpenSimulator Internals/Connector Architecture]] * [[OpenSimulator Internals/Databases]]
Summary:
Please note that all contributions to Open Simulator Technical Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Open Simulator Technical Help:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
OpenSimulator Internals/Code Map/Shared
Add topic