Skip to content

joacoc/BlockchainTail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Tail

Blockchain.tail.trim.mov

💡 Concept

Query in different ways blockchain logs from Kafka without using views, materialized views or tables.

Connect to Alchemy (a web3 service provider) and listen to Ethereum blockchain logs. Send those events to a Kafka topic and then use Tails to stream the information in the way the user wants using SQL.

If two equal queries are running from different clients, the node service will reuse the first running tail to avoid multiple tails querying doing the same. It is done by hashing the query and using the same "room" to share the results with their users.

The exciting part of this concept is using Materialize with just a source and tails to avoid handling views or materialized views inside Materialize and not requesting the Snapshot to reprocess everything in the source. It is impossible with a view since it will request everything from the source. A tail without Snapshot can start immediately.

It is a use case where Materialize acts more as a processing framework than as a database.

Another point that stands out is: Materialize resource consumption (just 100MB). Ten times less than other processing frameworks like Flink or Spark? (This facts needs to be checked more deeply)

⚠️ WARNING: Remember to add your ALCHEMY_KEY to docker_compose.yml!

Diagram

Diagram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published