Skip to content

Mymahdi/Go-KV-Messaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed-Systems

go-kv-messaging

A concurrent key-value messaging system and squarer implementation in Go. This project demonstrates fundamental concurrency patterns including goroutines, channels, client-server communication, and buffered message queuing.

🚀 Overview

This project is split into two components:

🔐 Part A: Key-Value Messaging Server

A TCP server that supports multiple concurrent clients and basic key-value operations:

  • Put:key:value – Adds a value to a list of values for the given key.
  • Get:key – Retrieves all values for the given key.
  • Delete:key – Removes all values associated with the key.
  • Update:key:oldValue:newValue – Replaces an existing value with a new one.

✅ Key Features

  • Fully concurrent server using goroutines and channels.
  • Buffered per-client message queues (with drop mechanism).
  • Command logging with timestamp.
  • Active and dropped client counters.

🧮 Part B: Squarer Implementation

A concurrent squarer that receives integers via a channel, squares them, and sends results through an output channel. Accompanied by unit tests covering:

  • Basic correctness
  • Multiple inputs
  • Negative numbers
  • Zero
  • Empty channel behavior

✅ Highlights

  • Non-blocking squaring logic using select statements.
  • Graceful shutdown with Close() method.
  • Tested for correctness with multiple inputs, negatives, zero, and timeout scenarios.

About

A fault-tolerant implementation of a distributed MapReduce framework, featuring

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors