In my spare time I have been working onMultiverse; to be specific on the instrumentation of POJO’s. A crude initial version is working and dropping the manual instrumentation of classes is a dream come true. But there is a lot left to do:
overcoming current instrumentation limitations like dealing with statics, inner classes, private and final fields.
- optimisations like unmanaged reads to prevent unnecessary transaction overload. This could be done by escape analysis in the future, but I have to settle for annotations for now. Another optimisation is making final objects completely free to work with, so no extra STM caused CPU or memory usage. At the moment the STM doesn’t see the difference, so it tries to manage them and this causes the unnecessary usage.
Some thoughts about making the stm distributed:
- With clock based STM’s, the maximum transaction speed is limited to the the maximum speed the clock run with. Because the read and write of this shared clock needs to be done atomically over the network. If the network action alone takes 1 ms the maximum number of transactions are 1000 per second. The same can be concluded if you apply ,Amdalah’s Law if you see network communication as sequential fractions that limit the maximum speed up. I guess it is also time to have a more thorough look at the work of Leslie Lamport.
- The big difference is that distributed systems and non distributed systems is that the former is a lot less reliable, and this means that a STM implementation needs to deal with failure of notification. This could complicate matters like performance and the holy grail of software design: simplicity.