{"action":"created","issue":{"url":"https://api.github.com/repos/meetecho/janus-gateway/issues/281","labels_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/281/comments","events_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/281/events","html_url":"https://github.com/meetecho/janus-gateway/pull/281","id":94740935,"number":281,"title":"First version of Janus with modular/pluggable transports","user":{"login":"lminiero","id":3684796,"avatar_url":"https://avatars.githubusercontent.com/u/3684796?v=3","gravatar_id":"","url":"https://api.github.com/users/lminiero","html_url":"https://github.com/lminiero","followers_url":"https://api.github.com/users/lminiero/followers","following_url":"https://api.github.com/users/lminiero/following{/other_user}","gists_url":"https://api.github.com/users/lminiero/gists{/gist_id}","starred_url":"https://api.github.com/users/lminiero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lminiero/subscriptions","organizations_url":"https://api.github.com/users/lminiero/orgs","repos_url":"https://api.github.com/users/lminiero/repos","events_url":"https://api.github.com/users/lminiero/events{/privacy}","received_events_url":"https://api.github.com/users/lminiero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-13T14:58:59Z","updated_at":"2015-07-16T14:06:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/meetecho/janus-gateway/pulls/281","html_url":"https://github.com/meetecho/janus-gateway/pull/281","diff_url":"https://github.com/meetecho/janus-gateway/pull/281.diff","patch_url":"https://github.com/meetecho/janus-gateway/pull/281.patch"},"body":"This is a HUGE patch, as it introduces some key changes to the core. Specifically, it removes all transport related stuff from the core, and moves it to external modules, pretty much as we already do for media management. This means that each transport is in turn implemented as a module/plugin: right now, for instance, there are three modules, that implement support for HTTP, WebSockets and RabbitMQ respectively, that is what was previously baked in in the core itself. Nothing is supposed to change as far as clients are concerned: every client should be able to talk to Janus exactly as it did before, no change needed.\r\n\r\nThis is an important change, as it will allow, in the future, to much more easily add support for additional transports for the Janus API, e.g., nanomsg, Jabber, Matrix or whatever else comes to mind. The core then handles requests and sends responses/events to clients through these plugins. Besides, this patch will also allow the usage of admin API requests over other transports: this version still only exposes it over HTTP, but the bricks are all there so making the admin API available over WS and RMQ will be straightforward.\r\n\r\nI encourage you to play with this as much as possible, as the idea is to make this approach the base one for upcoming versions of Janus: besides, as anticipated, nothing changes in the way you talked to Janus, so it should be a transparent switch. We did make some functional tests and everything seems to work with the protocols we already supported: that said, I don't expect this to already be working perfectly, and so your feedback on this would be precious (especially considering that, as anticipated, the idea is to merge this as soon as it is stable).\r\n\r\nA few notes if you're interested in testing this:\r\n\r\n* if you're using WebSockets, you'll have to recompile libwebsockets with -fPIC support (see the branch README.md)\r\n* all transport related settings are now part of the respective modules; this means that, for instance, the webserver configuration is not in janus.cfg anymore, but in the related janus.transport.http.cfg configuration file, and same thing for WebSockets and RabbitMQ;\r\n* for the same reason, several command-line parameters that were related to API transports have been removed, and so if you were relying on them you should move the related values to the configuration file instead.\r\n\r\nFinally, if rather than just using it you're interested in adding support for a new transport protocol yoyurself, I also encourage you to look into how the API is conceived, how you can implement it, and so on, mainly as we're interested in figuring out if all the required info and the proper callbacks/methods you'd require are available. The current transport API was conceived with the existing protocols in mind (HTTP/WS/RMQ) but should be flexible enough to cover any new addition: if that's not the case, we'd be glad to know so that we can reframe it accordingly.\r\n\r\nLooking forward to your feedback and notes!"},"comment":{"url":"https://api.github.com/repos/meetecho/janus-gateway/issues/comments/121967018","html_url":"https://github.com/meetecho/janus-gateway/pull/281#issuecomment-121967018","issue_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/281","id":121967018,"user":{"login":"saghul","id":317464,"avatar_url":"https://avatars.githubusercontent.com/u/317464?v=3","gravatar_id":"","url":"https://api.github.com/users/saghul","html_url":"https://github.com/saghul","followers_url":"https://api.github.com/users/saghul/followers","following_url":"https://api.github.com/users/saghul/following{/other_user}","gists_url":"https://api.github.com/users/saghul/gists{/gist_id}","starred_url":"https://api.github.com/users/saghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghul/subscriptions","organizations_url":"https://api.github.com/users/saghul/orgs","repos_url":"https://api.github.com/users/saghul/repos","events_url":"https://api.github.com/users/saghul/events{/privacy}","received_events_url":"https://api.github.com/users/saghul/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T14:06:24Z","updated_at":"2015-07-16T14:06:24Z","body":"@lminiero I think you have a version which has this patch: https://github.com/warmcat/libwebsockets/commit/f1b125442be619c43bff45791a3f6fd5726099b5, which got partially reverted here: https://github.com/warmcat/libwebsockets/commit/26fd0d260353a02bc435528126b81ae165cfbacb\r\n\r\nGiven that the bug was in the repo for 7 days, I'd go for not working around it."}}