← Projects

Distributed Systems

Building a Reliable Event-Driven Blockchain Marketplace

A blockchain marketplace case study focused on decoupling HTTP request handling from failure-prone external blockchain operations.

Role
Python backend engineering, blockchain/RPC integration, WebSocket communication, Kafka event-streaming integration, and reliability-oriented workflow design.
Context
Invincible GG / Owner's Club
PythonFastAPIKafkaWebSocketsSolanaPostgreSQLRESTMicroservices
Architecture Concept

A blockchain marketplace case study focused on decoupling HTTP request handling from failure-prone external blockchain operations.

Marketplace
FastAPI
Kafka
Minting Consumer
Solana RPC

Overview

I worked on the Invincible GG / Owner’s Club marketplace platform, a blockchain and NFT marketplace where minting workflows interacted with Solana infrastructure through RPC communication.

The engineering challenge was reliability. Repeated or heavy REST RPC calls could be rejected or interpreted as excessive traffic by external infrastructure, which made the minting path a poor fit for a synchronous request/response workflow.

Business Context

Marketplace users expect minting actions to be handled predictably even when an external blockchain provider is slow, unavailable, or protective against repeated calls. The backend needed to give the application a clearer operational boundary around those external calls.

Problem

The initial concept was a direct path:

Marketplace -> FastAPI -> Solana REST RPC

That shape made the user-facing request path responsible for work that could be long-running, retry-prone, and dependent on an external provider. The system needed a more resilient workflow without implying that Solana itself was broken.

My Role

I contributed Python backend engineering with FastAPI services, blockchain/RPC integration, WebSocket communication, Kafka event-streaming integration, asynchronous workflow design, and reliability-oriented improvements.

System Architecture

The architecture moved through two important improvements:

Marketplace -> FastAPI -> WebSocket communication -> Solana

Marketplace -> FastAPI -> Kafka -> Minting Consumer / Worker -> Solana RPC

The Kafka-backed model allows HTTP handlers to accept and validate minting intent, publish work, and return without holding the user request open for external blockchain operations. A worker can then process minting work with explicit retry behavior, duplicate handling, and operational logging.

Technical Challenges

External RPC communication introduces uncertainty. Requests can fail transiently, be rejected, or produce ambiguous outcomes. In an event-driven workflow, the backend also has to account for duplicate events, consumer restarts, delayed processing, and eventual consistency between the marketplace state and blockchain state.

Engineering Decisions

Kafka was useful as a durable boundary between the marketplace API and minting execution. WebSocket communication helped address direct RPC interaction concerns, while asynchronous workers made retry and recovery behavior easier to reason about.

The design needed to consider idempotent consumers, stable event identifiers, retry limits, dead-letter handling, and observability around each stage of the minting workflow.

Reliability & Failure Handling

The important reliability shift was separating acceptance of work from completion of external work. That makes the backend better positioned to handle provider failure, retry safely, and surface an accurate state such as pending, processing, failed, or completed.

The case study does not claim exactly-once processing. The practical goal was controlled processing with explicit duplicate protection and clear operational traces.

Trade-offs

Asynchronous workflows introduce more moving parts and eventual consistency. The benefit is that the system gains a clearer place to handle retries, consumer failures, and slow external dependencies without tying those problems directly to an HTTP request lifecycle.

Outcome

The marketplace architecture became more reliability-oriented by using event processing and worker execution for minting operations that interact with external blockchain infrastructure.

What I Learned

Blockchain integrations benefit from the same production principles as other distributed systems: external calls fail, duplicate work happens, and operational state must be designed deliberately.