-
Notifications
You must be signed in to change notification settings - Fork 6
feat: server setup + refactor #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Correcting custom Eval in cli.js
|
||
## Project Structure | ||
|
||
This project is a normal NodeJS project with a target of using as less NPM dependencies as much possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not be the goal here. Building the fastest JS implementation is.
- [`./server.js`](./server.js) - This file setsup a server to accept connections and respond to requests from client. This is the file where the Raft Node is instantiated and connected to the other nodes in the cluster. | ||
|
||
## How to Contribute? | ||
- Refer to issue tickets on [Github](https://github.com/techsavvyash/stylusdb-js) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change remote
raft/index.js
Outdated
// RPC command | ||
case 'rpc': | ||
//TODO Check this make sure that it is called through the leader of | ||
console.log("RAHUL in command case :", raft.leader === this.address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also convert all console logs to proper logging. Pino is a good alternative.
|
||
raft.change({ term: 139 }); | ||
raft.emit('data', { | ||
address: 'vladimir', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
reference/index copy.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file?
var LifeRaft = require('../raft/index'); | ||
const Log = require('../raft/log'); | ||
|
||
const DBManager = require('../db'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pick one. Leaning towards DBManager
. Let's remove LMDBManager
altogether.
feat: working set on request to Leader
This PR includes the following changes:
Also refer CONTRIBUTING.md