Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMPE 273 — Communication Modes Lab

Campus food ordering system implemented three ways to demonstrate the trade-offs between synchronous, asynchronous, and streaming communication patterns.

Structure

comm_modes_lab_personal/
  common/           Shared proto contracts, domain models, ID utilities
  sync-grpc/        Part A — gRPC (synchronous, request-response)
  async-rabbitmq/   Part B — RabbitMQ (async, event-driven)
  streaming-kafka/  Part C — Kafka (streaming, log-based)

Each part has its own docker-compose.yml and is self-contained.

Prerequisites

Tool Purpose Install
Go 1.22+ Language https://go.dev/dl
Docker + Compose Run all services https://docs.docker.com/get-docker
buf Proto compiler brew install bufbuild/buf/buf or winget install bufbuild.buf

Quick start

# 1. Generate proto code (one-time)
make proto
cd common && go mod tidy && cd ..

# 2. Run a specific part
cd sync-grpc && docker compose up --build   # Part A
cd async-rabbitmq && docker compose up --build   # Part B
cd streaming-kafka && docker compose up --build  # Part C

The workflow (same in all three parts)

Student → OrderService → InventoryService → NotificationService → Student

What changes is how OrderService talks to Inventory and Notification:

Part Mechanism Key property
A gRPC call Caller blocks until every step completes
B RabbitMQ queue OrderService returns immediately; rest happens in background
C Kafka topic Fully decoupled log; consumers can replay from any point

About

A comparative analysis between synchronous vs async communication modes for event driven architectures

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages