On Mon, Apr 20, 2015 at 6:05 PM Phil Steitz <phil.ste...@gmail.com> wrote:
>
>
> There are lots of ways to allow distributed processes to share
> common data.  Spark has a very nice construct called a Resilient
> Distributed Dataset (RDD) designed for exactly this purpose.
>

To take the abstraction layer a step further (and maybe help improve
performance), you may just introduce a ComputationListener interface:

public interface ComputationListener<T> {
  void onSuccess(String id, T data);
  void onFailure(String id, Exception cause);
}

The "id" would basically be some sort of correlation id that you could use
to tie the response with the request.  You can use whatever you want here
obviously, but you get the idea.

Reply via email to