Network Architecture

From Virtual World Web Wiki
Jump to: navigation, search

The Virtual World Web (VWW) is a network of services that provide engaging virtual reality and virtual world services to end users. Some parts of the Virtual World Web are implemented and maintained by The Virtual World Web Inc. and others are built by Service Providers which are companies who want to build a property on the Virtual World Web.

To make this kind of development possible the VWW network architecture is divided into three conceptual layers to help with separation of concerns, define the boundaries of responsibility and code ownership and to make this massive project conceptually communicable.

Layer One

Layer One or the VWW Infrastructure, is the suite of system software built and maintained by The Virtual World Web Inc. that forms the operating system of the Virtual World Web. Logically, the software is split into four parts:

Root Services

Root Services is the "hub" of the Virtual World Web. It provides authentication, public key infrastructure (trust) root, and DNS-like service location. It has three components:

  • Root Web Service, a web service written in C#, based on WCF and hosted in IIS on the Windows operating system this service offers 3 endpoints:
    • Public - used for communication directly with clients for token authentication, account creation, password resets, etc.
    • OAuth- and OAuth token service.
    • NetworkCore - the main service through which Service Providers register themselves, communicate, authenticate users, route messages between other Service Providers, etc.
  • Root Web Site, also written in C# and based on ASP.NET MVC, this website lets end users view and change their network account settings, enroll to set up their own service providers, manage published components, etc.
  • Root Admin Web Site, also written in C# and based on ASP.NET MVC, this website lets VWW admins manage root services configuration, approve service providers, manage language translation string tables, and other network maintenance tasks.

Service Providers

Service Providers are entities who provide service to end users (sometimes called World Operators). They could be companies, or individuals, or properties owned by The Virtual World Web Inc. Essentially they are "someone making something on the VWW". Practically this means using a suite of services and tools to build and host a virtual world that users can visit and engage with. In practice this means hosting four web services, which are all based on a Microsoft stack (Windows, IIS, SQL, ASP.NET MVC), although cloud hosting on Azure, AWS, or the VWW's private cloud are all options as well.

The following services make up the Service Provider network:

  • Service Provider, the service which connects and coordinates Instance Hosts, and handles communication between the service provider network and Root Services. The Service Provider service assigns running scene instances to Instance Hosts, and makes load balancing decisions (spreading load across hosts) to ensure good network health.
  • Instance Host, the service to which end users (clients) ultimately make a VWW protocol connection. The service provider network can host many of these to scale horizontally, supporting millions of connections if the physical/virtual infrastructure allows. Instance hosts host and simulate scenes, host living 3D documents (DOM) and run scripts and components to support the experience offered by a service provider.
  • Web View, a service that provides traditional web pages for each unit of addressable Worldspace in the virtual world hosted by a service provider. This makes it possible for a virtual world to be spidered by a search engine, linked to from social media, etc. The HTML content rendered by this service is entirely controlled by the Layer Two component system
  • Admin Web, a powerful administration tool built using modern web technologies (MVC, Bootstrap, etc.) and extensible via the Layer Two component system. This tool allows a service provider to configure and build their world.

Core Libraries

The Core Libraries (CoreLibs) are a set of C# assemblies used throughout the network and contain foundational code upon which the entire network is built.

  • VWW.CoreLibs.DOM contains the definitions of the Document Object Model node classes and supporting logic for streaming and applying updates to live shared views
  • VWW.CoreLibs.Network contains the logic for low level client communication protocols, packet handlers, security, etc.
  • VWW.CoreLibs.Resources contains the streaming resource server communication logic which enables highly optimized resource transfer for connected clients
  • VWW.CoreLibs.ScriptHost defines an interface to JSBridge which in turn is a C++/C# bridge to the Google V8 JavaScript engine.
  • ClientAPI is a wrapper around the above libraries along with many packet handlers and managers to help represent Layer One in a client environment. The Client API is the starting point for programming against the VWW back-end if you're implementing a client.

Client Applications

There are two main client applications offered by The Virtual World Web Inc.:

  • Curio our flagship reference 3D browser. Curio is meant to showcase the full capabilities of the Virtual World Web platform and enable users to visit a multitude of Service Provider worlds. Curio is based on the Unity 3D game engine and there are currently PC and Mac versions supporting VR headset devices, many input devices, Vivox voice communication, an embedded JavaScript UI programming environment, and more.
  • Curiosity is our "headless" client. It is the VWW equivalent of "View Source" on the web. With it you can connect to VWW service providers and inspect live DOM, build Object Types, view and manipulate Inventory and Containers, work with Scripts, and much more.

Both of these applications use the aforementioned Core Libraries to communicate with the VWW network. It is trivial use these same libraries to build other applications for load testing, mobile applications, debugging, or even rolling your own browser.

Layer Two

Layer Two or the Component layer extends the capabilities of the four server services running on a world operator's network. Through the Instance Host service these components can also extend the user interface exposed to connected Curio clients.

Components can be written by world operators or provided by The Virtual World Web Inc. The set of installed components define the user experience of a given virtual world (service provider).

Layer Two is much less generalized than Layer One. It focuses the abstract capabilities of the infrastructure to form units of end-user functionality, or "features".

Components expose user interface either through the Admin Web, for configuration and management, or through Curio by delivering UI scripts from the Instance Host and providing callback handlers to back those scripts on the server.

Components can also extend the Web View allowing them to serve ASP.NET MVC web pages and thereby expose web UI for users to interact with.

Layer Three

Layer Three is a conceptual layer. It represents the business you build on the software components in Layer One and Layer Two. The generalized system infrastructure of Layer One is focused into system features by the Components in Layer Two. The resulting virtual world system can be accessed by end users, but you'll probably need a website, billing systems (if you're charging for your service), a customer service presence, etc. These other things are outside the scope of our documentation, but they can integrate very tightly with your world via the various APIs provided, so that the user experience is seamless.