Hi, In WSO2 IoT server , user (web browser) and device communication happen via central storage where we store operation responses in database. But for some operations like shell execution, logcat view we need to get data from devices in real time and we may not require to save them in database. *Problem* With current model client requires to wait until device come back and execute operation where devices periodically provide responses based on polling time. Responses will be saved in database so users required to send database calls repeatedly to retrieve the response.
*Solution* We need to have real time communication feature which allows device or client(web ui) to directly communicate with another device and retrieve response real time. MQTT based real time communication is proposed to solve above problem. Please find the design for real time communication of WSO2 IOT server. Initially I am working on proving remote shell command support. Following components will be used for real time communication. Web socket client - Client which has full duplex communication with IoT server for request and responses. Session Manager - This will be used to manage sessions and operations mapping. Operation Manager - For each real time operation , we will create operation using existing operation manager. Feature level Push Notification strategy - For each device type feature,users will able to set which push notifications strategy (transport) to use. There will be new configuration in <device-type>.xml in defining features. MQTT Push notification strategy - This will be used to send request from client to broker via publishing to topic. This can be replaced by any given transport implementation. Pull notification Subscriber- This will pull responses coming from broker and push to session manager to filter based on operation mappings. With this model,Any device type can send real time operation with wss://host/realtime/<device_type>/<device_id> secured web socket endpoint. Payload should include the operation code. Agent can subscribe to "<tenant_domain>/<device_type> /<device_id>/realtime/<operation>/request" topic and responses can be send to "<tenant_domain>/<device_type>/<device_id>/realtime/<operation>/response topic. Agent will receive payload with operation id and required to publish payload with operation id to mapping the response with session operation. Let me know your concerns. Thanks, Waruna -- Regards, Waruna Lakshitha Jayaweera Senior Software Engineer WSO2 Inc; http://wso2.com phone: +94713255198 <+94%2071%20325%205198> http://waruapz.blogspot.com/
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
