Assembly Line Patterns using Azure Logic Apps & Service Bus Topics

Linear Assembly Line – Azure Logic App

Let us consider a typical linear assembly line. This is where an object is placed at the beginning of the assembly line and travels on its journey in a straight  line or linear fashion. As it passes each processing point the object can be modified and then continue on its journey until at completion exits as the finished article. More complicated assembly lines may end up with objects reaching different exit points. Imagine the object being built as a car where parts of the car are being added along the journey. Could there be two exits points, one for hatchbacks and the other for saloons? This is not the norm but perfectly feasible.
Azure offers the Logic App. This is where data enters the app and the processing travels in a linear fashion through various steps as part of a workflow. There are one or more exit points driven by conditional logic.

Random Access Assembly Line – Azure Service Bus Topic

What if now we have an assembly line where we can add objects at any point and provide control or meta data to the object that describes the intended exit point. The simplest case is that the object is simply placed on the line and exits some time later using the named exit point. The designer is using the line as a staging post or temporary storage. Alternately it could be a scenario where the object enters, exits and is then placed back on the line, repeatedly in an never ending infinite loop.
Azure offers the Service Bus Topic. This where we supply an object but additionally attach external properties to the object, that amongst other things, can describe its intended exit point. We then publish the object into the topic. Each exit point is actually a topic subscriber that can read the external properties of each object and filter out the objects that are addressed to it. The subscriber then processes the object and exits, or places the modified object back on the topic with a new exit address. In this way we can architect a system that can continually process data until a satifactory completion is reached.



Leave a Reply

Your email address will not be published. Required fields are marked *