Hlang exclusive framework-task scheduling execution small framework-design

Preface

okey, although we have not officially started our business yet (mainly because I want to do the front-end and the programming language first, and then the back-end, which can be done very quickly), but we are In fact, we can develop our small framework first, and then we can happily integrate it after all our components are completed.

Basic design concepts

Here, I combined the interesting operations I discovered last time when I was working on the smart car navigation master function, and planned to implement a consistent task execution framework and encapsulate it in a business-oriented manner. Then when coding next, I only need to implement it separately. The corresponding method is then used to schedule the interface. In other words, I only need to expose one API interface to the outside world, and the others are methods and do not need to be exposed, which improves system security and schedules execution sequentially. Then make a scheduler, and then do the preservation operation.

So the question came to how I should design it. It is not difficult to design a task scheduler, but the problem is that it is a little troublesome to "keep it cooked". So here I define the following concepts:

  1. Task list:
    For business modules, such as payment processes, create a task list and execute the tasks according to the list. The
    task list has the following characteristics:
    1. Lists have "list transactions": atomicity, consistency, isolation, state recoverability
    2. External asynchronicity, internal sequential synchronicity</

おすすめ

転載: blog.csdn.net/FUTEROX/article/details/132309441