Skip to content

Conversation

@jvdp
Copy link
Contributor

@jvdp jvdp commented Aug 2, 2021

... and use it for the Peer case class as specified in the ticket.

However, I'm a bit skeptical we want to go down the route of managing and materializing a separate source per actor. Instead I think it will be more practical to use one source with the messages from different peers. That way we won't need to worry about setup and teardown and precise synchronisation of these things. Look at the added spec for an example of this (there's a Thread.sleep in there.)

A possible improvement would be to materialize a future that completes when the subscription is performed (via ask-pattern with the PeerEventBusActor) to aid in this synchronisation. I was playing around with this but it only made sense for the specs, and I think we should avoid this kind of stuff for production code.

There's also a small bugfix in there to unsubscribe when the subscribing actor dies, which might cause memory leaks otherwise.

@jvdp jvdp force-pushed the feature/ETCM-1053-streams-per-peer branch from 3773459 to dbcc05e Compare August 2, 2021 21:46
@jvdp jvdp force-pushed the feature/ETCM-1053-streams-per-peer branch from 5bed941 to 53cf4c1 Compare August 5, 2021 15:12
@jvdp jvdp merged commit 1df5b99 into develop Aug 6, 2021
@jvdp jvdp deleted the feature/ETCM-1053-streams-per-peer branch August 6, 2021 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants