Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to clarify how to handle multiple data sets over the same channel in DPL #939

Open
matthiasrichter opened this issue Mar 26, 2018 · 3 comments
Labels

Comments

@matthiasrichter
Copy link
Collaborator

some first ideas on that topic

User story: a processor defines one channel. In one single invocation of the processing callback it want's to send multiple data sets of identical OutputSpec over the same channel, e.g. via multiple calls to snapshot or adopt. The receiver might expect theses messages to arrive in the same InputRecord of one single invocation of its processing function.

There are different use cases.

  • Event-like: Many users might expect an event-like entity, i.e. everything I send in one execution of the processing callback I expect to be accessible together in one single execution of the processing callback of the receiver
  • Streaming: everything what gets into the processor is immediately processed without relating it to other data.

Probably these different use cases need to be clearly expressed in the workflow definition. And definitely something we have to do clarify to avoid confusion.

@ktf
Copy link
Member

ktf commented Mar 26, 2018

Should you use subspecification for that?

@matthiasrichter
Copy link
Collaborator Author

Not necessarily. One can think of sending multiple parts with the same OutputSpec. Maybe it's not very likely and we do not need to support this right away. Right now it's possible to do so, and there is a potential misunderstanding on the receiver side.

We can make a policy requiring unique OutputSpec per object and processor call, and can check this on the framework level. I think this would be the easiest measure to catch problematic cases.

If we agree on that we can label this issue as bug and make a patch soon to check for duplicate OutputSpecs.

@ktf
Copy link
Member

ktf commented Mar 27, 2018

I think actually that the fact we allow it right now is a bug. As you point out it would become impossible for the receiving side to decide how many messages to wait for, so I do think that "multiple parts" should really mean "multiple subspecifications" (or maybe a newly introduced field, if you see that for detector specific stuff?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants