This is actually in big lines what is already working now with what used to be 
called the StandaloneClusteringProvider, which has been renamed to 
ExpressToolkit:

ClusteringToolkit clustering = new ExpressToolkit("localhost:9510");
Barrier barrier = clustering.getBarrier(barrierName, numberOfParties);

Just javac, no bootjar, no classloader worries.

To store custom data types in there we could indeed simply treat them as data 
structures and require something like Serializable. What we were wondering 
about though is if there's not a good and easy way to actually offer more than 
that and allow lower-level clustering functionality inside those end-user 
classes. Being able to support the TC annotation in there would be very nice 
imho.

On 25 May 2010, at 17:40, Taylor Gautier wrote:

> In other words, personally, I think if you can just make the following work 
> using *only* javac MyClass.java, start a server, and java MyClass, I think 
> you've solved a *huge* problem (actually, a bunch of them - no bootjar 
> classloader issues, all jvms should be compatible, easy for a dev to start 
> using right away):
> 
> MyClass.java:
> 
> import java.util.concurrent.BlockingQueue;
> import org.terracotta.express.Terracotta;
> 
> public class MyClass {
>   public static void main(String[] args) {
>     BlockingQueue<MyClass> queue = Terracotta.getBlockingQueue("myqueue");
>     queue.offer(myClass);
>     myClass = queue.take();
>   }
> }

--
Geert Bevin
Terracotta - http://www.terracotta.org

_______________________________________________
tc-dev mailing list
tc-dev@lists.terracotta.org
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to