Architecture
Overview
Tarobase combines traditional backend services with web3 technology to provide a hybrid solution for modern web and mobile applications. This architecture allows developers to leverage the benefits of both centralized and decentralized systems.
Key Components
- Tarobase SDK: The client-side library that applications use to interact with Tarobase services.
- API Layer: Handles requests from the SDK and routes them to the appropriate services.
- Authentication Service: Manages user authentication and session handling.
- Data Storage:
- Off-chain storage that aggregates blockchain-based data and normal application data into a single, secure data store
- On-chain storage for blockchain-based data
- Smart Contract Layer: Manages on-chain data and executes blockchain transactions.
- Policy Engine: Enforces access rules and data validation based on defined policies regardless if data is being set on-chain or off-chain.
Set Request Lifecycle
- Client application makes a request through the Tarobase SDK.
- The SDK formats the request and sends it to the API Layer.
- The API Layer authenticates the request and applies any necessary transformations.
- The Policy Engine checks the request against the defined policies.
- For off-chain data, the request is routed to the appropriate data storage service.
- For on-chain data, the request is sent to the Smart Contract Layer for on-chain policy engine verification and processing.
- The response is sent back through the API Layer to the SDK.
- The SDK returns the data to the client application, or initiates the relevant transaction if applicable
On-Chain vs. Off-Chain Storage
Tarobase allows developers to choose between on-chain and off-chain storage for different types of data:
-
On-Chain Storage:
- Used for data that requires high transparency and immutability
- Stored directly on the blockchain (all data is public)
- Slower and more expensive for frequent updates
- Ideal for critical application state, ownership records, etc.
- Allows for interaction between on-chain data and on-chain actions
-
Off-Chain Storage:
- Used for data that doesn't require blockchain features
- Stored in traditional databases
- Faster and more cost-effective for frequent updates
- Ideal for user profiles, application metadata, etc.
- Private data can be stored privately
More to come.