CS Architecture

Horizontally divided into three modules: Restful, Scheduler, Service

  1. Encapsulate the request as httpjob and submit it to the Scheduler
  1. Find the corresponding service through the ServiceName of the httpjob protocol to execute the job
  1. The module that actually executes the request logic, encapsulates the ResponseProtocol, and wakes up the wait thread in Restful

Vertically divided into 4 modules: Listener, History, ContextId, Context:

  1. Responsible for the registration and binding of the client side (write to the database and register in the CallbackEngine)

  2. Heartbeat interface, return Array[ListenerCallback] through CallbackEngine

Create and remove history, operate Persistence for DB persistence

Mainly docking with Persistence for ContextId creation, update and removal, etc.

  1. For removal, reset and other methods, first operate Persistence for DB persistence, and update ContextCache

  2. Encapsulate the query condition and go to the ContextSearch module to obtain the corresponding ContextKeyValue data

The steps for requesting access are as follows: Context Service - 图1

Context Service - 图2

Need to ensure that Restful’s thread pool is not filled

Context Service - 图3

The sequence diagram is as follows: Context Service - 图4