GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/893

    [FLINK-2329] [runtime] Introduces InstanceGateway for RPCs from Executions

    This PR replaces the direct `ActorRef` interaction from within `Executions` 
with an `InstanceGateway`. The `InstanceGateway` is an abstraction which 
encapsulates the RPC logic. This allows to more easily separate the `Execution` 
logic from the used Akka framework. 
    
    The default implementation `AkkaInstanceGateway` simply forwards the 
messages to the provided `ActorRef` which represents the remote instance.
    
    The `InstanceGateway` will allow us to add leader session IDs to all 
messages, which are sent to a `TaskManager`, transparently, without having to 
pass this information through the `ExecutionGraph` to the `Executions`.
    
    The additional abstraction layer allows to write more light-weight tests, 
too. As a consequence, many test cases which needed an `ActorSystem` to start a 
simple testing actor which mimicked the remote end, could now be simplified 
using a simple `InstanceGateway` implementation and thus getting rid off 
testing `ActorSystems`.
    
    In the wake of refactoring, I also replaced the 
`AkkaUtils.globalExecutionContext` with a non global one. At the moment, the 
`JobManager` and the `TaskManager` both start a single `ForkJoinPool` which is 
used as the `ExecutionContext` for all futures and future handlers. The default 
parallelism is the number of cores available on the system. It would now also 
be possible to use even more fine grained `ExecutionContexts`, e.g. giving each 
`ExecutionGraph` a distinct `ExecutionContext`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink leaderSessionID

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/893.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #893
    
----
commit 43e15aa73dde20166cd9973cd5418fe352ea02d4
Author: Till Rohrmann <[email protected]>
Date:   2015-07-07T09:41:44Z

    [FLINK-2329] [runtime] Introduces InstanceGateway as an abstraction to 
communicate with the TaskManager. Replaces AkkaUtils.globalExecutionContext 
with instance dependent ExecutionContext.
    
    Add comments for newly introduced classes

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to