-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: decentralization setup #146
Conversation
|
||
|
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.
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.
Please stick to the convention: make the peersStorageRoute
and storageStorageRoute
IDs start with a capital letter.
const server: NodeHttpServer = await manager.instantiate('urn:semcom-node:default:NodeHttpServer', { variables }); | ||
const peerSyncScheduler: Scheduler = await manager.instantiate('urn:semcom-node:default:PeerSyncScheduler', { variables }); | ||
const storageSyncScheduler: Scheduler = await manager.instantiate('urn:semcom-node:default:StorageSyncScheduler', { variables }); | ||
|
||
server.start(); | ||
peerSyncScheduler.start(); | ||
storageSyncScheduler.start(); |
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.
Hmm... does this work? I.e. are the schedulers the same objects used for the init of the server, not new ones?
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.
when I tested it, the server didn't instantiate the 2 schedulers at all, because they aren't needed I think? The only thing they need to share is memoryStorage and apparently that happens because it synchronizes when I launch 2 nodes
No description provided.