beacon-chain-java icon indicating copy to clipboard operation
beacon-chain-java copied to clipboard

[WIP] Attestation pool take 1: interop

Open mkalinin opened this issue 6 years ago • 4 comments

mkalinin avatar Aug 28 '19 15:08 mkalinin

TimeProcessors and similar classes: what's the rationale behind merging all events into single stream and then sorting them out by instanceof? May be it make sense to subscribe all feed* methods directly to the corresponding streams? (to make this thread safe you may do publishOn(singleThreadScheduler) for all inbound streams)

Nashatyrev avatar Aug 29 '19 13:08 Nashatyrev

Regarding a component which is statefull and has several inbound streams - I'm still not sure what should be the proper pattern for it Ideally all this RX stuff should be stateless but often it is pretty tricky and we need to go back to imperative world

Nashatyrev avatar Aug 29 '19 13:08 Nashatyrev

Ideally all this RX stuff should be stateless but often it is pretty tricky and we need to go back to imperative world

I agree with that. It looks like Reactor is not meant to handle stateful processors and was created for another purposes. This way it looks more like a misuse. Let's keep it for now as it is and replace Reactor with a proper thing later.

mkalinin avatar Aug 30 '19 14:08 mkalinin

The general feeling is that using RX shouldn't require such amount of boilerplate code

Nashatyrev avatar Aug 31 '19 13:08 Nashatyrev