• Home
  • Modelling Assembly Lines Using Azure Logic Apps & Service Bus Topics
Microsoft Azure

Modelling Assembly Lines Using Azure Logic Apps & Service Bus Topics

If you've ever wondered how to model real life assembly lines in code, then you can using Microsoft Azure Logic Apps and Service Bus topics. Here we give you the low down. Read on to find out more...

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 it exits at completion, 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.

Microsoft 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 we now 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 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. Alternatively, it could be a scenario where the object enters and exits, and is then placed back on the line, repeatedly, in an infinite loop.

Microsoft Azure offers the Service Bus topic; this is 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 satisfactory completion is reached.

Azure Logic Apps.pngIf you have any queries about Azure, or would like to discuss this in further detail please don't hesitate to contact us.

Get in Touch

- By Nigel Wardle (Application Architect)

Nigel-W-Blog.png

Related Resources