Akka Terrastore Backend

10 views
Skip to first unread message

David Greco

unread,
Dec 18, 2010, 12:25:21 PM12/18/10
to terrastore-discussions
Hi Terrastorers,
I've just completed the implementation of an Akka (www.akkasource.org)
backend based on Terrastore.
Terrastore is another persistence backend option besides CouchDB,
MongoDB, HBase, Voldemort, etc.
Basically, Akka provides persistent data structure managed by an STM
(Software Transactional Layer) implementation.
Besides being held in memory and besides being ACID these persistent
data structure can be permanently persisted into any of the DBs
integrated with Akka, now also Terrastore.
So, for example, in Java:

PersistentMap<byte[], byte[]> map1 = HBaseStorage.newMap(id1);
PersistentMap<byte[], byte[]> map2 = TerrastoreStorage.newMap(id2);

means the creation of two PersistentMap backed respectively by HBase
and Terrastore. In this way the two maps are also saved persistently
and can be retrieved subsequently using the ids (id1 and id2).
Here http://debasishg.blogspot.com/2010/03/thinking-asynchronous-domain-modeling.html,
you can find an example, in Scala, of the usage of a persistent data
structure on top of Redis (but it could be TS as well).
And here https://github.com/jboner/akka-modules/tree/master/akka-samples/akka-sample-rest-java
a complete example based on Java where you can see another usage of a
persistent data structure for the realization of a restful service.
Regards,
David

Debasish Ghosh

unread,
Dec 18, 2010, 12:29:30 PM12/18/10
to terrastore-...@googlegroups.com, Akka User List
Hi David -

Thanks for the effort. We all appreciate your contribution to add Terrastore as one of Akka's persistence backends.

Thanks.

David Greco

unread,
Dec 18, 2010, 12:31:45 PM12/18/10
to terrastore-discussions
It has been a pleasure ;)

On Dec 18, 6:29 pm, Debasish Ghosh <ghosh.debas...@gmail.com> wrote:
> Hi David -
>
> Thanks for the effort. We all appreciate your contribution to add Terrastore
> as one of Akka's persistence backends.
>
> Thanks.
>
>
>
>
>
> On Sat, Dec 18, 2010 at 10:55 PM, David Greco <grec...@gmail.com> wrote:
> > Hi Terrastorers,
> > I've just completed the implementation of an Akka (www.akkasource.org)
> > backend based on Terrastore.
> > Terrastore is another persistence backend option besides CouchDB,
> > MongoDB, HBase, Voldemort, etc.
> > Basically, Akka provides persistent data structure managed by an STM
> > (Software Transactional Layer) implementation.
> > Besides being held in memory and besides being ACID these persistent
> > data structure can be permanently persisted into any of the DBs
> > integrated with Akka, now also Terrastore.
> > So, for example, in Java:
>
> > PersistentMap<byte[], byte[]> map1 = HBaseStorage.newMap(id1);
> > PersistentMap<byte[], byte[]> map2 = TerrastoreStorage.newMap(id2);
>
> > means the creation of two PersistentMap backed respectively by HBase
> > and Terrastore. In this way the two maps are also saved persistently
> > and can be retrieved subsequently using the ids (id1 and id2).
> > Here
> >http://debasishg.blogspot.com/2010/03/thinking-asynchronous-domain-mo...
> > ,
> > you can find an example, in Scala, of the usage of a persistent data
> > structure on top of Redis (but it could be TS as well).
> > And here
> >https://github.com/jboner/akka-modules/tree/master/akka-samples/akka-...
> > a complete example based on Java where you can see another usage of a
> > persistent data structure for the realization of a restful service.
> > Regards,
> > David
>
> --
> Debasish Ghoshhttp://manning.com/ghosh

Sergio Bossa

unread,
Dec 18, 2010, 12:59:58 PM12/18/10
to terrastore-...@googlegroups.com
Great work David!

--
Sergio Bossa
http://www.linkedin.com/in/sergiob

Amir Moulavi

unread,
Dec 18, 2010, 2:11:59 PM12/18/10
to terrastore-...@googlegroups.com
Awesome!

David, can you refer us to your contribution code in Akka?

Cheers,
Amir

2010/12/18 Sergio Bossa <sergio...@gmail.com>



--
M. Amir Moulavi
MSc, Software Engineering of Distributed Systems
Kungliga Tekniska Högskolan (KTH)
Stockholm, Sweden
LinkedIn: http://se.linkedin.com/in/moulavi
Web: http://sics.se/~moulavi
Email: mou...@kth.se

David Greco

unread,
Dec 19, 2010, 8:29:49 AM12/19/10
to terrastore-discussions
Hi Terrastorers again ;)
I put on github a simple example derived from the Akka rest example
that shows the integration between Akka and Terrastore
You can find it here: https://github.com/dgreco/akka-terrastore-example

Enjoy

On Dec 18, 6:25 pm, David Greco <grec...@gmail.com> wrote:
> Hi Terrastorers,
> I've just completed the implementation of an Akka (www.akkasource.org)
> backend based on Terrastore.
> Terrastore is another persistence backend option besides CouchDB,
> MongoDB, HBase, Voldemort, etc.
> Basically, Akka provides persistent data structure managed by an STM
> (Software Transactional Layer) implementation.
> Besides being held in memory and besides being ACID these persistent
> data structure can be permanently persisted into any of the DBs
> integrated with Akka, now also Terrastore.
> So, for example, in Java:
>
> PersistentMap<byte[], byte[]> map1 = HBaseStorage.newMap(id1);
> PersistentMap<byte[], byte[]> map2 = TerrastoreStorage.newMap(id2);
>
> means the creation of two PersistentMap backed respectively by HBase
> and Terrastore. In this way the two maps are also saved persistently
> and can be retrieved subsequently using the ids (id1 and id2).
> Herehttp://debasishg.blogspot.com/2010/03/thinking-asynchronous-domain-mo...,
> you can find an example, in Scala, of the usage of a persistent data
> structure on top of Redis (but it could be TS as well).
> And herehttps://github.com/jboner/akka-modules/tree/master/akka-samples/akka-...

Mats Henricson

unread,
Dec 19, 2010, 8:54:15 AM12/19/10
to terrastore-...@googlegroups.com
Great contribution!

We've talked about this from time to time, but noone ever got the time to do it!

Mats

On Sat, Dec 18, 2010 at 6:25 PM, David Greco <gre...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages