question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple projections per endpoint

See original GitHub issue

To reduce the need to replace the entire endpoint stream every upgrade - lets create projections for each namespace value in [Versioned] events and subscribe to each.

Then, a replay would only be needed for the specific projection if an event version is upgraded inside a projection or a new event added.

thoughts:

  • should this only be for events? Or can we do commands too?
  • what happens if a command is updated but only 1 handler is updated to use the new version?
  • should handler projection names include a hash of handled event versions to prevent a user from updating the handler and not incrementing version?
  • should we support event upgrading/downgrading into a specific handler?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
charlessolarcommented, Mar 12, 2019

After a chat - the way I was thinking about splitting was wrong.

We’d not be splitting on the event’s Versioned namespace - we’d be splitting based on the Handler namespace.

And a rule would be to not change other handler’s models (good practice in any case)

A model would be a self-contained unit inside a handler - and a projection would encompass all the events the 1 handler handles.

We can add a special Handler.Rebuilding hook method to allow the user to delete all the models they’ve built before starting the rebuild

0reactions
charlessolarcommented, Mar 12, 2019

Upon startup the endpoint would map out which events are handled by which handlers and create a single projection which links events to one of multiple handlers like so

'CustomerCreated': function(event, state) {
   linkTo('CustomerDetailsHandler.0.1');
   linkTo('CustomerAnalyticsHandler.0.1');
}

Specific details on versioning the handler streams and the projection itself will need to be thought about more deeply

Read more comments on GitHub >

github_iconTop Results From Across the Web

A prediction-based test for multiple endpoints
This article introduces a global hypothesis test intended for studies with multiple endpoints. Our test makes use of a priori predictions ...
Read more >
Multiple Endpoints in Clinical Trials Guidance for Industry
For each endpoint individually, there is at most a 5 percent chance of. 262 finding a treatment effect when there is no effect...
Read more >
A prediction‐based test for multiple endpoints - Montgomery
This article introduces a global hypothesis test intended for studies with multiple endpoints. Our test makes use of a priori predictions ...
Read more >
The Analysis of Multiple Endpoints in Clinical Trials
Perhaps the most common approach in the medical literature is to analyze each endpoint separately, presenting multiple P-values and an overall subjective ...
Read more >
Methods for the analysis of multiple endpoints in small ...
In Section 3, we focus on methods that combine endpoints to test a global null hypothesis of no treatment effect in any endpoint....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found