+1, nice API improvement. Tommaso 2012/2/3 Thomas Jungblut <[email protected]>
> Yes, this sounds to me reasonable as well. > Other opinions? Otherwise I am filing a jira for that. > > 2012/2/3 Edward J. Yoon <[email protected]> > > > I think, we may want to change like <? extends Writable, ? extends > > Writable>. > > > > On Fri, Feb 3, 2012 at 9:45 AM, Edward J. Yoon <[email protected]> > > wrote: > > > I prefer the Writable. > > > > > > On Thu, Feb 2, 2012 at 8:49 PM, Thomas Jungblut > > > <[email protected]> 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 <[email protected]> > > > > > > > > > > > > -- > > > Best Regards, Edward J. Yoon > > > @eddieyoon > > > > > > > > -- > > Best Regards, Edward J. Yoon > > @eddieyoon > > > > > > -- > Thomas Jungblut > Berlin <[email protected]> >
