Conversation
|
👋 mxiao-cll, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
NPM Publishing labels 🏷️🟢 This PR has valid version labels and will cause a |
alejoberardino
left a comment
There was a problem hiding this comment.
I don't think this is the best way to approach this. In this implementation we're making the incoming requests more complex and adding more blocking paths that could inject artificial delays or error out in ways we're not expecting.
I see this much better suited on the transport layer, specifically only the writer side, and the simplest approach is probably to have a transport that composes two inner transports, only uses one subscription set, and at least at first doesn't try anything too smart and keeps both e.g. the ws connection and a polling to the rest backend where both write to the cache.
artificial delays
error out
where both write to the cache
Also according to Nik |
Still a delay that is introduced that would otherwise not exist
Sorry if it wasn't clear, wasn't talking about exceptions, but any kind of unexpected behavior as a cause of this change, potential race conditions, locks, etc. I usually also like to think that these framework changes may be used in wildly different ways in the actual EA implementations that could break our assumptions
Using the transports would maintain the same pattern debugging-wise that adapters already have, and by manipulating at the reader side you're still hiding the why data was not available on the primary transport (maybe more?). On a different topic, just thought of the Streams Go images and I think this may break behavior for them due to how they're implemented, but not super sure |
dskloetc
left a comment
There was a problem hiding this comment.
Approving, but please make sure Alejo's concerns are addressed or not a concern.
OPDTA-6402
We want a single endpoint to have the ability to invoke two transports and return value from 2nd transport if there is no data in the 1st transport.
fallbackTransporton the endpoint to specify fallback for a given primary