incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommaso Teofili <tommaso.teof...@gmail.com>
Subject Re: Messaging Interface
Date Fri, 03 Feb 2012 13:52:46 GMT
+1, nice API improvement.
Tommaso

2012/2/3 Thomas Jungblut <thomas.jungblut@googlemail.com>

> Yes, this sounds to me reasonable as well.
> Other opinions? Otherwise I am filing a jira for that.
>
> 2012/2/3 Edward J. Yoon <edwardyoon@apache.org>
>
> > I think, we may want to change like <? extends Writable, ? extends
> > Writable>.
> >
> > On Fri, Feb 3, 2012 at 9:45 AM, Edward J. Yoon <edwardyoon@apache.org>
> > wrote:
> > > 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
> >
> >
> >
> > --
> > Best Regards, Edward J. Yoon
> > @eddieyoon
> >
>
>
>
> --
> Thomas Jungblut
> Berlin <thomas.jungblut@gmail.com>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message