Stream calls across a pod become map/reduce calls if the pod has multiple nodes. A “pair” pod will run the stream call on both node-0 and node-1 and then combine the results before returning to the caller. The calling code is identical to the non-pod call:
myService = manager.lookup("pod://my-pod/my-service"); myService.myStream("arg1") .filter(x->x.startsWith("my-prefix") .reduce((x,y)->x + "::" + y, x->System.out.println("Result: " + x));
Regarding:
Stream calls across a pod
Stream calls across a pod become map/reduce calls if the pod has multiple nodes. A “pair” pod will run the stream call on both node-0 and node-1 and then combine the results before returning to the caller. The calling code is identical to the non-pod call:
myService = manager.lookup("pod://my-pod/my-service"); myService.myStream("arg1") .filter(x->x.startsWith("my-prefix") .reduce((x,y)->x + "::" + y, x->System.out.println("Result: " + x));
I am wondering how to write such a Service, that is active on all nodes. Is it just
@Service(/"my-service")
?
As far as i understood the available documentation (pre stream - era), my Service get's initialized on all Servers and a "primary" virtual node (=active) will handle the calls. If my primary node dies, the checkpoint and journal is used on the fallback of the "virtual node" to restore state.
And now for the "stream-api" ... how do i getting started here ? Is it still just a @Service annotation ? Will my service be initialized and available on *all* virtual nodes (but there is still a "primary" virtual node for "normal" calls, but these will not make much sense) ?
I would like to create some Service, that is running on all virtual nodes and each nodes hold a subset of the data (partitioned by a key), so i can combine the data on a node level and later on in total with such a stream call. For this it work i would need the service to be aware of it's current location and the whole setup (like you got initialized on node 1 of 10) so it knows with partition it is responsible for. How to i qet this metainformation during initialization ?
Am Mittwoch, 26. November 2014 16:58:21 UTC+1 schrieb ferg:Baratine 0.8.6 is on baratine.io (and in maven as baratine.io/m2).
Download: http://baratine.io/download/baratine-0.8.6.tar.gz
Release notes: http://doc.baratine.io/v0.8/manual/release-notes/0.8/0.8.6
Javadoc: http://baratine.io/javadoc-0.8/
The biggest visible change is using JDK-8, particularly for the lambda
expressions,
and for the interface enhancements.
Services can now use a Streams-like API for queries. Calling clients can
send lambda-expressions as part of the query to execute in the service
itself.
The deployment has updated, mostly internally. There's more work
expected for 0.8.7, which will add more flexibility and work better with
dynamic pods.
jUnit has been improved, making it easier to test a single service in
isolation.
There's a new option for clients, essentially starting an embedded
Baratine instance that can connect to the Baratine cluster as a server.
This means the client can send lambda expressions to the server, using
BFS as a jar transport.
-- Scott
--
You received this message because you are subscribed to the Google Groups "Baratine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to baratine-io...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.