muellmusik / Utopia

This is an attempt at a generic library of tools for making Network Music Apps in SuperCollider
43 stars 8 forks source link

AddrBook sendExcluding, sendAll, etc. throw an error if a host has left the network #5

Open muellmusik opened 9 years ago

muellmusik commented 9 years ago

For example, run a BeaconClock and then have one of the computers disconnect from the network.

Should sendAll etc. only send to online peers? This would be a problem if a peer simply became unresponsive.

Alternatively one could use try and catch the PrimitiveFailedError. Possibly there should be more than two states, so maybe online, unresponsive, and down, or something like that.

muellmusik commented 9 years ago

So it is possible to catch the error, but there will still be a small bit of code posted even if suppressed since boost::asio has it's own error posting, and seemingly no verbosity.

muellmusik commented 9 years ago

How about one of these:

  1. Peer has a classvar indicating whether to send to offline addresses. Hail, etc. already will set offline status when a machine becomes unresponsive, so if this is set to false in any situation where membership is a little volatile, then we won't get streams of errors.
  2. Hail etc. remove any members who have been unresponsive for a reasonable amount of time, or alternatively any members whose addrs have resulted in failed sends (one or some other reasonable limit).

In either case we must make sure that all Utopia sending goes via Peer (fine as it spoofs NetAddr now anyway.)

telephon commented 7 years ago

@muellmusik After this https://github.com/supercollider/supercollider/pull/2908#discussion_r119858749 has been merged, do you think this can now be caught?

muellmusik commented 7 years ago

Yes I can look at this this week

On 3 Jun 2017, at 20:59, Julian Rohrhuber notifications@github.com wrote:

After this supercollider/supercollider#2908 (comment) has been merged, do you think this can now be caught?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

telephon commented 7 years ago

great, this will be very useful!

muellmusik commented 6 years ago

I think this is resolved by primitive related cleanups?

telephon commented 6 years ago

when we make the next network music session, I'll check.