{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4854","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4854/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4854/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4854/events","html_url":"https://github.com/hazelcast/hazelcast/pull/4854","id":63412145,"number":4854,"title":"Pulled out InvocationRegistry","user":{"login":"pveentjer","id":105243,"avatar_url":"https://avatars.githubusercontent.com/u/105243?v=3","gravatar_id":"","url":"https://api.github.com/users/pveentjer","html_url":"https://github.com/pveentjer","followers_url":"https://api.github.com/users/pveentjer/followers","following_url":"https://api.github.com/users/pveentjer/following{/other_user}","gists_url":"https://api.github.com/users/pveentjer/gists{/gist_id}","starred_url":"https://api.github.com/users/pveentjer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveentjer/subscriptions","organizations_url":"https://api.github.com/users/pveentjer/orgs","repos_url":"https://api.github.com/users/pveentjer/repos","events_url":"https://api.github.com/users/pveentjer/events{/privacy}","received_events_url":"https://api.github.com/users/pveentjer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20Core","name":"Team: Core","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55","html_url":"https://github.com/hazelcast/hazelcast/milestones/3.5","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55/labels","id":819785,"number":55,"title":"3.5","description":null,"creator":{"login":"sancar","id":570462,"avatar_url":"https://avatars.githubusercontent.com/u/570462?v=3","gravatar_id":"","url":"https://api.github.com/users/sancar","html_url":"https://github.com/sancar","followers_url":"https://api.github.com/users/sancar/followers","following_url":"https://api.github.com/users/sancar/following{/other_user}","gists_url":"https://api.github.com/users/sancar/gists{/gist_id}","starred_url":"https://api.github.com/users/sancar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancar/subscriptions","organizations_url":"https://api.github.com/users/sancar/orgs","repos_url":"https://api.github.com/users/sancar/repos","events_url":"https://api.github.com/users/sancar/events{/privacy}","received_events_url":"https://api.github.com/users/sancar/received_events","type":"User","site_admin":false},"open_issues":98,"closed_issues":270,"state":"open","created_at":"2014-10-09T13:04:53Z","updated_at":"2015-03-23T09:07:32Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-03-21T14:36:00Z","updated_at":"2015-03-23T09:18:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4854","html_url":"https://github.com/hazelcast/hazelcast/pull/4854","diff_url":"https://github.com/hazelcast/hazelcast/pull/4854.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/4854.patch"},"body":"Reducing complexity on invocation due to back pressure. This is one of the side effects I want to get merged before the PR gets too big.\r\n\r\nSo I pulled out the InvocationRegistry; takes care of registration/deregistration/notification of of invocations. This used to be a responsibility of the OperationServiceImpl. Also the ResponsePacketHandler has been simplified since the registry take care of most of the logic.\r\n\r\nAnother thing that is introduced is the ErrorResponse. In case of an exception instead of using the NormalResponse and then dealing with the content, the ErrorResponse is now uses so that it is immediately clear that error logic needs to be executed (e.g. retry). This simplifies the logic in registry and invocation.\r\n\r\nThe idea for the simplified back pressure is that the InvocationRegistry is going to get a capacity of maximum number of remote invocations, e.g. 10k (configurable). This should be more than enough for most users since they won't have more than 1 invocation per thread, so a few hundred at most. As soon as the InvocationRegistry runs out of free invocations, then some exponential backoff can be done. I need this better approach to deal better with the new async api's Ali added."},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments/84907818","html_url":"https://github.com/hazelcast/hazelcast/pull/4854#issuecomment-84907818","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4854","id":84907818,"user":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars.githubusercontent.com/u/158619?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrinot","html_url":"https://github.com/jerrinot","followers_url":"https://api.github.com/users/jerrinot/followers","following_url":"https://api.github.com/users/jerrinot/following{/other_user}","gists_url":"https://api.github.com/users/jerrinot/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrinot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrinot/subscriptions","organizations_url":"https://api.github.com/users/jerrinot/orgs","repos_url":"https://api.github.com/users/jerrinot/repos","events_url":"https://api.github.com/users/jerrinot/events{/privacy}","received_events_url":"https://api.github.com/users/jerrinot/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T09:18:46Z","updated_at":"2015-03-23T09:18:46Z","body":":+1: "}}