GithubHelp home page GithubHelp logo

We must have the ability to store json board files in a shared location (external storage or DB) so we could have scaled out WBO nodes about whitebophir HOT 5 OPEN

lovasoa avatar lovasoa commented on May 16, 2024
We must have the ability to store json board files in a shared location (external storage or DB) so we could have scaled out WBO nodes

from whitebophir.

Comments (5)

VenkatesuNallu avatar VenkatesuNallu commented on May 16, 2024

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.

lovasoa avatar lovasoa commented on May 16, 2024

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.

VenkatesuNallu avatar VenkatesuNallu commented on May 16, 2024

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.

lovasoa avatar lovasoa commented on May 16, 2024

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.

VenkatesuNallu avatar VenkatesuNallu commented on May 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.