• RandomBit
    link
    fedilink
    English
    31 year ago

    I think that would only work when the number of instances is small. Two solutions to this might be:

    • have instances act like relays where the home instance of a community notifies 10 instances and then each of those instances notifies 10 instances, etc.
    • batch updates on a timer such that once a minute all posts, comments, boosts, etc within a minutes are buffered and sent together.
    • @savjee
      link
      English
      11 year ago

      I looked at how many WebSocket connections a single server could keep open, and it seems quite high: https://unetworkingab.medium.com/millions-of-active-websockets-with-node-js-7dc575746a01

      That being said, I do agree with you that it’s inefficient to open a connection to every other instance.

      About your proposals:

      • I don’t think your first solution is feasible. How would an instance know which other 10 instances to notify?
      • I do like your idea of batching operations together! Would definitely cut back on the amount of HTTP calls and signature validations. Perhaps this can even be extended further: right now every user interaction is signed before its been sent to other instances. Would be interesting if the instance itself also has a public/private key and that it can sign a whole batch at once (rather then signing every single user interaction).