Commit Graph

554 Commits

Author SHA1 Message Date
Kelvin Clement Mwinuka
f94bf66e45 Server now handles client requests to subscribe to channel and channel consumer groups. Only allow subscribtion to a channel or consumer group if the connection is not already subscribed. 2023-10-24 02:54:31 +08:00
Kelvin Clement Mwinuka
0057081317 Added message channels for Channel and ConsumerGroup. Created Start Method for Chanel and Consumer group that initializes an infinite loop listen to message channel 2023-10-24 01:05:50 +08:00
Kelvin Clement Mwinuka
6038d7204d Removed mutex on pubsub container 2023-10-23 08:22:30 +08:00
Kelvin Clement Mwinuka
b91af6a2f8 Created scaffolding for pub/sub feature 2023-10-23 08:20:50 +08:00
Kelvin Clement Mwinuka
8f44a92fdb Updated README with new TODO features 2023-10-22 06:24:30 +08:00
Kelvin Clement Mwinuka
81f0ac905a Include server Dockerfile 2023-10-19 00:21:11 +08:00
Kelvin Clement Mwinuka
6cb3bfba94 Updated README.md 2023-10-18 20:59:32 +08:00
Kelvin Clement Mwinuka
9d9bcc715a Restore state from snapshot upon restart 2023-10-18 20:57:13 +08:00
Kelvin Clement Mwinuka
771b1d4c4a Return from the broadcastRaftAddress goroutine if we've already joined the cluster 2023-10-18 18:16:23 +08:00
Kelvin Clement Mwinuka
c3efc7381b Added TODO comment for ending RaftJoin broadcast 2023-10-16 03:31:59 +08:00
Kelvin Clement Mwinuka
1ce725768e Fixed comment typo 2023-10-16 03:30:38 +08:00
Kelvin Clement Mwinuka
69e3afc2f3 Added TODO comment for proxying requests sent to non-leader node 2023-10-16 03:25:13 +08:00
Kelvin Clement Mwinuka
9e52392653 Persist snapshots to disk 2023-10-16 03:19:07 +08:00
Kelvin Clement Mwinuka
d62fb1baeb Created package for containing SnapshotStore implementations 2023-09-10 02:26:01 +08:00
Kelvin Clement Mwinuka
3cd9da245c Untrack docker-compose.yaml and Dockerfile 2023-09-10 02:17:39 +08:00
Kelvin Clement Mwinuka
04d319fae6 Updated .gitignore 2023-09-10 02:16:01 +08:00
Kelvin Clement Mwinuka
b4689970cd Updated README.md file 2023-09-05 02:16:48 +08:00
Kelvin Clement Mwinuka
b1a6aa0b23 Re-instated file snapshot store 2023-09-05 02:14:39 +08:00
Kelvin Clement Mwinuka
9672788ec9 Created skeleton for sqlite3 snapshot 2023-09-05 01:51:21 +08:00
Kelvin Clement Mwinuka
01712892de Set default dataDir config. Set INMEMORY env var of docker containers to false. Added volumes folder to gitignore 2023-09-05 01:14:55 +08:00
Kelvin Clement Mwinuka
19b4f56869 Conditionally broadcast join message only when the follower hasn't yet joined the raft cluster. 2023-08-14 06:58:21 +08:00
Kelvin Clement Mwinuka
5fa6bc893c Re-enabled all the nodes in docker-compose 2023-08-12 05:56:33 +08:00
Kelvin Clement Mwinuka
c101b18969 Created ApplyRequest and ApplyResponse types to handle calls and responses to raft.Apply.
In-Memory state between nodes is now synchronized.
2023-08-12 05:40:35 +08:00
Kelvin Clement Mwinuka
bc4ce05753 User proper boolean value passing in Dockerfile CMD command.
Pass key, cert and set TLS env variable to true in docker-compose file to enable tls mode.
2023-08-12 00:53:08 +08:00
Kelvin Clement Mwinuka
6cfea5a1b7 Removed CustomWriter implementation 2023-08-12 00:30:39 +08:00
Kelvin Clement Mwinuka
d4068c1236 Enabled plugin loading 2023-08-11 14:46:25 +08:00
Kelvin Clement Mwinuka
9e1b3e7938 Use args in build-plugins and build-server sections of Makefile to allow easy plugin of build for different platform.
Updated dockerfile to specify which platform to emulate.
2023-08-11 14:43:12 +08:00
Kelvin Clement Mwinuka
e8df5bb13c Updated Makefile to build for linux/amd64 2023-08-10 04:52:16 +08:00
Kelvin Clement Mwinuka
fc7270c2b9 Enabled CGO for plugin cross compilation 2023-08-09 06:07:26 +08:00
Kelvin Clement Mwinuka
4e4f46d1e3 Dockerfile build copy from linux subdirecotry of bin folder 2023-08-09 05:36:17 +08:00
Kelvin Clement Mwinuka
2cc4494022 Moved server config files into utils package.
Added PluginsDir config.
Updated Dockerfile to use plain alpine image as a base and move pre-compiled executable instead of building and compiling within the image build process.
2023-08-09 04:46:33 +08:00
Kelvin Clement Mwinuka
4f10d51915 Updated plugin command files to return message bytes or errors instead of writing to the connection directly.
Added test for ping, set, get and mget commands.
2023-08-09 04:22:08 +08:00
Kelvin Clement Mwinuka
6193ec4682 Renamed plugin folder to 'plugins' from 'pugins' to fix build error 2023-08-09 00:20:41 +08:00
Kelvin Clement Mwinuka
3886cba29c Re-instated plugin model for commands.
Re-instared makefile.
2023-08-09 00:09:21 +08:00
Kelvin Clement Mwinuka
de1f9681a2 Installed boltdb for logstore and stablestore 2023-08-08 23:26:14 +08:00
Kelvin Clement Mwinuka
e13b4ec14b Added os interrupt signal 2023-08-01 01:37:09 +08:00
Kelvin Clement Mwinuka
e1e89f46ca Implement raft and memberlist shutdown 2023-08-01 01:17:37 +08:00
Kelvin Clement Mwinuka
65e53f1a8d Return NodeMeta data 2023-07-31 02:01:17 +08:00
Kelvin Clement Mwinuka
d9bb9a551e Broadcast RafJoinSuccessMessage when server requesting to join is found in configuration. Initialize raft before memberlist. 2023-07-31 01:47:34 +08:00
Kelvin Clement Mwinuka
f7df7f89d9 Removed default condition in NotifyMsg switch statement 2023-07-31 00:20:10 +08:00
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
52eaa6b735 Added 2 nodes in docker-compose for cluster testing 2023-07-23 02:56:54 +08:00
Kelvin Clement Mwinuka
dc5ff9855d Pass server args in docker-compose 2023-07-22 06:30:14 +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