Introducing PARSIQ SDK

We are thrilled to introduce our SDK, a toolkit to harness the potential of Data Lakes for comprehensive blockchain data processing!

PARSIQ
PARSIQ
3 min readJul 27, 2023

--

Data Lakes serve as a custom, application-specific data layer for filtering, aggregation, and analysis of blockchain-scale data contained in the Tsunami data store. This SDK provides the general infrastructure for querying Tsunami, maintaining historical data, and transparently handling blockchain reorganizations as well as various configuration options, allowing you to adjust the runtime behavior to the specific needs of your application.

With PARSIQ SDK, you can collect, organize, and interpret data from distributed ledgers, transforming raw information into actionable intelligence.

State Storage Simplified

At the heart of the SDK lies the state storage mechanism, a robust system that manages both real-time and historical data with ease.

Leveraging PostgreSQL tables, the SDK allows seamless storage of entity values and mutations, streamlining data retrieval and analysis. The state storage module ensures that you have the necessary data at your fingertips, facilitating smooth interactions with the blockchain data.

Configurable for Optimal Performance

We understand that each use case is unique, and that’s why customization is key with our SDK. It offers an array of configuration options, from environment variables to command-line options, allowing you to fine-tune your Data Lake for optimal performance.

Tailor your setup to suit specific use cases and data processing requirements, ensuring that you get the most relevant and valuable insights from your blockchain data.

Sequential and Parallel Data Lakes

The SDK supports two main types of Data Lakes — sequential and parallel. Sequential data lakes are well-suited for low-latency computations with an evolving state, especially when data volumes are not too large.

For large-scale data processing needs, the SDK supports parallel data lakes. This feature enables multiple runner instances to work efficiently and safely in concert, ensuring seamless handling of vast amounts of data. If you are dealing with extensive transaction volumes, the parallel data lakes feature has you covered.

Try it Yourself: Sample Data Lake Creation

We understand that the best way to understand the true power of the PARSIQ SDK is through hands-on experience. Let’s get started with a simple example that showcases the capabilities of the PARSIQ SDK.

With the example Data Lake, we will be monitoring associations of tokens with URIs in CNS registry contract and current token ownership only, without delving into name resolution. The complete code for the Data Lake itself can be found in the docs, while the basic logic follows these steps:

  • Initialize a new package
  • Install the dependencies (@parsiq/datalake-sdk, @arsiq/tsunami-client, @parsiq/tsunami-client-sdk-http, @ethersproject/abi)
  • Put the implementation in src/datalake.ts
  • Replace the TSUNAMI_API_KEY constant in src/datalake.ts with your actual Tsunami API key
  • Implement the entry point (e.g., main.ts), which should simply call run()
  • Put together simple Dockerfile and docker-compose.yml
    Build and run.

About PARSIQ

PARSIQ is a full-suite data network for building the backend of all Web3 dApps & protocols. The Tsunami API provides blockchain protocols and their clients (e.g. protocol-oriented dApps) with real-time and historical data querying abilities. Data Lake APIs allow complex data querying & filtering for any project; specifically designed and tailored for our customers’ blockchain data needs.

Supported chains: Ethereum, Polygon, BNB Chain, Avalanche, Arbitrum & Metis + more to come

Website | Blog | Twitter | Telegram | Discord | Reddit | YouTube | Link3.to

--

--