What is it?

AnvilJ overview.png
AnvilJ is a tool designed to allow a programmer to develop a normal Java application, and then automatically distribute that application so that it functions correctly over multiple JVMs that do not share memory, and may not even be on the same machine. In real terms, this means that you can write software for your desktop computer and then automatically split the code into a set of programs that all run on separate computers, and may be connected by a complex communications network. The programmer can choose parts of their code (threads or object instances) to place in each target JVM and AnvilJ will work out how to share the methods and fields between the rest of the program accordingly. It will perform routing of messages throughout the network if some nodes cannot directly communicate with others.

AnvilJ is intended for use in the development of embedded systems, for which the target architectures are often complex, with multiple processors of differing capabilities, and there is no global shared memory. Such systems often also have on-chip networks and other complex communications. Given this target domain, AnvilJ's runtime is designed to be very small. It compiles to only around 30kb of class files for each JVM and it only imposes very tiny overheads on each target JVM.

AnvilJ can do this because it slightly restricts the amount of runtime dynamic behaviour that is allowed in the input Java application. An AnvilJ program must define some 'fixed points' which are static object instances that last for the entire duration of the application's life. Whilst these instances must remain static, the rest of the application is free to create threads, allocate objects, or whatever is supported by the JVM that you are using. The principle of AnvilJ is that minimal restrictions on the input program allow for a huge reduction in the size of the runtime that is required to support it.

The following sections explain how to use AnvilJ. It is recommended that the sections below are followed in order.

Quick links

If you already know how to use AnvilJ, these quick install links will be useful.
AnvilJ's plugin is installed by pointing Eclipse at the update site: http://www.cs.york.ac.uk/rts/anvilj
AnvilJ's runtime can be found on this page.