Skip to content

BurakCakan/byor-redislike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build you own redis-like database (BYOR) ☁️

It is an example implementation of socket programming in Python3 by recreating the well-known in-memory data storage Redis.

Currently, it has only these commands

  • GET
  • SET

Also, I implemented encoding and decoding protocols of only

  • Integer
  • String
  • Error

Lastly, it can serve for multiple clients and handling race condition with lock mechanism.

In order to run, please follow these steps:

  1. Create and activate python3 environment (for virtualenv users):
python3 -m venv venv
source venv/bin/activate
  1. Go to the project folder:
cd ./byor
  1. Run the server first with the command:
python -m byor.main run-server
  1. Now, server is ready to accept connections. And you can open a new terminal/terminals and start using commands.
  • Adding value to the db:
python -m byor.main set key1 val1
  • Getting (Querying the value of the key):
python -m byor.main get key1

About

Build your own redis-like database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages