{"action":"created","issue":{"url":"https://api.github.com/repos/englishman/throttle/issues/5","labels_url":"https://api.github.com/repos/englishman/throttle/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/englishman/throttle/issues/5/comments","events_url":"https://api.github.com/repos/englishman/throttle/issues/5/events","html_url":"https://github.com/englishman/throttle/issues/5","id":129914051,"number":5,"title":"Redesign API and impl","user":{"login":"englishman","id":1883572,"avatar_url":"https://avatars.githubusercontent.com/u/1883572?v=3","gravatar_id":"","url":"https://api.github.com/users/englishman","html_url":"https://github.com/englishman","followers_url":"https://api.github.com/users/englishman/followers","following_url":"https://api.github.com/users/englishman/following{/other_user}","gists_url":"https://api.github.com/users/englishman/gists{/gist_id}","starred_url":"https://api.github.com/users/englishman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/englishman/subscriptions","organizations_url":"https://api.github.com/users/englishman/orgs","repos_url":"https://api.github.com/users/englishman/repos","events_url":"https://api.github.com/users/englishman/events{/privacy}","received_events_url":"https://api.github.com/users/englishman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-29T23:50:06Z","updated_at":"2016-01-30T00:11:58Z","closed_at":null,"body":"- impl should be thread safe\r\n- wait loops must be avoid \r\n- API should support different usage scenarios and implementation strategies\r\n- unblocking is preferable\r\n- demo framework should show _somehow_ throttle events producing stream characteristics\r\n- should keep in mind executed task may takes long time itself. So should avoid this time influence for it work and scheduling\r\n- should allows to get (unblocking too) info about resource availability at this tile???\r\n- ability for client to know when its task was executed\r\n- avoid situation: client asks resource access but doesn't do real resource usage\r\n\r\nstrategy V1: \r\nrate=4 permits/s\r\nreq at T, we permit access\r\nreq at T+0.001s, we make it wait and we send it at T+0.25s\r\nreq at T+0.1s, we make it wait and send it at T+0.5s\r\nreq at T+0.8s, we make it wait and send it at T+1s\r\n\r\nstrategy V2: \r\nit covers scenario when you don't have request for some time, and then you get more (peek), in this case V1 will start sending with a normal  rate, but V2 will first allow a burst (send B request right away) and then continue with normal rate to compensate for previous silence (up till burst size)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/englishman/throttle/issues/comments/177027537","html_url":"https://github.com/englishman/throttle/issues/5#issuecomment-177027537","issue_url":"https://api.github.com/repos/englishman/throttle/issues/5","id":177027537,"user":{"login":"englishman","id":1883572,"avatar_url":"https://avatars.githubusercontent.com/u/1883572?v=3","gravatar_id":"","url":"https://api.github.com/users/englishman","html_url":"https://github.com/englishman","followers_url":"https://api.github.com/users/englishman/followers","following_url":"https://api.github.com/users/englishman/following{/other_user}","gists_url":"https://api.github.com/users/englishman/gists{/gist_id}","starred_url":"https://api.github.com/users/englishman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/englishman/subscriptions","organizations_url":"https://api.github.com/users/englishman/orgs","repos_url":"https://api.github.com/users/englishman/repos","events_url":"https://api.github.com/users/englishman/events{/privacy}","received_events_url":"https://api.github.com/users/englishman/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T00:11:58Z","updated_at":"2016-01-30T00:11:58Z","body":"impl. strategy V1: \r\nrate=4 permits/s\r\nreq at T, we permit access\r\nreq at T+0.001s, we make it wait and we send it at T+0.25s\r\nreq at T+0.1s, we make it wait and send it at T+0.5s\r\nreq at T+0.8s, we make it wait and send it at T+1s"}}