github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/docs/modules/edge/metamanager.md (about) 1 # MetaManager 2 ## Overview 3 MetaManager is the message processor between edged and edgehub. 4 It's also responsible for storing/retrieving metadata to/from a lightweight database(SQLite). 5 6 Metamanager receives different types of messages based on the operations listed below : 7 - Insert 8 - Update 9 - Delete 10 - Query 11 - Response 12 - NodeConnection 13 - MetaSync 14 15 ## Insert Operation 16 `Insert` operation messages are received via the cloud when new objects are created. 17 An example could be a new user application pod created/deployed through the cloud. 18 19  20 21 The insert operation request is received via the cloud by edgehub. It dispatches the 22 request to the metamanager which saves this message in the local database. 23 metamanager then sends an asynchronous message to edged. edged processes the insert request e,g. 24 by starting the pod and populates the response in the message. 25 metamanager inspects the message, extracts the response and sends it back to edged 26 which sends it back to the cloud. 27 28 ## Update Operation 29 `Update` operations can happen on objects at the cloud/edge. 30 31 The update message flow is similar to an insert operation. Additionally, metamanager checks if the resource being updated has changed locally. 32 If there is a delta, only then the update is stored locally and the message is 33 passed to edged and response is sent back to the cloud. 34 35  36 37 ## Delete Operation 38 `Delete` operations are triggered when objects like pods are deleted from the 39 cloud. 40 41  42 43 ## Query Operation 44 `Query` operations let you query for metadata either locally at the edge or for some remote resources like config maps/secrets from the cloud. edged queries this 45 metadata from metamanager which further handles local/remote query processing and 46 returns the response back to edged. A Message resource can be broken into 3 parts 47 (resKey,resType,resId) based on separator ‘/’. 48 49  50 51 ## Response Operation 52 `Responses` are returned for any operations performed at the cloud/edge. Previous operations 53 showed the response flow either from the cloud or locally at the edge. 54 55 ## NodeConnection Operation 56 `NodeConnection` operation messages are received from edgeHub to give information about the cloud connection status. metamanager tracks this state in-memory and uses it in certain operations 57 like remote query to the cloud. 58 59 ## MetaSync Operation 60 `MetaSync` operation messages are periodically sent by metamanager to sync the status of the 61 pods running on the edge node. The sync interval is configurable in `conf/edge.yaml` 62 ( defaults to `60` seconds ). 63 64 ```yaml 65 meta: 66 sync: 67 podstatus: 68 interval: 60 #seconds 69 ```