Comments (5)
Also need to take care of if the websocket running on different node (in case of scaled out scenario) has the ability to concurrently update the same json file.
from whitebophir.
Hello,
If you want to run a distributed WBO, the easiest is to let the load balancer distribute websocket connections to backends based on the board name. This will let you easily scale with the number of simultaneously active boards. If you want all the boards saved at the same place, you can simply mount a shared network drive and point WBO to it.
Since you are talking about concurrently updating the same json file, it looks like you also want to be able to distribute connections to the same board. This is a much more difficult problem, since all updates to a board have to reach all servers that have users connected to the board. There is a significant overhead involved. Even softwares like google docs do not implement that, and just limit the maximum number of users connected to a given document.
And out of curiosity: how many simultaneous users connected to the same board are you expecting ? Did you benchmark the use of a single server ? The official instance (https://wbo.ophir.dev/) is hosted on a single server, and scales quite well even during peak usage times.
from whitebophir.
Hi,
Thanks for your response. Yes, to start with we might be 100-200 users using the whiteboard instance and playing around creating boards and collaborating with each other. They may be using the same board or their own private boards etc., The highest spike would be all 200 users connecting up to the same board. We do have our own customization UI service running on top of WBO which does authorization, user management stuffs, tools customization etc., and also have a API service to do few other functionalities.
Now assuming that our user base would go up to 1000-2000 users in a span of one month, a single web server that hosts my UI service nor the host that hosts WBO service would not be able to scale to it. So we planned to have multiple instances of WBO running and my UI service would redirects its requests to one of the WBO in a round robin manner. The challenge here is that I would expect both the instances of WBO to store the json files at same location so I have consistent board when any instance serve the request and user sees the latest and greatest change.
My questions are that -
-when there are multiple instance of WBO running, each would have its own websocket and hence when 2 users are connected to the same board served by two different instance of WBO (pointing to same json file though), would the changes be available to each other from in memory?
- assuming that above works fine, when two users connected to same board updates the contents in the board, i assume both will try to update same json file, will there be any issues?
from whitebophir.
We do have our own customization UI service running on top of WBO which does authorization, user management stuffs, tools customization etc.,
Oh that's nice ! Is it published somewhere ? WBO is published under the AGPL, so if you integrate it as a part of a larger system, that system has to be made available under the same license.
-when there are multiple instance of WBO running, each would have its own websocket and hence when 2 users are connected to the same board served by two different instance of WBO (pointing to same json file though), would the changes be available to each other from in memory?
No. You would have to implement a broadcast system; this is possible, but not trivial. That's what I was writing about above.
I strongly advise you to make concrete measures of how the server scales before making any architectural choices, though. And if you make them, it would be great if you could report them here.
from whitebophir.
We do have our own customization UI service running on top of WBO which does authorization, user management stuffs, tools customization etc.,
Oh that's nice ! Is it published somewhere ? WBO is published under the AGPL, so if you integrate it as a part of a larger system, that system has to be made available under the same license.
Nope, we have not reached a stage where it can be published. Its just in requirements gathering step and formulating a plan to get the product out. I will get back to this as needed.
-when there are multiple instance of WBO running, each would have its own websocket and hence when 2 users are connected to the same board served by two different instance of WBO (pointing to same json file though), would the changes be available to each other from in memory?
No. You would have to implement a broadcast system; this is possible, but not trivial. That's what I was writing about above.
I strongly advise you to make concrete measures of how the server scales before making any architectural choices, though. And if you make them, it would be great if you could report them here.
Sure thank you!
from whitebophir.
Related Issues (20)
- Keyboard Shortcuts HOT 2
- How delete a board? HOT 2
- Note: There is now a Sandstorm package for this app! HOT 4
- Linting and Formatting HOT 5
- Formatting and Add formatting to CI workflow HOT 3
- Implement ESLint to the project and resolve the ESLint errors HOT 13
- Docker WBO KO sur Synology HOT 8
- Run on Public IP Address HOT 1
- Pen/tablet pressure support
- The whiteboard is freezing sometimes if selected items
- After moving the screen, writing renders incorrect.
- From a certain size, the whiteboard becomes too slow to handle. HOT 1
- Is there a way to disable the public board? HOT 2
- Board "pages" HOT 1
- Adding option for default color HOT 1
- Set default tool as ENV or URL-parameter HOT 1
- Shortcut for changing the size of the line is ambiguous. HOT 1
- Impossible to write with the pencil tool inside a partly deleted ellipsis with "Chrome"
- Printing differences among browsers
- Whiteboard is not always synchronized.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whitebophir.