Serverless Industry 4.0

Pswarup Mishra
4 min readMay 20, 2022

Serverless computing is a new paradigm shift when it comes to development of Industry 4.0 applications.

Industry 4.0 is all about integrating everything that matters to manufacturing in one unified namespace. The data stored in the unified namespace is then leveraged to create services that can be expressed in terms of a service. The services are designed for specific purposes such as top line improvement, bottom line improvement, customer experience and new product introduction.

Because a large volume of data is already available in the cloud, organisations are trying to build use cases around those data. The use cases are developed by developers for solving one or more business problems.

For developing application that makes use of large volume and structurally different datasets some application and hardware infrastructure in place.

Many of the Industry 4.0 applications are focused on bottomline improvement and hence developers keep getting the request for new applications to solve specific problem areas of the factory constantly. The scale of the application keeps changing when the benefits are realised by one factory and the management wants the same application to be deployed for other sites in phases. This again create a challenge for the developers who needs to resize the infrastructures to meet the demand from the factory.

This is where serverless computing comes into picture.

Serverless computing is a method of providing backend services on an as-used basis. A serverless provider allows users to write and deploy code without the hassle of worrying about the underlying infrastructure.

Serverless is a cloud computing execution model that

  • Automatically provisions the computing resources required to run application code on demand, or in response to a specific event;
  • Automatically scales those resources up or down in response to increased or decreased demand;
  • Automatically scales resources to zero when the application stops running.

Serverless offloads all management responsibility for backend cloud infrastructure and operations tasks — provisioning, scheduling, scaling, patching and more — to the cloud provider. This gives developers more time to develop and optimize their front-end application code and business logic. And with serverless, factories never pay for idle capacity. They pay only for the resources required to run their applications, and only when those applications are running.

Now let’s understand the usage scenario for Serverless computing

Suppose you want to monitor the plant historian and detect “contextual” anomalies while a particular SKU is being processed.

Contextual anomaly detection seeks to find relationships within datasets where variations in external behavioural attributes well describe anomalous results in the data.

An example for contextual anomalies can be found in a use-case such as SOP deviation monitoring wrt the golden batch parameters automatically and then send alerts and notification to the respect shopfloor managers / operators.

Consider the same machine producing two different SKUs. One SKU follows a pattern ( say pressure required to produce a certain SKU ) which could be entirely different than the next SKU the machine is producing. Now, the system that the developers are trying to build must be able to find out anomalies wrt the golden batch parameter for the respective SKUs and if the pattern over time is varying too much an alert must be raised for operators and line managers to take action as appropriate.

Traditional development approach for building such as application would be to

  1. Access the historian data via say OPC UA
  2. Provision a VM (Virtual Machine ) on-premise or on cloud for development and testing
  3. Choose a programming language you want to use for fulfilling this functionality
  4. Setup the application environment ( aka runtime ) on the VM
  5. Develop the code using the application runtime ( for example — Python, Java , C# etc.)
  6. Test your code in Development server
  7. Provision the Production VM and setup application runtime
  8. Deploy the code in Production Server
  9. Making Production Live

As you can see a number of steps ( > 30% ) is around building the environment. Now consider the same application development using Serverless computing

  1. Access the historian data via say OPC UA
  2. Choose a programming language you want to use for fulfilling this functionality
  3. Provision a serverless computing environment
  4. Locally build the application (on your local machine or a single server ) and test it
  5. Deploy the application into serveless computing environment
  6. Make production live

In the case above, only one step is required to provision the environment ( note you have not provisioned any infrastructure — hardware or software ) and that one step is automated as well for all of the cloud / serverless computing providers.

Now that the infra setup is not required, developers can focus on building the application fast and optimising the actually code required to detect “contextual” anomalies.

Once the business started exploring value from that “contextual” anomalies, if they want to replicate the solution across the sites, developers just need to upgrade the code for multisite concurrent access and any infrastructure required to scale up the code will be automatically done by the serverless computing itself.

The possibilities with severless computing is limitless. There could be N numbers of similar use-cases where serverless computing can bring value to the factories in terms of developer productivity, faster time to value, lower TCO of the solutions etc.

In future blogs, I will talk about types of serverless computing and their impact on Industry 4.0 app landscape.

[ The views expressed in the blog are author’s own views and it does not necessarily reflects the view of his employer, A&M ]

--

--

Pswarup Mishra

Industry 4.0 , Turnaround and Restructuring Director at Alvarez and Marsal | Industrial IoT Architect | ML, AI at Edge |Creator of “Process In a Box” |