20221001 Orbital 2022 M2 Examples - orbitalfoundation/wiki GitHub Wiki

Orbital Examples

Clock

A minimalist example that shows a clock

Console

Console that lets users order components to do work (such as ordering the view to make geometry on demand). This shows the general flexibility of the toolchain. Commands include:

  1. /help
  2. /list -> services by fully qualified path
  3. /send -> a message to a sevice -> and maybe that becomes the default
  4. /send abcd/asdf list -> tell that service to return a list of things
  5. list -> routes to last service
  6. { asdf } -> routes to last service
  7. goto objectname
  8. delete objectname
  9. undelete
  10. load { args } or just { args }
  11. goto gps?
  12. select * args?
  13. open/close terminal window -> it is an app?
  14. move avatar (keyboard keys or mobile buttons)

Simple Server

Orbital can run both on a client and on a server. In this example Orbital runs as a server which can serve an http client.

Run 'node sys/apps/server/server.js' on a unix command line and then visit the site at the url that should be printed to the console such as http://localhost:8080.

The server side of this example shows several core concepts:

  1. Orbital bootstraps itself by running a 'pool manager' service by hand that acts as a thread-runner / micro-kernel. This manager then is in charge of the loading additional services and managing them (allowing messages to them for example).

  2. Orbital can (and often is) run inside of nodejs. The intent here can be to run a personal server context on your own machine, or a shared cloud compute resource similar to the way nodejs, Apache or nginx are used. Either way today nodejs is providing helpful scaffolding such as the v8 javascript parser and basic capabilities such as networking and npm modules. We haven't ported to DENO and likely we will move to a pure Rust architecture once we're done prototyping the SDL - but the general theory of an 'app runner' will remain the same.

Client 'Desktop' App

The default client app (which comes up in a browser) also shows a few more concepts:

  1. Client Mode - In general Orbital can run directly in v8 or in electronjs or in a web browser. In this scenario typically a user is loading up a lighter weight or thinner client side application and leaving some of the work (such as long lived persistence or behavior) on the server. When you visit the url with a web browser it also delivers a copy of Orbital to your client as well. The client runs a specific user app on demand. I load and run a client side application on the user device (a browser in this case) that is described using the SDL grammar.

  2. Client Bootstrapping - The client side bootstrap logic in turn manufactures a client side 'user application' view and talks to it over an internal client side messaging gateway using the same consistent SDL grammar.

  3. Hypothetical Desktop - The client application demonstrates a hypothetical consumer 3d desktop. You can spawn persistent 3d entities, including an avatar for yourself, that other people can see. You can physically move around, edit, move, and fiddle with the world. All state is persistent and multi-player.

  4. Console - This includes the command line console that lets you compose raw messages on demand that you can fire off to various threads at will - so producing a cube in the view for example is accomplished by passing an SDL grammar notated message to the view handler.

Client Data Browser App

This is an app that demonstrates these features:

  1. Persistence* - The db goal here is mostly focused on a formal back end and storage so that I can build out front end apps more easily. Traditional computer interfaces have all kinds of affordances to effectively lists and groups, and give users rich power over those concepts. My lifecards system follows that paradigm. I see this as a thought sharing wiki like thing with custom views -> basically lifecardy.

  2. Hypothetical Desktop with Persistence - In this idea I have some kind of 3d space such as a globe, that shows areas on the globe, that you can create or edit, and then you can go into an area and post artifacts and organize them. The use case is something like a place based mind palace or a place based metaverse. In general spatial organization of information could be a helpful or useful paradigm and could be a substitute for what humans normally do which is have arbitrary file folders with names.

Virtual Venice App

In this application multiple users can visit a digital twin of Venice and play with placing and editing geometry in a networked durable persistent environment.

Cloud Reef App

In this application multiple users can place not just geometry but networked behaviors to simulate and explore the behavior of complex reef ecologies.

Carla Remote App

Driving Carla via Orbital