Skip to main content

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

  1. Tarobase SDK: The client-side library that applications use to interact with Tarobase services.
  2. API Layer: Handles requests from the SDK and routes them to the appropriate services.
  3. Authentication Service: Manages user authentication and session handling.
  4. 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
  5. Smart Contract Layer: Manages on-chain data and executes blockchain transactions.
  6. 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

  1. Client application makes a request through the Tarobase SDK.
  2. The SDK formats the request and sends it to the API Layer.
  3. The API Layer authenticates the request and applies any necessary transformations.
  4. The Policy Engine checks the request against the defined policies.
  5. For off-chain data, the request is routed to the appropriate data storage service.
  6. For on-chain data, the request is sent to the Smart Contract Layer for on-chain policy engine verification and processing.
  7. The response is sent back through the API Layer to the SDK.
  8. 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.