« All set for JavaOne | Main | My Talk is being repeated tomorrow »

May 6, 2008

Twitter is fascinating. Helps me learn about my project.

posted by ari

Have you looked at Twitter? I am addicted. The interesting thing is that David Pollack (seen on this blog commenting, after having been given unclear info about TC in the past) and I played with "the Twitter problem" in a Terracotta context / vacuum.

We learned something interesting together: Terracotta is core infrastructure. It can be used in many ways, but not all will work as well as others.

As an example (without going into details about Twitter since I know nothing about it, and we were just using it as a framework for discussion--check Twitter out for yourself and figure out how this all applies):

1. David thought that Terracotta should be used for messaging between some sort of node construct.
2. A few people want to use TC for messaging
3. I don't think TC should be used for messaging unless you want durable POJO-based messaging w/o any other infrastructure. Specifically, if you have clustered objects using TC and you need some messaging to signal and pass control amongst those already-clustered JVMs, go for it. But keep in mind TC is not a message bus.
4. Anyways, the more apropos use of Terracotta in a giant coordinated grid IMO might be to use point-to-point communication between Scala actors in the grid. Terracotta can then be used as an actor<->JVM lookup table that tells you where actors can be found at any point in time. Actors can then be migrated amongst nodes in real time because the lookup table is cluster-wide coherent at all times.
5. When the JVMs where actors are hosted crash, Terracotta's JMX-based cluster membership notifications can be leveraged to dynamically migrate actors in the grid.

The key: just because you have a hammer, not everything is a nail. I think it is incumbent upon us at Terracotta to make nails versus screws very clear to our users. I am going to plumb up Scala, Apache Qpid, and Terracotta in my copious spare time.

Stay tuned.

--Ari

Trackback Pings

TrackBack URL for this entry:
http://blog.terracottatech.com/cgi-bin/mt/mt-tb.cgi/58

Comments

Ari --

Messaging is often used to distribute work among a cluster of systems.

As we spoke a few years ago, using Terracotta to cluster an ordered list (e.g., java.util.AbstractQueue) can provide much of the same functionality, and indeed that's what I believe David is suggesting by using TC to dispatch work among Scala Actors.

an interesting thought experiment would be to look at the various Messaging design patterns (see below) to determine which ones map nicely to clustered Pojos.

http://www.enterpriseintegrationpatterns.com/toc.html

--bob

Posted by: bob at May 7, 2008 9:18 AM

Post a comment




Remember Me?

(you may use HTML tags for style)