{"action":"created","issue":{"url":"https://api.github.com/repos/mrRay/OSCQueryProposal/issues/21","labels_url":"https://api.github.com/repos/mrRay/OSCQueryProposal/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/mrRay/OSCQueryProposal/issues/21/comments","events_url":"https://api.github.com/repos/mrRay/OSCQueryProposal/issues/21/events","html_url":"https://github.com/mrRay/OSCQueryProposal/issues/21","id":63457437,"number":21,"title":"First stab at an implementation of the server","user":{"login":"jcelerier","id":2772730,"avatar_url":"https://avatars.githubusercontent.com/u/2772730?v=3","gravatar_id":"","url":"https://api.github.com/users/jcelerier","html_url":"https://github.com/jcelerier","followers_url":"https://api.github.com/users/jcelerier/followers","following_url":"https://api.github.com/users/jcelerier/following{/other_user}","gists_url":"https://api.github.com/users/jcelerier/gists{/gist_id}","starred_url":"https://api.github.com/users/jcelerier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcelerier/subscriptions","organizations_url":"https://api.github.com/users/jcelerier/orgs","repos_url":"https://api.github.com/users/jcelerier/repos","events_url":"https://api.github.com/users/jcelerier/events{/privacy}","received_events_url":"https://api.github.com/users/jcelerier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-21T21:44:28Z","updated_at":"2015-03-26T10:56:50Z","closed_at":null,"body":"Hello,\r\n\r\nHere (https://github.com/jcelerier/coppa) is a tentative attempt (about 8hrs of work so not very advanced, and quite messy) at an implementation of OSCQuery using websockets.\r\nThis is done in pure C++14 (mostly for fun) (and requires boost, and the latest version of clang to build). It's header-only. \r\n\r\nWhat works : \r\n- Adding parameters \r\n- Querying the whole namespace, single paths, and attributes of parameters via http and getting a reply in json.\r\n\r\nWhat isn't done :\r\n- Units. I'm lazy.\r\n- Certainly a ton of thing that I forgot.\r\n- Return of HTTP error codes.\r\n- Listening\r\n- path_changed\r\n\r\nWhat differs :\r\n- The json keys are in lower case because I was starting to get a carpal syndrome channel while keeping Maj down.\r\n- JSON requires the '/' character in strings to be escaped. So in the full path it looks like \"\\/a\\/b\\/c\".\r\n- '?' instead of '#' in queries : browsers don't send what's after the '#' in the HTTP request, hence it's a pain to test.\r\n\r\nNotwithstanding the fact that the json part in `coppa.oscquery.hpp`  is an exercice in ugliness, it should give a quick example (overall it's < 600 lines of code) in order to go forward with the spec.\r\n\r\nAlso, I worked on something generic enough for being able to adapt to other existing query protocols (like Minuit), with a mostly compile-time way to define parameters from simple attributes."},"comment":{"url":"https://api.github.com/repos/mrRay/OSCQueryProposal/issues/comments/86452056","html_url":"https://github.com/mrRay/OSCQueryProposal/issues/21#issuecomment-86452056","issue_url":"https://api.github.com/repos/mrRay/OSCQueryProposal/issues/21","id":86452056,"user":{"login":"jcelerier","id":2772730,"avatar_url":"https://avatars.githubusercontent.com/u/2772730?v=3","gravatar_id":"","url":"https://api.github.com/users/jcelerier","html_url":"https://github.com/jcelerier","followers_url":"https://api.github.com/users/jcelerier/followers","following_url":"https://api.github.com/users/jcelerier/following{/other_user}","gists_url":"https://api.github.com/users/jcelerier/gists{/gist_id}","starred_url":"https://api.github.com/users/jcelerier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcelerier/subscriptions","organizations_url":"https://api.github.com/users/jcelerier/orgs","repos_url":"https://api.github.com/users/jcelerier/repos","events_url":"https://api.github.com/users/jcelerier/events{/privacy}","received_events_url":"https://api.github.com/users/jcelerier/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T10:56:50Z","updated_at":"2015-03-26T10:56:50Z","body":"> would you mind if i linked to your repos in the proposal?\r\nPlease do! However this is not even alpha-quality.\r\n\r\n> i think that’s pretty much right in line with the proposal?\r\n\r\nI'm referring to this part : \r\n> As mentioned earlier, the \"query string\" part of a URL can be used pass variables/parameters from client to server- a client could use this to request that the server start/stop streaming values to it (http://ip:port/abs/path?listen=true). \r\n\r\nThe problem here is that when the server receives a \"traditional\" http request, the connection is not meant to be lasting, but only to be long enough to send a single reply to the client. If one wants to have a lasting connection between client and server (so that the server can keep track of which client is listening what), the websocket protocol should be used to send and receive messages. From the point of view of the code, this is very similar, but it just won't be introspectable by just looking at the http GET part. \r\nBut I've been fiddling with websockets for only about a week so maybe I'm telling tons of incorrect things based on the assumptions taken in the lib that I used :)"}}