> But what is the advantage over just broadcast a message to other peers and
> sync?
Then, user have to extract them from all received messages
sequentially as below:
while ((received = bspPeer.getCurrentMessage()) != null) {
if (received.getTag().equals("tag1")) {
...
} if else (received.getTag().equals("tag2")) {
....
} else {
sum += Bytes.toDouble(received.getData());
}
}
> Or do you want to make a variable storage as part of a peer with rich API?
public void setup(BSPPeer peer) {
this.zk = peer.getZK();
}
On Wed, Oct 19, 2011 at 11:46 PM, Thomas Jungblut
<[email protected]> wrote:
> Hi Edward,
>
> I see the use of it.
> But what is the advantage over just broadcast a message to other peers and
> sync?
> Messages are serializable/writable and as far as I understood Zookeeper you
> have to create a node with a byte array containing it.
> So the user have to call Bytes.toBytes("someString") and create a znode for
> himself.
> Or do you want to make a variable storage as part of a peer with rich API?
>
> 2011/10/19 Edward J. Yoon <[email protected]>
>
>> Hi,
>>
>> I just think it will be great if user can create global shared
>> variables in bsp() function. Do you think it is possible to use
>> ZooKeeper to share some simple data among tasks?
>>
>> --
>> Best Regards, Edward J. Yoon
>> @eddieyoon
>>
>
>
>
> --
> Thomas Jungblut
> Berlin <[email protected]>
>
--
Best Regards, Edward J. Yoon
@eddieyoon