Tuesday, January 15th, 2008

XSTM: Shared Transacted Memory

Category: GWT, JavaScript

We posted about JSTM for GWT back when I saw it at JavaPolis.

Now, the project has been renamed to XSTM which comes with a new book, and a new form example:

The data entered in the form is automatically replicated on the server. If you launch two browsers and modify the same field concurrently, the conflict is detected and the last modification is cancelled.

The undo button aborts the current transaction, which cancels the modifications that where done to the form.

You can see the bulk of the code.

What is XSTM?

XSTM is a library which enables high performance object replication between processes. With it you can set a value to a field of an object in one process and see the value changing on an object in another process. This can be very useful in scenarios where the same data is present on several machines like client-server communication, application clustering, peer to peer etc…

In a client-server configuration, XSTM can replicate changes made to an object to and from selected clients. This simplifies a lot for example Ajax applications where clients interact with the server in complicated ways. Using XSTM, you can forget all the error-prone code to call the server or notify the clients of a data update. No more intermediary objects you send back and forth. No useless copying of fields from objects to objects. No call to the server sending a whole form when only one field has been changed. Model your application in the usual object oriented way, write the code that creates and modifies those objects on the server and the clients, and let XSTM handle the synchronization.

XSTM is symmetric, which means you can put the code which modifies your shared objects on the machine that’s best suited. For example form validation code would be identical on a server or on the clients so you can choose the best solution for your application.

Posted by Dion Almaer at 7:50 am
1 Comment

3.6 rating from 19 votes

1 Comment »

Comments feed TrackBack URI

Hrm… I think it’s a bad call to rename it to XSTM.
X almost always stands for XML but not in this case.

This may lead to confusion which in the end may hurt adoption.

Comment by Robert Schultz — January 16, 2008

Leave a comment

You must be logged in to post a comment.