Hi, Operation Management functionality will allow users, admins & policy engines to remotely perform concrete operations on a device/devices. A Device Operation will contain the operation-code & the payload of the operation (such as a configuration payload) if exists. An operation can be categorized into one of the following.
- *Message* : CDM admins, users can send a message to a particular device. Typically these type of operations are one-way messages. - *Information* : CDM admins, users or policy engine (for evaluating the adherence to policies or as a requirement for dynamic policies) can request the current status of the device (location, battery level , temperature etc) - *Configuration* : CDM admins, users or policy engine can push a configuration such as WIFI configuration, camera disable , device mute, device lock to a particular device Following are the components involved in operation management. - *CDM UI : *CDM web console which will be used by the admins & users - *Policy engine : *CDM Policy engine which will be used by admins to create policies to apply to the devices - *CDM Operation Manager : *This will be the core component which will handle all the operation management related tasks - *CDM DB : *CDM Core database - *Distributed Cache : *Distributed cache (Carbon cache) used to store & retrieve operations - *Device APIs : * APIs which will be called by the devices - *Device : *An enrolled device (Can be any connected device such as a mobile device or an IOT device ) Operation Management can be mainly categorized into 3 areas. 1. *Add Operations* : Device operations can be added by the admins, users via CDM web-console or by the policy engine. In this scenario we need to persist the operation and applicable device list into the CDM database. Initial status of the operations in the database will be set to "PENDING". Then we need to put these operations into the distributed-operation-cache for fast-retrieval. 2. *Fetch available Operations* : Devices will contact the CDM server to fetching available operations for those devices. This is a performance-critical function since it is the most-frequently used function in CDM. First CDM Operation Manager will do a cache-lookup for fetching the available operations. If that won't succeed it will do a database-lookup for available operations. Once the operation-manager receives the available operations for that particular device, it will remove those operations from the cache & update the status of operations to "SENT" in database. *Issues* 1. How to exactly find whether there are any available operations for a particular device without doing a database query? Can't we assume that if there's no operation cache-entries for a particular device, there are no available operations for that device? 2. What will be the structure of the operation-cache? Is it a per-device cache or single cache for all devices? If it is a single cache what will be the key when putting a new operation to the cache? 3. Since this is a performance critical function is it advisable to update the operation status to "SENT" within this sequence? Can't we put the sent operations to another cache & do the database update from another task? 3. *Update operation status*: After the received operations have been executed on the device, device will contact the server to update the status of the operation & provide the information the operation has requested (i.e. location , temperature, status of camera etc). Once the update operation is contacted by the device, status of the appropriate operation will be changed to "RECEIVED". *Issues* 1. Since a network call per each operation will drain the device battery how the device will update the status of multiple operations? Can't the agent application use a single network call to update the multiple operations? Given below is the proposed operation management sequence diagram of CDM. [image: Inline image 1] Please share your ideas & suggestions upon this. Thanks, Lakshitha Harshan Software Engineer Mobile: *+94724423048* Email: hars...@wso2.com Blog : http://harshanliyanage.blogspot.com/ *WSO2, Inc. :** wso2.com <http://wso2.com/>* lean.enterprise.middleware.
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture