This is an old revision of the document!
A Distributed Immutable Data Objects (DIDO), by definition, is a [dido:public:ra:xapend:xapend.a_glossary:d:distsystem]] comprised of a network and a collection of nodes particpating in a Peer to Peer (P2P) network. Each node within the DIDO operates asynchronously and independently from all the others nodes. The nodes communicate changes in the state of the distributed objects managed by each nde by publishing Transactions across the node network. See Figure 1. Notice that the DIDO is comprosed of different kinds of Nodes (See 3_node_tax).
Any one distributed Immutable DIstributed Data Objects can exists on any or all of the kinds of nodes. For example, in Figure 1, the Green nodes may represent Wallets without any distributed objects, while the pink nodes might represent Archival Nodes that not only have the distributed objects, but a complete journal (i.e., ledger) of all the transactions every applied to the distributed object.
One of the most important aspects about a DIDO is that each participating Node in the Node Network using the Distributed Object arrives at the same state for the object given any transaction. In essence, the result of the transaction needs to be deterministic in nature (i.e., the same input (Transaction) achieves the same output (Journal Entry in the Journal).
A Software Stack is an ordered collection of software that makes it possible to complete a particular task. Often a critical part of any stack is the Platform the rest of the stack is built around. Some common platforms are
In this case we are particularly interested in building an idealized DIDO Stack with an idealized DIDO Platform. The idealized stack may not be completely accurate for all DIDOs, however, it provides a normative structure of what the pieces are in a DIDO Stack and in a DIDO Platform and how they are interrelated.
To accomplish this, a Database stack is presented with some idealized paths through the stack to met certain user scenarios. Then the DIDO Stack is presented as a transform of the Database Stack.
At the heart of Database Solution Stack is a Database Platform. In this case the Database platform is one of the many RDBMS products, such as Oracle, PostgreSQL, MySQL, SQLServer etc. However, in this stack, the DBMS does not necessarily need to be an RDBMS as long as there is an interface to the database that uses SQL. The Boundaries of the Database Platform are not rigid. For example, Microsoft offers a single ODBC interface for many databases, consequently the ODBC driver may or may not be part of the Database Platform. However, in the big picture what is in the Platform and what is not in the platform is a bit pedantic.
The following is a brief description of each component in the DBMS Stack. Note, these components are normative in nature and each DBMS may be slightly different. On the left side of the diagram there is a key that describes which tier each component is generally found in.
Return to Top Figure 3 represents three different scenarios of interactions of Applications or Users to the Database Solution Stack.
In this scenario, the Application accesses the Database Platform using the Database provided API. This solution is very machine resource efficient since the Application uses code that is optimized to access a specific Database (i.e., Oracle, PostgreSQL, MySQL, SQLServer, etc.). However, all of the error recovery and testing for the code and any changes made to the underlying database schema rests on the application.
Note: This scenario makes it more difficult to migrate from one Database Platform to another (sometimes referred to as vendor lock-in). In order to access the Database, the end user must use the Application.
In this scenarios, an Application or the End User can create SQL Statements as strings and pass them through Open Database Connectivity (ODBC) or Java Database Connectivity(JDBC) to access the database. In this scenario, the application or the End User are accessing the Database to invoke Data Definition Language (DDL) functionality for creating, destroying or modifying the database objects defined in the schema (i.e., views, schemas, tables, indexes, etc.).
Note: This Scenario usually relies on a specific Database Driver to access the Database Platform (i.e., a Driver for Oracle, PostgreSQL, MySQL, SQLServer, etc.).
This scenario is very similar to Scenario #2 except this time the Application or End User are using Data Manipulation Language (DML) for inserting data into database tables, retrieving existing data, deleting data from existing tables and modifying existing data.
Note: This Scenario usually relies on a database Database Driver specific to access the Database Platform (i.e., a Driver for Oracle, PostgreSQL, MySQL, SQLServer, etc.).
The proposed DIDO Solution Stack is modeled after the Database Solution Stack. The core features of both stacks is persistent storage of data and the modification of data using Transaction. The major difference is that the DIDO data objects Transactions are journaled with each Transaction being distributed to all the nodes in the node network. The details about how the Transactions are bundled, validated and verified vary amongst DIDO platforms. For example, some platforms bundle the Transactions into a block and the block is distributed once it has been verified by a mining operation. Others use “neighboring” nodes to valid and verify the Transactions.
The following is a brief description of each component in the DIDO Stack. Note, these components are normative in nature and each DIDO may be slightly different. On the left side of the diagram there the components that are good candidates for inclusion into the DIDO platform are identified.
This is currently the path used by most DIDOs.The DIDO Platform provides an Application Programming Interface (API) that an Applications can be use to access the DIDO Data Store. These APIs are proprietary in nature and although there are attempts to “re-use” one proprietary API specification on another proprietary platform (interchangeable implementations) it has met with limited success. Also, there are disagreements as to what languages the API should be written in (or support). For example, if the API is written in C, many languages have a way of accessing these function. For examplem Java can ue wither the Java Native Interface (JNI) or the Java Native Access (JNA)1).
Another issues is whether t use the Static Library and Shared Library approach. There advantages and disadvantages provided in Table 12).
| Properties | Static Library | Shared Library |
|---|---|---|
| Linking time | It happens as the last step of the compilation process. After the program is placed in the memory | Shared libraries are added during linking process when executable file and libraries are added to the memory. |
| Means | Performed by linkers | Performed by operating System |
| Size | Static libraries are much bigger in size, because external programs are built in the executable file. | Dynamic libraries are much smaller, because there is only one copy of dynamic library that is kept in memory. |
| External file changes | Executable file will have to be recompiled if any changes were applied to external files. | In shared libraries, no need to recompile the executable. |
| Time | Takes longer to execute, because loading into the memory happens every time while executing. | It is faster because shared library code is already in the memory. |
| Compatibility | Never has compatibility issue, since all code is in one executable module. | Programs are dependent on having a compatible library. Dependent program will not work if library gets removed from the system. |
Note: One of the goals for DIDOs is to minimize the side effects that can arise in distributed objects. Remember, each transactions when applied to any node should result in the same output. There is no guarantee that distributed object will be deterministic if there is “no need to recompile the executable” when new libraries are downloaded on different Nodes. This is particularly a problem on Nodes that host other software which may download different versions of the shared library. Furthermore, each component must be deterministic in its behavior, meaning that given the same set of inputs, the outputs will always be the same. In other words, not only will all the same implementations (i.e., configurations) of a node produce the same output, but multiple implementations of a component within a node will provide the same results given the same inputs.
Naturally, many of these APIs are focused on Representational State Transfer (REST) over Hypertext Transfer Protocol (HTTP) types of interfaces that define the standardized set of actions or verbs (i.e., GET, POST, PUT, DELETE, PATCH) as part of the Hypertext transfer protocol (HTTP) Request of what needs to be done, not the actual “what” needs to be acted upon. The what is usually sent along as a standardized document (payload) as Extensible Markup Language (XML) or JSON. also, sometimes the HTTP Request Header is used to send information to the service. The Header is a set of key-value pairs with no standardization as the what keys are to be returned nor what the values are.
There is a similar problem with the Hypertext transfer protocol (HTTP) Response. Although the document (payload) that is returned is in a standardized XML or JSON format, the contents of the document are not standardized. Some HTTP Responses send the results back as part of the HTTP Header which is comprised of non-standardized key-value pairs.