Commit Graph

554 Commits

Author SHA1 Message Date
Kelvin Clement Mwinuka
49da81d744 Moved raft init logic to raft.go file 2023-07-22 01:21:29 +08:00
Kelvin Clement Mwinuka
83bd37f182 Moved server and client configs into their separate folders instead of in a shared utils folder 2023-07-22 01:12:44 +08:00
Kelvin Clement Mwinuka
5507f32c73 Installed memberlist package to for cluster member discovery. 2023-07-21 05:48:20 +08:00
Kelvin Clement Mwinuka
feaacab88a Removed unnecessary tcp listener before initializing raft server 2023-07-20 12:02:48 +08:00
Kelvin Clement Mwinuka
70d8ad89bc Implemented basic raft server and cluster bootstraping 2023-07-20 11:59:59 +08:00
Kelvin Clement Mwinuka
bb74a5b5cf Added server and client configurations to support cluser identification and specific cluster node connection. Implemented starting of new raft node. 2023-07-19 23:24:05 +08:00
Kelvin Clement Mwinuka
e3780c791e Installed hashicorp raft 2023-07-18 03:16:33 +08:00
Kelvin Clement Mwinuka
ca7ada5731 Updated AdaptType function in utils to use big float and int64 for number coversions.
Updated setget and setget_test to account for new number formatting change.
2023-07-17 01:20:58 +08:00
Kelvin Clement Mwinuka
0549bcc745 Added tests for SET, GET, and MGET commands 2023-07-16 01:28:26 +08:00
Kelvin Clement Mwinuka
b5cadf43a7 Created writer mock.
Created mock server.
Added test for ping command plugin.
2023-07-13 18:37:53 +08:00
Kelvin Clement Mwinuka
91e1ba5555 Moved serialization functions to utils. 2023-07-13 12:03:00 +08:00
Kelvin Clement Mwinuka
1e4aa42c2d Implemented LMOVE command 2023-07-11 09:12:10 +08:00
Kelvin Clement Mwinuka
fb598ce9a7 Implemented LREM command 2023-07-10 15:56:53 +08:00
Kelvin Clement Mwinuka
f707f36ec1 Scaffolding for LREM command 2023-07-10 00:13:18 +08:00
Kelvin Clement Mwinuka
176001798f Implemented LTRIM command 2023-07-10 00:07:02 +08:00
Kelvin Clement Mwinuka
d0ef1868ff Created handler for LTRIM command 2023-07-09 21:00:01 +08:00
Kelvin Clement Mwinuka
7cd04a67e5 Implemented LSET command 2023-07-09 20:57:13 +08:00
Kelvin Clement Mwinuka
38bf510d0d Implemented LINDEX command 2023-07-08 20:05:57 +08:00
Kelvin Clement Mwinuka
74fea27a32 Implemented llen command 2023-07-08 19:30:26 +08:00
Kelvin Clement Mwinuka
f0c3526138 Implemented LPOP and RPOP commands 2023-07-08 19:15:46 +08:00
Kelvin Clement Mwinuka
6d2f515c88 Imlemented LPUSHX and RPUSHX commands 2023-07-08 18:47:26 +08:00
Kelvin Clement Mwinuka
2ea87c64f3 Implemented LPUSH, RPUSH, and LRANGE commands 2023-07-05 07:10:59 +08:00
Kelvin Clement Mwinuka
f744ed8a06 Created list plugin with comprehensive list of commands to be handled by the plugin 2023-07-05 01:14:32 +08:00
Kelvin Clement Mwinuka
3f39a23f13 Created plugin for PING command 2023-07-04 04:59:14 +08:00
Kelvin Clement Mwinuka
3043923c85 Consolidated encode and decode serialization functions into one file 2023-07-04 01:40:12 +08:00
Kelvin Clement Mwinuka
261cb717bf Simplified encoding on client side by removing all explicit command cases.
Encode RESP message directly instead of using resp package.
Encode error directly on core server instead of using Encode helper function.
2023-07-04 01:32:03 +08:00
Kelvin Clement Mwinuka
f3d36b3c3d Added Error to decoded types.
Removed cmd_functions.go as it is replaced by plugin system.
Consolidated get and set plugins into one plugin setget that handles GET, SET and MGET commands.
Plugins can declare multiple commands that they handle.
2023-07-03 12:35:37 +08:00
Kelvin Clement Mwinuka
9b830f9750 Removed Makefile. Added plugins config 2023-07-03 08:41:07 +08:00
Kelvin Clement Mwinuka
58d6664faa Added plugins folder location in config for the server.
Created get and ser plugin files.
Created server function to load plugins.
Moved Makefile inside server folder to build and run server.
2023-07-03 08:39:19 +08:00
Kelvin Clement Mwinuka
3961b3e7f6 Added basic support for string, int, and float values 2023-07-02 07:37:52 +08:00
Kelvin Clement Mwinuka
6f8a84ed48 Return 'nil' when value is not found 2023-07-02 07:31:56 +08:00
Kelvin Clement Mwinuka
04f0d92a95 Added encoding function for integers.
Added functionality for mget.
2023-07-02 07:23:50 +08:00
Kelvin Clement Mwinuka
c606353902 Unmarked checkboxed in readme 2023-07-01 23:07:41 +08:00
Kelvin Clement Mwinuka
9e0bffedb6 README list 2023-07-01 23:06:43 +08:00
Kelvin Clement Mwinuka
b1fec4a0de Removed print statement in simple string encoding function 2023-07-01 22:42:53 +08:00
Kelvin Clement Mwinuka
deda504ff0 Moved configuration parsing to utils package as it's shared by both client and server 2023-07-01 22:36:57 +08:00
Kelvin Clement Mwinuka
ef140c8427 Added array serialization to encode function. Moved message reading to utils packages as it's used by both server and client 2023-07-01 21:59:41 +08:00
Kelvin Clement Mwinuka
eb188deb7b Read server response immediately after sending command in the same goroutine. The previous implementation had the server reads happening on a different goroutine. 2023-06-29 02:26:49 +08:00
Kelvin Clement Mwinuka
ae73169865 Removed unused mutex 2023-06-27 01:07:11 +08:00
Kelvin Clement Mwinuka
58cf302460 Created encoding functions for simple string and error. 2023-06-27 01:04:44 +08:00
Kelvin Clement Mwinuka
e0e865fd56 Return PONG response from server 2023-06-26 19:41:38 +08:00
Kelvin Clement Mwinuka
40be716513 Added resp package for encoding and decoding resp messages.
Created encoding functions for the following commands: ping, set, setnx, get, mget, incr, incrby, incrbyfloat.
Created utils packages for shared utility functions.
2023-06-24 05:38:59 +08:00
Kelvin Clement Mwinuka
0b1c76f8b6 Send RESP encoded message with double quotes and escaped delimiters to server 2023-06-23 02:56:49 +08:00
Kelvin Clement Mwinuka
d1953c89e9 Added serialization package. Encode user input. 2023-06-22 22:54:37 +08:00
Kelvin Clement Mwinuka
84220cd82c Implemented TLS support 2023-06-22 02:26:49 +08:00
Kelvin Clement Mwinuka
6b6c4ba5e6 Changed port to 7480 as 6379 is already in use by Redis 2023-06-19 00:29:04 +08:00
Kelvin Clement Mwinuka
4eb7d75570 Implemented ability to specify JSON to YAML config file.
Added package to decode yaml config file.
Read config file and load values into server config.
2023-06-18 22:52:43 +08:00
Kelvin Clement Mwinuka
e9d78ba28c Added readme file 2023-06-18 21:58:08 +08:00
Kelvin Clement Mwinuka
c843093d18 Validate flags for tls mode 2023-06-17 22:20:40 +08:00
Kelvin Clement Mwinuka
d787489fb5 Accept server flags to toggle TLS 2023-06-17 22:05:29 +08:00