{"action":"created","issue":{"url":"https://api.github.com/repos/GraftJS/graft/issues/20","labels_url":"https://api.github.com/repos/GraftJS/graft/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/GraftJS/graft/issues/20/comments","events_url":"https://api.github.com/repos/GraftJS/graft/issues/20/events","html_url":"https://github.com/GraftJS/graft/issues/20","id":96756237,"number":20,"title":"question(s): overlap with messaging protocols (IoT)?","user":{"login":"boneskull","id":924465,"avatar_url":"https://avatars.githubusercontent.com/u/924465?v=3","gravatar_id":"","url":"https://api.github.com/users/boneskull","html_url":"https://github.com/boneskull","followers_url":"https://api.github.com/users/boneskull/followers","following_url":"https://api.github.com/users/boneskull/following{/other_user}","gists_url":"https://api.github.com/users/boneskull/gists{/gist_id}","starred_url":"https://api.github.com/users/boneskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boneskull/subscriptions","organizations_url":"https://api.github.com/users/boneskull/orgs","repos_url":"https://api.github.com/users/boneskull/repos","events_url":"https://api.github.com/users/boneskull/events{/privacy}","received_events_url":"https://api.github.com/users/boneskull/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-23T08:03:01Z","updated_at":"2015-07-23T11:03:27Z","closed_at":null,"body":"I just discovered this project, and my interest is sparked.  \r\n\r\nSay I wanted to get real-time data from a sensor and pipe it \"somewhere\".  Would Graft help me do that?\r\n\r\nI do understand libchan is more of a request/response thing, but the `README.md` also mentions it's possible to use it for asynchronous messaging (though, unfortunately, this is not elaborated upon).  \r\n\r\nI also understand a goal of Graft is ease integration with the browser.  This is something I may want to take advantage of, but for now let's just say my data is going to go \"somewhere\".\r\n\r\nIt seems like devices want to work over things like RabbitMQ, MQTT, etc.  I get the impression these protocols are popular because they are simple, and can be deployed on devices with memory/storage constraints.  \r\n\r\nBut it also seems (and I may be wrong here) that publishing the same message every *n* milliseconds (in the interest of providing \"real-time\" data) would be inefficient and potentially slow--especially since the published message would have to go through a broker.  Naturally, a stream or socket--with a direct connection--would make more sense, right?  And it'd make even more sense if the \"endpoint\" wasn't necessarily a browser, but another device?  \r\n\r\n* * *\r\n\r\nImagine some sort of setup wherein you were monitoring electricity usage.  If the electricity usage gets too high, you wish to reduce it.  Say you want to dim the lights by some function of the usage, and then brighten the lights again if the usage goes back down.\r\n\r\nSo perhaps you would have your meter open a socket to some server, which would then transform the data through your function, and pipe the data to a dimmer, which would reduce or increase the brightness as necessary.  \r\n\r\nBut perhaps then you're using too much juice and the lights are all but off.  At this point, you still need to reduce the power consumption.  So then somebody (not sure which microservice) would then tell the climate control system to take it easy.  And so on, and so forth.  \r\n\r\nOh, and you want to see a dashboard in a browser of all this craziness.\r\n\r\nIs libchan, and thus Graft, a solution?"},"comment":{"url":"https://api.github.com/repos/GraftJS/graft/issues/comments/124058597","html_url":"https://github.com/GraftJS/graft/issues/20#issuecomment-124058597","issue_url":"https://api.github.com/repos/GraftJS/graft/issues/20","id":124058597,"user":{"login":"mcdonnelldean","id":3625961,"avatar_url":"https://avatars.githubusercontent.com/u/3625961?v=3","gravatar_id":"","url":"https://api.github.com/users/mcdonnelldean","html_url":"https://github.com/mcdonnelldean","followers_url":"https://api.github.com/users/mcdonnelldean/followers","following_url":"https://api.github.com/users/mcdonnelldean/following{/other_user}","gists_url":"https://api.github.com/users/mcdonnelldean/gists{/gist_id}","starred_url":"https://api.github.com/users/mcdonnelldean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcdonnelldean/subscriptions","organizations_url":"https://api.github.com/users/mcdonnelldean/orgs","repos_url":"https://api.github.com/users/mcdonnelldean/repos","events_url":"https://api.github.com/users/mcdonnelldean/events{/privacy}","received_events_url":"https://api.github.com/users/mcdonnelldean/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T11:03:27Z","updated_at":"2015-07-23T11:03:27Z","body":"Hey,\r\n\r\nI wholeheartedly think you should jump on to Gitter too for this style of question, but to answer your question YES! Let me link you to a video that shows @mcollina using a little Texas Instruments sensortag to get real time info and control his slides with Graft.\r\n\r\nUltimately at a high level, you're just dealing with streams of data, because of this it makes 'real time' easier to reason about.\r\n\r\nhttps://www.youtube.com/watch?v=C_w1iNQMWlM\r\n"}}