incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon" <edwardy...@apache.org>
Subject Re: Messaging Interface
Date Fri, 03 Feb 2012 00:45:59 GMT
I prefer the Writable.

On Thu, Feb 2, 2012 at 8:49 PM, Thomas Jungblut
<thomas.jungblut@googlemail.com> wrote:
> Hi all,
>
> I refactored the messaging in 0.3.0 and changed this from an inteface to an
> abstract base class.
> Currently it is fine, but I feel that the user is too restricted in using
> messages.
> You have this strict structure of tag and data. I think we should widen the
> messages to just Messagable .
> If we want to have the freedom to add additional things, we should extend
> Messagable from Writable and use this for it.
>
> So send may look like this:
>
> public final void send(String peerName, Messagable msg)
>
>
> and getCurrentMessage:
>
>  public final Messagable getCurrentMessage()
>
>
> However, I am not really happy that we return Messagable (requires casting
> and stuff).
> For the usecases of specific tagging we can add the getTag() method to the
> Messagable interface.
> What type should this be then? I mean, String would be quite a large
> overhead. Integer might not be useful.
>
> Or should we widen this to Writable instead? So you can send things you've
> read from sequencefiles directly to other tasks.
>
> What do you think? I am still not aware of how it should look like. Or are
> you satisfied with the current messaging?
>
> --
> Thomas Jungblut
> Berlin <thomas.jungblut@gmail.com>



-- 
Best Regards, Edward J. Yoon
@eddieyoon

Mime
View raw message