{"action":"created","issue":{"url":"https://api.github.com/repos/apache/flink/issues/1003","labels_url":"https://api.github.com/repos/apache/flink/issues/1003/labels{/name}","comments_url":"https://api.github.com/repos/apache/flink/issues/1003/comments","events_url":"https://api.github.com/repos/apache/flink/issues/1003/events","html_url":"https://github.com/apache/flink/pull/1003","id":100036239,"number":1003,"title":"Parameter Server: Distributed Key-Value store, using Akka messaging","user":{"login":"sachingoel0101","id":8874261,"avatar_url":"https://avatars.githubusercontent.com/u/8874261?v=3","gravatar_id":"","url":"https://api.github.com/users/sachingoel0101","html_url":"https://github.com/sachingoel0101","followers_url":"https://api.github.com/users/sachingoel0101/followers","following_url":"https://api.github.com/users/sachingoel0101/following{/other_user}","gists_url":"https://api.github.com/users/sachingoel0101/gists{/gist_id}","starred_url":"https://api.github.com/users/sachingoel0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sachingoel0101/subscriptions","organizations_url":"https://api.github.com/users/sachingoel0101/orgs","repos_url":"https://api.github.com/users/sachingoel0101/repos","events_url":"https://api.github.com/users/sachingoel0101/events{/privacy}","received_events_url":"https://api.github.com/users/sachingoel0101/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-10T10:58:58Z","updated_at":"2015-10-06T13:23:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/1003","html_url":"https://github.com/apache/flink/pull/1003","diff_url":"https://github.com/apache/flink/pull/1003.diff","patch_url":"https://github.com/apache/flink/pull/1003.patch"},"body":"This PR adds a basic parameter server implementation built using Akka messaging.\r\n*Interface:*\r\nAccess: Inside `RuntimeContext`\r\nOperations:\r\n1. `registerBatch(Key, Value)` and `registerAsync(Key, Value)` where key and value signify the Key-Value pair. \r\n2. `updateParameter(key, value)`\r\n3. `fetchParameter(key)`\r\n\r\n`Batch` strategy implies that all updates will be done after all registered clients have sent their updates.\r\n`Async` strategy implies any updates will be immediately applied.\r\n[I intend to support the Stale synchronous strategy too. But I want to get feedback on the overall design of the work so far.]\r\n\r\nMessaging and Actor systems:\r\n1. A server is started within the actor system of every task manager.\r\n2. All servers register with the Job Manager.\r\n3. Job Manager determines on which server a particular key-value pair will be stored and lets every registered server know as part of a regular heartbeat message.\r\n4. `RuntimeContext` employs a `Patterns.ask` and `Await` with infinite timeout to query the server on the same task manager.\r\n5. Servers forward their client's requests to the appropriate servers based on the key value.\r\n6. After performing the desired operations, results are sent back to the originating server which forwards them back to the client.\r\n\r\n* There is a scope for an implementation of fault-tolerance in this by maintaining two servers for every key-value pair. \r\n* In case a task has to restart, they can start from a different iteration number(by accessing a clock value), not having to send all earlier updates, because all the updates are applied to the Value guaranteedly.\r\n* There are two examples demonstrating the usage of Batch and Async strategies in Java examples package.\r\n* The travis build doesn't pass yet since there are some new messages from `ParameterServer` which need to be handled in the unit tests.\r\n\r\nI would love feedback about the overall design. \r\nThis is mostly inspired from a Machine learning Parameter server perspective, and doesn't touch the actual internals of Iterative tasks. Instead, all operations on the Parameter Server are blocking, and have an infinite timeout. However, there is an intrinsic failure involved with a maximum number of re-tries, in case the operations fail to succeed, inside the Server itself."},"comment":{"url":"https://api.github.com/repos/apache/flink/issues/comments/145854816","html_url":"https://github.com/apache/flink/pull/1003#issuecomment-145854816","issue_url":"https://api.github.com/repos/apache/flink/issues/1003","id":145854816,"user":{"login":"fhueske","id":2388347,"avatar_url":"https://avatars.githubusercontent.com/u/2388347?v=3","gravatar_id":"","url":"https://api.github.com/users/fhueske","html_url":"https://github.com/fhueske","followers_url":"https://api.github.com/users/fhueske/followers","following_url":"https://api.github.com/users/fhueske/following{/other_user}","gists_url":"https://api.github.com/users/fhueske/gists{/gist_id}","starred_url":"https://api.github.com/users/fhueske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhueske/subscriptions","organizations_url":"https://api.github.com/users/fhueske/orgs","repos_url":"https://api.github.com/users/fhueske/repos","events_url":"https://api.github.com/users/fhueske/events{/privacy}","received_events_url":"https://api.github.com/users/fhueske/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T13:23:47Z","updated_at":"2015-10-06T13:23:47Z","body":"@sachingoel0101 Sounds good! Can you open a new PR once you are done with the Parameter Server interface and close this PR? Thanks"}}