Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

EngineOverview

KevinSmall edited this page Sep 3, 2018 · 6 revisions

Engine Overview

Contents

At the very highest level, the application is constructed like this. The green-blue ticks show systems that are built:

Going a bit deeper into how the Unity app is structured, there are three distinct layers:

To follow the implementation of these in Unity, open the prefab B3dEngineAllInOne in folder Assets\B3d\Assets\Prefabs. Then, in the diagram from the bottom up:

Adaptor Layer

The adaptor layer is what communicates with the external world. It requests data from whatever data source is suitable for it. Data sources could be files, web APIs, local applications, whatever we can code for to provide data. The adaptor's job is to manage the data requests and convert the data into a common format called the common data model.

The adaptor layer is stateless, it doesn't cache anything and keeps no record of what data it has dealt with in the past. Each request it receives is treated as a new independent thing that it will blindly fulfil.

An adaptor belongs to a family which is the broadest grouping of data types. A family can be Bitcoin, Ethereum, Twitter etc. An adaptor is also linked to a data provider which is the data source. You can think of an adaptor as being defined by a combination of a family (which defines the data structures) and a data provider (which provides the data).

For example, look at these adaptors in the folder Assets\B3d\Engine\Adaptors\Scripts:

Adaptor Name Adaptor Family Data Provider
AdaptorBtcDotInfo.cs Btc blockchain.info
AdaptorBtcOfflineFiles.cs Btc Files in a Unity resources folder

These adaptors provide nitcoin data from different data sources. One is online data sourced from blockchain.info, the other is offline data sourced from the Unity resources folder Assets/B3d/Engine/Adaptors/Resources/.

Let's look at the implementation of the adaptor layer.

Implementation

Look at these components on the B3dEngineAllInOne prefab.

..work in progress..

Common Data Model (Cdm)

Cdm is the Common Data Model, our modelled truth.

..work in progress..

Implementation

Frontend Layer

The frontend is a visualisation of the modelled truth contained in the Cdm.

..work in progress..

Implementation

Clone this wiki locally