You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users interact with resources through a unified interface, regardless of the specific cloud platform. However, when deploying user-written business logic to a cloud platform, adaptation is required. Payload obtained from the platform runtime needs to be converted into parameters that the business logic code can accept. Furthermore, the execution results of the business logic must be adapted to the platform's standards for response.
The current implementation method is that each type of resource directly faces the platform's standards and directly adapts to the platform's standards. With n types of resources and m platforms, the cost of adaptation is n * m.
We can define a set of Runtime Handler interface specifications between the platform and the resource types. The input of the interface is the platform input, and the output is the business logic result. Each type of resource only needs to implement one Runtime Handler to adapt the business logic. Each platform only needs to implement one Runtime adaptation function, converting the platform's input into the input type of the Runtime Handler, and calling the Runtime Handler. Finally, the output of the Runtime Handler is converted into the platform output. The complexity is reduced to n + m.
In this way, to integrate a platform, you only need to create a file, adapt the platform's input and output, and call the Runtime Handler, and all resources can be deployed to this platform. Similarly, to integrate a new type of resource, you only need to create a file, adapt the business logic interface and the Runtime Handler interface, and it can be deployed to various platforms. This reduces the cost of integrating resources and platforms.
Users interact with resources through a unified interface, regardless of the specific cloud platform. However, when deploying user-written business logic to a cloud platform, adaptation is required. Payload obtained from the platform runtime needs to be converted into parameters that the business logic code can accept. Furthermore, the execution results of the business logic must be adapted to the platform's standards for response.
request → biz_input → biz_function → biz_output → response
The current implementation method is that each type of resource directly faces the platform's standards and directly adapts to the platform's standards. With n types of resources and m platforms, the cost of adaptation is n * m.
We can define a set of
Runtime Handler
interface specifications between the platform and the resource types. The input of the interface is the platform input, and the output is the business logic result. Each type of resource only needs to implement one Runtime Handler to adapt the business logic. Each platform only needs to implement one Runtime adaptation function, converting the platform's input into the input type of the Runtime Handler, and calling the Runtime Handler. Finally, the output of the Runtime Handler is converted into the platform output. The complexity is reduced to n + m.In this way, to integrate a platform, you only need to create a file, adapt the platform's input and output, and call the Runtime Handler, and all resources can be deployed to this platform. Similarly, to integrate a new type of resource, you only need to create a file, adapt the business logic interface and the Runtime Handler interface, and it can be deployed to various platforms. This reduces the cost of integrating resources and platforms.
The text was updated successfully, but these errors were encountered: