Skip to content

own-redis — is a high-performance key-value storage using the UDP protocol to interact with clients.

License

Notifications You must be signed in to change notification settings

urystem/own-redis-sync-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

own-redis 🗃️

Description

own-redis — is a high-performance key-value storage using the UDP protocol to interact with clients.

Installation

Requirements

  • Go 1.20 and above.

Compilation

First clone the repository and compile the project:

git clone <repository_url>
cd own-redis
go build -o own-redis .

Launch

To start the server, use the following command:

./own-redis -port 7070

Command Line Options

  • -port N: Sets the port on which the server will run.
  • -help: Print usage information.

Functional

PING

The PING command is used to check whether the server is running.

$ nc 0.0.0.0 8080
PING
PONG

SET

The SET command stores a key-value pair.

$ nc 0.0.0.0 8080
SET Foo Bar
OK

If the PX option is specified, the key-value pair will expire after the specified milliseconds.

$ nc 0.0.0.0 8080
SET foo bar px 10000
OK

GET

The GET command retrieves the value associated with a key.

$ nc 0.0.0.0 8080
SET Foo Bar
OK
GET Foo
Bar

If the key does not exist, the server should return (nil).

$ nc 0.0.0.0 8080
GET RandomKey
(nil)

Error Handling

If a command does not have the correct number of arguments, return an error:

(error) ERR wrong number of arguments for 'SET' command

About

own-redis — is a high-performance key-value storage using the UDP protocol to interact with clients.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages