1. Features of a workflow

This article presents a step-by-step introduction to workflow’s ability to empower other niches in addition to its role in business process abstraction and control.

First, workflow has the following features:

  • Logical control and choreographer of processes
  • Persistence and visualization of flow state
  • Degree of freedom of node function
  • Distributed asynchronous execution capability

The logic control and choreographer of the process itself is the original intention of workflow, which is a set of protocols abstracted to solve complex industrial processes. It is the foundation of workflow and the most used feature in the current industry (finance, insurance, etc.).

The persistence of flow state means that the whole flow chart is a huge and complex state machine, and it exists on the hard disk. The restart of the service will restore its current state, and the visualization can intuitively understand the current flow process.

The essence of workflow is the flow of nodes and their connections. The flow direction is controlled by connection conditions, and the blocking and parallelism of processes are controlled by gateways. The function of the node can be implemented arbitrarily, without being confined to “human task”, “HTTP task”, etc.

Distributed asynchronous execution, which is very important, is the foundation for subsequent enabling segmentation. Workflow provides the ability for nodes to execute asynchronously. The workflow itself is deployed multi-instance stateless, with all instances “preempting” the task list for execution, so it is unknown and equivalent on which instance a task will be executed once it is queued.

With a brief explanation of the four important features of workflow, starting from point 4, “distributed asynchronous execution capability,” we can do anything with “distributed characteristics,” “state persistence traceability,” and “choreographed.” Here are a few directions to explore, step by step.

2. Workflow enables distributed computing orchestration

As mentioned above, workflow has the characteristics of free node logic + asynchronous distributed execution. With these two characteristics, we can write countless nodes of computing types, combine them together, and realize computing through certain arrangement. The following uses flow chart as an example.

The whole process is a fully asynchronous service tasks, service task with computational logic, was thrown into a persistent mission of pool, every application examples to get tasks to perform, in theory, a complete process instance calculation and execution of each node will be scattered to the different instances execution, so as to realize the distributed computing.

3. Workflow + service-free computing enhances distributed computing choreography

In the second heading, distributed simple computing is implemented using asynchronous service tasks, but the disadvantages are:

  • Each additional logic requires the addition of a new node
  • The essence of workflow is to promote state flow and state persistence, and the management of computing resources is not professional

Therefore, in the current situation driven by Serverless, workflow can combine the lightweight of function calculation and the characteristics of elastic container to achieve the outsourcing of computing power.

When the user is an embedded workflow, it is relatively easy to implement new nodes. If the workflow is a cloud service, it is very troublesome to let the user freely implement the logical script of the new node. If you outsource the computing logic to the Serverless container, it’s much easier, there’s more freedom to implement logic on the user side (multiple languages, multiple triggers), there’s much less pressure on the workflow service side, and the workflow just needs to relay the results (or error results) of the business execution. Extending workflows with Serverless allows the computational power of workflows to be almost infinite.

Big data computing

 

If functional computing is used, small amounts of data can be transferred over HTTP or MQ and start the workflow push, but with large amounts of data (big data computing), there is an I\O bottleneck, so at the bottom of functional computing, a data store component is usually configured, The process usually starts with a read of data (read as a distributed Block) rather than an IO transfer.

4. Workflow empowers miniature service processing chains

After workflows gain powerful computing power with Serverless, they can empower micro-services, as shown in the following two examples.

 

Small, medium and micro store solutions

The above picture is the service of the small merchant “rookie xiangguan”. For the small merchant, these services cannot be realized by themselves. Even if they can be realized, plus the deployment server and maintenance, the cost is not cost-effective. If the cloud provides a lightweight function + workflow arrangement, users can start the automatic service of inch-photo printing at a low cost and almost zero threshold, and the cost of labor and time saved is very considerable.

Low code

Workflow can also empower another giant in the micro-application space – the “low code platform”. A low-code platform boasts almost no code to complete the business logic. It is nothing more than to include the form engine that supports the change and transfer of data, another is with the portal engine display control drag + report engine statistical ability, can quickly build a big-screen portal site.

However, the business will be reflected by the process after all. As the core, it promotes the continuation of work or functions. With the commonly used function plug-ins and the data receiving and receiving of the link center, it can almost tell a big story.

5. Workflow + enterprise

I’ve been hearing a lot of DevOps lately, so I looked at the definition and thought, “CI” (continuous inheritance), and why did it come up again?

DevOps is a new word for an old story. DevOps is a new word for an old story. DevOps is a combination of Development and Operations. DevOps takes it even further, automating at all stages, continuous inheritance -> Operations feedback -> continuous inheritance…. The ultimate goal of an infinite loop is agile development.

Here’s a simple example of how workflow works with DevOps.

The figure above gives you an idea of how the workflow automatically connects all the roles to achieve DevOps and thus agile development (don’t get into the details, that’s what it means).

From the beginning of demand generation, to the completion of developers, to the online code update are all handed over to the workflow manual approval function and service tasks, greatly reducing the communication cost and the contradictions caused by different role positions.

6. Workflows implement microservice choreography

Micro service concept has been proposed for years, to put it bluntly, he is to split the various modules separately deployed as a service, the function is conducive to a focused and maintenance personnel of specificity, easy to replace, the second is the micro service easier to meet the performance and cost of granularity, important or even into a cluster or giving is more important and expensive resource, the other is not much more.

 

But there are a lot of nasty things about microservices:

  • How is the message delivered, synchronous or asynchronous?
  • Call chain monitoring and problem location
  • Transactional grasp difficulty
  • Long-process businesses require state persistence

 

Workflow is a natural solution to these problems. Synchronous workflow supports transactions and asynchronous workflow supports repush. Workflow supports the view of flow status, and it is very simple to count flow nodes and locate problems. Workflow itself as state management, its state must be persistent, so this is also supported.

 

In addition, workflow also supports exception state capture, boundary time compensation, timeout time processing, etc. The following is a classic example of e-commerce.

The image above compares the way microservices are linked using an event bus with the way workflows orchestrate microservices. Although it’s not exactly the event bus approach, I want to say that microservices decouple a lot and are flexible, but the paid code is very complex to communicate.

Microservices, orchestrated by workflows, look much cleaner (of course, service tasks require additional processing and support to achieve the functionality of microservices).

 

 

7. Workflow +Serverless+ big data enabling machine learning model training

Machine training model is a strong computing application with high data volume and frequency, disordered data and strong persistence. The workflow +Serverless model mentioned above can make great use of computing resources to help the training model.

You can check out Netflix’s Meson, and here’s what I did.

 

It can be seen that workflow controls the flow of data receiving, data cleaning, training model and output model.

8. Workflow enables new features that the segmentation domain may need to prepare

  • Enhancements to flow logic control, loops, interrupts, and boundary events
  • Reuse of process instances (process instance pooling), that is, initial initialization of the process instance pool. Process instances cannot be started manually, only available ones can be pulled from the pool.
  • Process flow history selection, avoid invalid resource occupation
  • Process start and end enhancements (receiving and sending data)

 

The above features are just a few tentative thoughts, but there is much more that needs to be extended and enhanced if the domain enablement described in this article is to be implemented.