incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Jungblut <>
Subject Messaging Interface
Date Thu, 02 Feb 2012 11:49:52 GMT
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
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 <>

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