WeCa: A JavaScript Library for the Modular and Flexible Causality Control on the Web

FIXME WeCa is implemented on an old version of ESA (named OTM). In the future, we plan to update the WeCa version to ESA.

Ajax allows JavaScript programmers to create interactive, collaborative, and user-centered Web applications. These Web applications behave as distributed systems because processors are user machines that are used to send and receive messages between one another. Not surprisingly, these applications have the same distributed system needs like 1) controlling the causality between messages sent and responses received and 2) reacting to distributed causal relations. JavaScript programmers currently overcome these needs using rudimentary and alternative techniques that largely ignore the distributed computing concepts. In addition, these techniques are not very flexible and need to intrusively modify these Web applications.

We present WeCa, a practical library that allows for modular and flexible control over these causality issues in Web applications. In contrast to current proposals, WeCa uses ESA (previously OTM) stateful aspects, message ordering strategies, and vector clocks. We illustrate WeCa in action with several practical examples from the realm of Web applications.

Figure 1. The big picture of WeCa

Figure 1 shows that WeCa uses 1) ESA + messages ordering strategies to control the causality between Ajax requests and responses received and 2) ESA + vector clocks to react to distributed causal relations generated by the communication among Web applications. The following two pages detail both points: