{"action":"created","issue":{"url":"https://api.github.com/repos/ging/licode/issues/362","labels_url":"https://api.github.com/repos/ging/licode/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/ging/licode/issues/362/comments","events_url":"https://api.github.com/repos/ging/licode/issues/362/events","html_url":"https://github.com/ging/licode/issues/362","id":112129006,"number":362,"title":"sending async parallel requests produces error: 401 Unauthorized","user":{"login":"AngelKyriako","id":2430680,"avatar_url":"https://avatars.githubusercontent.com/u/2430680?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelKyriako","html_url":"https://github.com/AngelKyriako","followers_url":"https://api.github.com/users/AngelKyriako/followers","following_url":"https://api.github.com/users/AngelKyriako/following{/other_user}","gists_url":"https://api.github.com/users/AngelKyriako/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelKyriako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelKyriako/subscriptions","organizations_url":"https://api.github.com/users/AngelKyriako/orgs","repos_url":"https://api.github.com/users/AngelKyriako/repos","events_url":"https://api.github.com/users/AngelKyriako/events{/privacy}","received_events_url":"https://api.github.com/users/AngelKyriako/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-19T11:53:59Z","updated_at":"2015-11-12T17:00:59Z","closed_at":null,"body":"We are creating a virtual class application using licode and I am against an issue during implementing the unit tests for the multimedia routes based on licode.\r\n\r\nAssuming I have written a function (createRoomFunc) that creates a licode room through the nuve client library.\r\n\r\nThe following procedure that sends each request in series will work, since it requests the server again after a request has sent its corresponding response:\r\n```\r\n    describe('licode API create', function () {   \r\n      it('should create a few rooms successfully', function (done) {   \r\n        async.series([   \r\n          function (next) {   \r\n            createRoomFunc('testCreate', next);   \r\n          },   \r\n          function (next) {    \r\n            createRoomFunc('testCreate2', next);   \r\n          },   \r\n          function (next) {   \r\n            createRoomFunc('testCreate3', next);   \r\n          },   \r\n          function (next) {   \r\n            createRoomFunc('testCreate4', next);\r\n          },\r\n          function (next) {\r\n            createRoomFunc('testCreate5', next);\r\n          }\r\n        ], done);\r\n      });\r\n    });\r\n```\r\n\r\nHowever if the same code snippet is used with async.parallel it will crash sending back a 401 error message.\r\n\r\nAny feedback on this aspect ?\r\nI will keep the issue updated as I work around it "},"comment":{"url":"https://api.github.com/repos/ging/licode/issues/comments/156166503","html_url":"https://github.com/ging/licode/issues/362#issuecomment-156166503","issue_url":"https://api.github.com/repos/ging/licode/issues/362","id":156166503,"user":{"login":"AngelKyriako","id":2430680,"avatar_url":"https://avatars.githubusercontent.com/u/2430680?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelKyriako","html_url":"https://github.com/AngelKyriako","followers_url":"https://api.github.com/users/AngelKyriako/followers","following_url":"https://api.github.com/users/AngelKyriako/following{/other_user}","gists_url":"https://api.github.com/users/AngelKyriako/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelKyriako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelKyriako/subscriptions","organizations_url":"https://api.github.com/users/AngelKyriako/orgs","repos_url":"https://api.github.com/users/AngelKyriako/repos","events_url":"https://api.github.com/users/AngelKyriako/events{/privacy}","received_events_url":"https://api.github.com/users/AngelKyriako/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T17:00:59Z","updated_at":"2015-11-12T17:00:59Z","body":"Don't you think that this causes a performance issue for a good number of concurrent users on a website that uses licode as its webrtc library.\r\n\r\nWouldn't it be easier to have optional parameters to enable or disable the mechanism.\r\nTo use queues to avoid bursts is of course a good thing, but being mandatory seems a bit rough.\r\nFor some websites that extra validation layer could be useful while for others not.\r\nHow a website would like to handle concurrent request should be configured by itself, don't you think ?\r\n\r\nFurthermore the message: '401 Unauthorized' is not descriptive enough for this scenario. In a future update it would be helpful for devs to receive something like 'concurrent requests are not allowed' or whatever else makes sense.\r\n\r\nFinally, is I there a reason to use this security mechanism not only for write but for read requests as well ?"}}