Skip to content

KingSajxxd/flowops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌊 FlowOps: Distributed Systems Simulator

FlowOps is an interactive, gamified learning platform designed to simulate real-world enterprise backend environments.

Instead of just making standard REST calls to a basic CRUD app, "players" must navigate a production-grade infrastructure stack to complete challenges. They must handle enterprise API Gateways, strict rate limiting, and event-driven asynchronous processing to progress through the levels.


🏗️ Architecture & Tech Stack

FlowOps is built as a microservices monorepo utilizing heavy-duty infrastructure to mimic actual corporate environments:

Layer Technology
API Gateway & Traffic Control WSO2 API Manager (v4.7.0)
Event Streaming & Pub/Sub Apache Kafka (Confluent v7.7.8)
Game Engine & Microservices Node.js (Express)
Infrastructure Docker & Docker Compose

Request Flow

User → WSO2 API Manager (Validates Token & Throttles) → Node.js Engine → Apache Kafka (Async Workers)

🎮 The Challenges

Level 1: The Gateway Intercept

  • Core Concept: Gateway Routing & Header Manipulation
  • Objective: Successfully route a request through the WSO2 Gateway to the protected backend by injecting the correct authorization tokens and custom system headers.

Level 2: Enterprise Throttling

  • Core Concept: Rate Limiting & Resilience
  • Objective: The Gateway enforces a strict throttle of 3 requests per minute. The user must intentionally hit the 429 Too Many Requests limit, parse the nextAccessTime from the Gateway's error response, and successfully resume traffic when the quota resets.

Level 3: Eventual Consistency

  • Core Concept: Event-Driven Architecture (Kafka)
  • Objective: The user triggers an order creation. Instead of waiting for a synchronous response, the backend immediately returns a 202 Accepted and pushes the payload to an Apache Kafka topic. A background worker processes the job, forcing the user to poll a secondary status endpoint to retrieve their success code.

Level 4: Telemetry & Observability (In Development)

  • Core Concept: Prometheus Metrics & Dashboarding

🚀 Local Setup & Installation

Prerequisites

  • Docker & Docker Compose (allocate at least 4–6 GB RAM for WSO2 and Kafka)
  • Node.js v18+

1. Boot the Infrastructure (WSO2 + Kafka)

cd infra
docker-compose up -d

⏳ Wait ~2–3 minutes for the enterprise Java containers to fully initialize.

2. Start the Game Engine

cd backend
npm install
npm run dev

3. WSO2 Configuration (Game Master Setup)

To make the APIs playable, they must be published via the WSO2 Control Plane:

  1. Navigate to the Publisher UI: https://localhost:9443/publisher
    (Login: admin / admin)
  2. Create and publish the REST APIs pointing to http://host.docker.internal:3000.
  3. Apply the Level2-Strict-Throttle policy for Phase 2.
  4. Generate OAuth2 Bearer tokens via the Dev Portal: https://localhost:9443/devportal

📂 Repository Structure

flowops/
├── backend/               # Node.js game engine, Kafka workers, and challenge logic
│   ├── server.js          # Core Express API
│   └── package.json
├── infra/                 # Docker configuration for enterprise services
│   └── docker-compose.yml # WSO2, Zookeeper, and Kafka cluster setup
└── README.md

💡 Why Build This?

Most portfolio projects stop at the application layer. FlowOps was built to demonstrate proficiency in the Operations and Infrastructure layers — proving an understanding of how traffic is secured, throttled, and processed asynchronously in high-scale environments.

About

An interactive, gamified learning platform designed to simulate real-world enterprise backend environments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors