{"action":"created","issue":{"url":"https://api.github.com/repos/roboconf/roboconf-platform/issues/279","labels_url":"https://api.github.com/repos/roboconf/roboconf-platform/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/roboconf/roboconf-platform/issues/279/comments","events_url":"https://api.github.com/repos/roboconf/roboconf-platform/issues/279/events","html_url":"https://github.com/roboconf/roboconf-platform/issues/279","id":64267606,"number":279,"title":"Create a HTTP messaging implementation","user":{"login":"vincent-zurczak","id":1104790,"avatar_url":"https://avatars.githubusercontent.com/u/1104790?v=3","gravatar_id":"","url":"https://api.github.com/users/vincent-zurczak","html_url":"https://github.com/vincent-zurczak","followers_url":"https://api.github.com/users/vincent-zurczak/followers","following_url":"https://api.github.com/users/vincent-zurczak/following{/other_user}","gists_url":"https://api.github.com/users/vincent-zurczak/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent-zurczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent-zurczak/subscriptions","organizations_url":"https://api.github.com/users/vincent-zurczak/orgs","repos_url":"https://api.github.com/users/vincent-zurczak/repos","events_url":"https://api.github.com/users/vincent-zurczak/events{/privacy}","received_events_url":"https://api.github.com/users/vincent-zurczak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/roboconf/roboconf-platform/milestones/5","html_url":"https://github.com/roboconf/roboconf-platform/milestones/0.5","labels_url":"https://api.github.com/repos/roboconf/roboconf-platform/milestones/5/labels","id":1020893,"number":5,"title":"0.5","description":"The version 0.5 of the Roboconf platform","creator":{"login":"vincent-zurczak","id":1104790,"avatar_url":"https://avatars.githubusercontent.com/u/1104790?v=3","gravatar_id":"","url":"https://api.github.com/users/vincent-zurczak","html_url":"https://github.com/vincent-zurczak","followers_url":"https://api.github.com/users/vincent-zurczak/followers","following_url":"https://api.github.com/users/vincent-zurczak/following{/other_user}","gists_url":"https://api.github.com/users/vincent-zurczak/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent-zurczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent-zurczak/subscriptions","organizations_url":"https://api.github.com/users/vincent-zurczak/orgs","repos_url":"https://api.github.com/users/vincent-zurczak/repos","events_url":"https://api.github.com/users/vincent-zurczak/events{/privacy}","received_events_url":"https://api.github.com/users/vincent-zurczak/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":5,"state":"open","created_at":"2015-03-13T20:07:47Z","updated_at":"2015-07-03T16:32:18Z","due_on":"2015-09-21T22:00:00Z","closed_at":null},"comments":1,"created_at":"2015-03-25T13:25:18Z","updated_at":"2015-07-07T11:57:50Z","closed_at":null,"body":"Today, installing Roboconf means installing the DM, a messaging server (RabbitMQ) and agents. And it is necessary for the messaging server to be available at a public IP. This can be a turn-off for new users that would just want to try Roboconf.\r\n\r\nThe use of a real messaging server will remain necessary for huge deployments or those with high-frequency reconfigurations. But not for new users. Instead, the DM and the agent could have a messaging implementation that rely on HTTP exchanges.\r\n\r\nTo keep this mode simple, only DM-agents exchanges would be allowed.\r\nNo agent-agent communication, the DM will act as a proxy for these exchanges (besides, it holds a snapshot of all the states). Obviously, with this mode, the DM becomes mandatory. Stopping it means the agents will not be able to get new information. But this is acceptable for new users and it will ease the installation of Roboconf."},"comment":{"url":"https://api.github.com/repos/roboconf/roboconf-platform/issues/comments/119180892","html_url":"https://github.com/roboconf/roboconf-platform/issues/279#issuecomment-119180892","issue_url":"https://api.github.com/repos/roboconf/roboconf-platform/issues/279","id":119180892,"user":{"login":"vincent-zurczak","id":1104790,"avatar_url":"https://avatars.githubusercontent.com/u/1104790?v=3","gravatar_id":"","url":"https://api.github.com/users/vincent-zurczak","html_url":"https://github.com/vincent-zurczak","followers_url":"https://api.github.com/users/vincent-zurczak/followers","following_url":"https://api.github.com/users/vincent-zurczak/following{/other_user}","gists_url":"https://api.github.com/users/vincent-zurczak/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent-zurczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent-zurczak/subscriptions","organizations_url":"https://api.github.com/users/vincent-zurczak/orgs","repos_url":"https://api.github.com/users/vincent-zurczak/repos","events_url":"https://api.github.com/users/vincent-zurczak/events{/privacy}","received_events_url":"https://api.github.com/users/vincent-zurczak/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T11:57:50Z","updated_at":"2015-07-07T11:57:50Z","body":"OK, here are some ideas...\r\n\r\n**Basic Solution**\r\n\r\nAgents implement a simple REST API, with only one operation: **sendMessage**.  \r\nIt takes a single string in parameter with the POSt method. This string is a serialized message encoded with a base 64 implementation.\r\n\r\nAgents also manage web sockets.  \r\nThe DM connects to the REST API to send messages to the agent. And the agent uses web sockets to send back messages to the DM.\r\n\r\n**Open Topics**\r\n\r\n* How does the DM know the IP address of the agent?\r\n* What are the required ports?\r\n* How to handle reconnection?\r\n* How to deal with in-memory (local) and Docker agents?\r\n\r\n**Handle reconnections**\r\n\r\nWhen a web socket is closed, the DM should try to reconnect immediately after. If it fails, the DM will ty to reconnect very 3 minutes.\r\n\r\n** Local agents\r\n\r\nTo prevent conflicts between several agents running on the same host (e.g. in-memory and embedded), we can use a pre-defined port and append the scoped'instance path to the URL. Therefore, the REST API of agent **/vm** will be available at **:port/rbcf-agent/vm**.\r\n\r\n**Get the agent's IP'address**\r\n\r\nUntil now, we assumed the agent was the best solution to get its IP address and send it to the DM. However, we could directly get it from the IaaS API. The agent can keep on getting it and it can keep on sending it to the DM. However, we could upgrade the target API to find the IP address of a machine.\r\n\r\nWDYT?"}}