{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-iot/gateway/issues/1088","repository_url":"https://api.github.com/repos/mozilla-iot/gateway","labels_url":"https://api.github.com/repos/mozilla-iot/gateway/issues/1088/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-iot/gateway/issues/1088/comments","events_url":"https://api.github.com/repos/mozilla-iot/gateway/issues/1088/events","html_url":"https://github.com/mozilla-iot/gateway/issues/1088","id":329808760,"node_id":"MDU6SXNzdWUzMjk4MDg3NjA=","number":1088,"title":"Question: Do the Gateway have best practice to provide things status to third party service?","user":{"login":"sogaani","id":20137651,"node_id":"MDQ6VXNlcjIwMTM3NjUx","avatar_url":"https://avatars0.githubusercontent.com/u/20137651?v=4","gravatar_id":"","url":"https://api.github.com/users/sogaani","html_url":"https://github.com/sogaani","followers_url":"https://api.github.com/users/sogaani/followers","following_url":"https://api.github.com/users/sogaani/following{/other_user}","gists_url":"https://api.github.com/users/sogaani/gists{/gist_id}","starred_url":"https://api.github.com/users/sogaani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sogaani/subscriptions","organizations_url":"https://api.github.com/users/sogaani/orgs","repos_url":"https://api.github.com/users/sogaani/repos","events_url":"https://api.github.com/users/sogaani/events{/privacy}","received_events_url":"https://api.github.com/users/sogaani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-06T10:29:25Z","updated_at":"2018-06-08T13:01:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"My google assistant service needs to provide thing poperty value via [report-state API](https://developers.google.com/actions/smarthome/report-state), when thing property is changed.\r\n\r\nI think the Gateway have three pattern to report thing poperty value.\r\n* Polling: third party service poll the things property API.\r\n* WebSocket: third party service connect things websocket and get `onPropertyChanged` event.\r\n* Addon: the Gateway Install the addon which connet local things websocket. When the addon get `onPropertyChanged` event call third party service API with property value.\r\n\r\nI'm sure that `Polling` and `WebSocket` are official way to get property value. But, I think that they have some issue when they are used by third party service which provides service to many Gateways.\r\n* Polling: waste third party service and tunnel service resource. It is difficult to scale out third party service, because third party service should manage that which server should connect which gateway. \r\n* WebSocket: waist third party service and tunnel service resource because third party service have to keep connection per Gateway. It is difficult to scale out third party service, because third party service should manage that which server should connect which gateway. \r\n\r\nI think that `Addon` pattern can resolve above issues, because watching property process is distributed per Gateway and third party service resource is used only when property is changed.\r\nMy concern is whether addon not providing device will be permitted.\r\n\r\nWhich pattern do you think reasonable?\r\n\r\nNote: I'm not professional about web services, so there is possibility to have better solution."},"comment":{"url":"https://api.github.com/repos/mozilla-iot/gateway/issues/comments/395753789","html_url":"https://github.com/mozilla-iot/gateway/issues/1088#issuecomment-395753789","issue_url":"https://api.github.com/repos/mozilla-iot/gateway/issues/1088","id":395753789,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTc1Mzc4OQ==","user":{"login":"sogaani","id":20137651,"node_id":"MDQ6VXNlcjIwMTM3NjUx","avatar_url":"https://avatars0.githubusercontent.com/u/20137651?v=4","gravatar_id":"","url":"https://api.github.com/users/sogaani","html_url":"https://github.com/sogaani","followers_url":"https://api.github.com/users/sogaani/followers","following_url":"https://api.github.com/users/sogaani/following{/other_user}","gists_url":"https://api.github.com/users/sogaani/gists{/gist_id}","starred_url":"https://api.github.com/users/sogaani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sogaani/subscriptions","organizations_url":"https://api.github.com/users/sogaani/orgs","repos_url":"https://api.github.com/users/sogaani/repos","events_url":"https://api.github.com/users/sogaani/events{/privacy}","received_events_url":"https://api.github.com/users/sogaani/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T13:01:58Z","updated_at":"2018-06-08T13:01:58Z","author_association":"CONTRIBUTOR","body":"> I'd be interested to do some scalability testing on a cloud service like this to find out whether keeping open a WebSocket per gateway is really a problem, and whether it's actually less efficient than the gateway sending individual POST requests to the cloud.\r\n\r\nIt's great. I will be waiting for result.\r\n\r\nPerhaps, wot member in Oracle may have opinion. They seems to use POST request pushing wot state in [this](https://github.com/w3c/wot/blob/master/plugfest/2018-prague/docs/Oracle%2Bnode-wot_Integration_concept.pdf).\r\n\r\n> Can you implement a Google Assistant Action without implementing the report-state API?\r\n@benfrancis No I can't. I should implement the report-state API. They requested me implementing the report-state API, because they added policies when I passed QA test.\r\nI already implemented the report-state API with polling, and be Inquiring at Google QA team about the report-state API criteria, how long delay permitted. If they permit long delay, I will serve the Google Assistant with polling for now.\r\n\r\n\r\n"}}
{"actor":{"display_login":"sogaani"}}