The client of Flutter+Serverless does not just write two-end code, but expands the working boundary of the client to form a complete business closed loop. During the implementation and practice of the new R&D mode, I have been thinking about how to improve the R&D experience and quality of FaaS. The following are the problems encountered in the implementation process.
-
How to improve FaaS r&d experience? FaaS layer usually directly adds business codes one by one in the trunk. In this way, the dependence between domain data is not clear, and a lot of work needs to be added when the domain data needs to be replaced, adjusted in sequence or changed from serial to parallel in subsequent maintenance.
-
How to improve the quality of FaaS r&d? When students on the client side write FaaS code, they need to add protective code and degradation strategy for all kinds of exceptions on the server side, which is easy to be omitted and lead to the overall quality decline.
-
These parameters can be used by multiple tasks using map-type data as input parameters.
-
Two apis, THEN and thenAll, are used for task scheduling. The THEN function indicates that the incoming function is executed sequentially, while the thenAll function needs to be executed in parallel.
-
Call Apply for task link execution.
-
Through chain calls, the overall structure is very clear and the framework is less intrusive.
-
Code exceptions: null pointer exceptions, out-of-bounds array exceptions, etc
-
System exception: machine exception, memory overflow, thread pool full, DB exception, etc
-
Interface exception: The interface response times out or the downstream dependency is abnormal
-
Improve research and development experience: developers arrange tasks in the form of chain call, supporting any type of tasks, all tasks can be flexibly combined, and the execution sequence of tasks can be arbitrarily adjusted.
-
Improve the quality of r&d: The task orchestration framework adds mechanisms for exception type sorting, exception capture and exception monitoring.