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

Allow automatically resolving response identities #9

Merged
merged 2 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions docs/articles/router-dealer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,4 @@ In the example below, multiple clients send periodic requests to an asynchronous
![Req-Router workflow](~/workflows/req-router.bonsai)
:::

The <xref href="Bonsai.ZeroMQ.GetIdentity"/> operator can be used to extract all identity frames from a multiple part request. Content frames are stored after the empty delimiter frame. For simple requests this is usually the last frame, which can be retrieved directly using the `Last` property.

After processing the response, we can simply merge the identity frames with the response frame to generate an outgoing message ready to be routed.

:::workflow
![Req-Router processing](~/workflows/req-router-processing.bonsai)
:::
Content frames are stored after the empty delimiter frame. For simple requests this is usually the last frame, which can be retrieved directly using the `Last` property. The <xref href="Bonsai.ZeroMQ.SendResponse"/> operator automatically takes care of pushing all identity frames from the request into the response to generate an outgoing message ready to be routed.
4 changes: 0 additions & 4 deletions docs/workflows/req-rep.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@
<Expression xsi:type="Format">
<Format>reply {0}</Format>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="zmq:ToMessage" />
</Expression>
<Expression xsi:type="WorkflowOutput" />
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
</Edges>
</Workflow>
</Expression>
Expand Down
47 changes: 0 additions & 47 deletions docs/workflows/req-router-processing.bonsai

This file was deleted.

3 changes: 0 additions & 3 deletions docs/workflows/req-router-processing.svg

This file was deleted.

17 changes: 0 additions & 17 deletions docs/workflows/req-router.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,13 @@
<Expression xsi:type="Format">
<Format>reply {0}</Format>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="zmq:ConvertToFrame" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="zmq:GetIdentity" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Merge" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="zmq:ToMessage" />
</Expression>
<Expression xsi:type="WorkflowOutput" />
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="0" To="5" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="6" Label="Source2" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="6" To="7" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
</Edges>
</Workflow>
</Expression>
Expand Down
Loading