Kelvin Clement Mwinuka
989e19e6ba
Implemented functionality to add voter to raft cluster upon leader receiving join request broadcast.
...
Servers broadcast join cluster message until they receive a message confirming they have successfully joined.
2023-07-31 00:18:26 +08:00
Kelvin Clement Mwinuka
094d44c9a0
Repetetive broadcast of raft join request message until a join signal is received on a dedicated channel.
...
Handle multiple types of Actions in NotifyMsg.
Added function to check if the current server is the raft leader.
2023-07-30 20:31:56 +08:00
Kelvin Clement Mwinuka
d82a6a98d7
Use UDP dial to find default address for outbound traffic.
...
Set default bindAddr if it has not been explicitly provided be the user.
2023-07-29 01:33:33 +08:00
Kelvin Clement Mwinuka
67d8f9f047
Set up memberlist cluster with message broadcasting.
2023-07-28 22:20:33 +08:00
Kelvin Clement Mwinuka
5f3a0ae56e
Installed go-retry for retrying various actions on the server. Created RetryBackoff function to create the retry policy on demand.
2023-07-28 14:47:52 +08:00
Kelvin Clement Mwinuka
044edff4e8
Capture cancel signal to gracefully shut down server
2023-07-24 06:11:33 +08:00
Kelvin Clement Mwinuka
69a86e4588
Removed config print statement
2023-07-24 05:32:25 +08:00
Kelvin Clement Mwinuka
d4a5997b30
Scrapped plugin design in favour of simple command interfaces.
...
Setup docker build process for running server.
Deleted test files.
2023-07-22 05:34:07 +08:00
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
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
2ea87c64f3
Implemented LPUSH, RPUSH, and LRANGE commands
2023-07-05 07:10:59 +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
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
04f0d92a95
Added encoding function for integers.
...
Added functionality for mget.
2023-07-02 07:23:50 +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
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
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
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
Kelvin Clement Mwinuka
c8cc156456
Created server and client sub-folders
2023-06-17 21:31:13 +08:00