What is Trinity?
Trinity is an Elastos browser project based on chromium engine that is integrated with the Elastos framework. It is an entrance from the old internet into the elastos internet. We can also think of Trinity as an Elastos Virtual Machine that supports the lifecycle of decentralized applications(DApps) for development, packaging, installation and execution. Elastos is the official name of this app. Desktop is the internal name. Trinity is the name of the project.
What is its purpose?
No but really, what does it contain?
Trinity is an HTML5 DApp development framework that contains the following:
- DApp layer: Ionic development framework
- Plugin layer: Cordova plugin, DID, Wallet CAR component, DApp lifecycle, Multi-DApp via Remote Procedure Call(RPC)
- Engine layer: Chrome, Elastos Runtime, Carrier
What is the Elastos DApp Runtime within the browser?
This is the Elastos Runtime within the browser that does the major heavy lifting when calling different functionalities and features which is based on Component Assembly Runtime(CAR).
- The DApp key performance module can be developed through the local component CAR or the CAR component can be built on the existing native module
- Compatible with Cordova plugin mechanism; Use the existing Cordova plugin to quickly develop the corresponding function
- CAR interface Remote Procedure Call(RPC), 32/64 bit, Android and Ubuntu platform supported
- iOS version is still under implementation
- File System and Network Permission management
- Local devices access APIs
- Wallet APIs
- Decentralized Identification(DID) APIs
What is a DApp on Trinity?
- DApp consists of ownership and files
- The ownership of DApp is registered on the blockchain which is put inside a personal wallet just like Bitcoin
- Authors and Creators can sell DApp like they would sell Bitcoin
- DApp files can be distributed
In chromium, browser and render are designed to be different process models. Even when they are actually in single-process mode, they communicate through the IPC interface. The basic flow of loading a web page is as follows. After creating a Frame Tree for the web page in the Browser process, the URL of the web page is sent to the Render process for loading. After the Render process receives the web page URL load request, it will do some necessary initialization work and then request the Browser process to download the content of the web page. The URLs in css and js are also parsed in Webkita nd sent to the Browser process for download so we can intercept in the process of requesting Browser to download resources in Webkit.
Based on the existing permission management mechanism of the browser, combined with the DApp’s permission configuration file, the access management of the local device and data is realized.
A slightly less-technical summary
Elastos Browser can currently only be built for android devices but it’ll be supported in other platforms in the future such as iOS, windows, mac, etc. After Elastos enters beta phase by the end of the year 2018 or beginning of 2019, you can download this app from app store or directly install it onto your phone. This app is used to load and run DApps written using Ionic framework. In this app, the complete elastos runtime feature is implemented that provides a safe and reliable environment for html5 apps to run. The runtime is what enables the protection of digital assets and property rights.
On this browser, the open source Chromium project is used as the technical framework for rendering and running. Then, the Elastos framework, sandbox mechanism, access rights management, disabling of traditional internet communication methods(eg http/https) and Component Assembly Runtime(CAR) components are added. It also provides other functions to implement a standard elastos runtime where the HTML5 Elastos DApp is run.
Some of the features of Trinity browser are as follows:
- Virtual File System: Each app has an encrypted virtual file system built in. All DApp and DApp file data are stored in this virtual file system. This ensures that data cannot be accessed externally.
- Isolation between DApps: In the virtual file system, the access path permissions are set according to the ID of the DApp and the mechanism for setting file access rights is dependent on the user.
- Runtime isolation: It supports a separate process for each application, leveraging the natural isolation mechanism of the process along with access control.
- Disabling of http/https protocols: The browser completely disables http/https protocols so applications are not allowed to send any network packets out to the internet and instead will need to pass on their request to elastos carrier.