Developing web applications needs to be about programming logic and not about writing glue code to overcome the impedance mismatch between different technologies for the different tiers (client, server, database). Stip.js allows programmers to write their code as one single artifact, in one single language, JavaScript. Using annotations inside comments, the programmer can guide the tier split and handle concerns like failure handling, remote communication, etc.
Program analysis for JavaScript to construct a Program Dependence Graph.
Compute the best placement of the web slices and split the tierless program to the actual tiers of the distributed program
Program transformation to JavaScript on the server and JavaScript on the client.
This is a first prototype of the tier splitting tool Stip.js.(tested on Chrome and Firefox).
When the cursor is placed inside left editor: [mac]Cmd + s for tier split, Cmd + k for CPS transformation,
[other]: Ctrl + s for tier split, Ctrl + k for CPS transformation
Write your distributed web applicatin in plain JavaScript. Annotations, inside comments, are actually developer hints that influence the tier-splitting process. The most important building blocks of the tierless or multi-tier applications are slices: units of code.
Location | Communication | Data Sharing | Failure Handling |
---|---|---|---|
@config | @reply | @local | @useHandler |
@slice | @broadcast | @copy | @defineHandler |
@client | @blocking | @observable | |
@server | @remoteCall | @replicated | |
@localCall | |||
Block statement | Function/call exp | Declaration/ constructor function | Block statement/call exp |
A recommender system computes the best placement of the slices, with respect to one or more concerns. For example, the system can try to maximise the offline availability of the application. The recommender systems returns a report on how the application can be improved to obtain a better result.
Learn how to write the Uni-corn application here.
STiP.js makes use of Jipda, a JavaScript Introspective Pushdown Analysis. Based on this analysis, we construct a distributed program dependency graph.
For Node.js we use the asyncCall library for remote communication. This library has a high configurability and a variety of failure handling mechanisms.
Redstone, an HTML templating system on top of stip.js. Transforms to reactive HTML and JavaScript.
lphilips [at] vub.ac.be
@laurephilips