What is ConSysT?
ConSysT is a distributed object-oriented language. Objects can be replicated with different levels of consistency. The type system ensures that consistency levels are mixed safely.
Multiple consistency levels
Each replicated object comes with its own consistency level.
Safe mixing of consistencies
The static type system ensures correct mixing of consistency levels.
Object-oriented programming
Consistency is fully integrated with object-oriented abstractions.
How does ConSysT look like?
class Concert {
Date date;
//Define fields that reference other replicated objects.
JRef<@Eventual ConcertHall> hall;
JRef<@Eventual Band> band;
//Fields can have different consistency levels.
JRef<@Sequential Counter> soldTickets;
//Define operations as Java methods...
int getSoldTickets() {
//... and execute them on replicated objects.
return soldTickets.ref().value;
}
...
}
You define replicated objects just like normal Java classes. Operations on replicated data is defined as methods. Executing an operation is just as easy as calling a method.
Overview
In ConSysT, the main abstraction are replicated objects that are fully integrated into an object-oriented language. Replicated objects have a consistency level specified by the developer.
Distribution
Easily distribute your your data across your local network, datacenters or geo-replicated devices. Replicated objects allow to distribute and perform operations on your data. As ConSysT is implemented as a language extension to Java, you can create replicated objects from already existing Java classes.
class MyClass {
void myMethod() { ... }
}
//Create a replicated object.
JRef<MyClass> obj1 = sys.replicate(MyClass.class);
//Perform a distributed operation.
obj1.ref().myMethod();
Consistency
Method invocations on replicated objects are handled as operations on replicated data by the system. Consistency models define how the system keeps replicas consistent. Developers can opt to use weak consistency models, like Eventual Consistency, to boost performance or use strong models, like Sequential Consistency, to reduce application complexity. In ConSysT, developers state their desired consistency model as a consistency level attached to each replicated object.
//Define consistency as part of the type.
JRef<@Eventual MyClass> obj1 = ...
Safety
Applications generally use more than one consistency level. As consistency can be corrupted when consistency levels are mixed mindlessly, ConSysT adopts a special consistency type system. The type system ensures that objects with strong levels are not affected by weak data. More precisely, ConSysT orders consistency levels in a lattice and checks that there is no information-flow from weak to strong levels.
JRef<@Eventual MyClass> obj1 = sys.replicate(MyClass.class);
JRef<@Sequential MyClass> obj2 = sys.replicate(MyClass.class);
if (obj1.ref().f == 42) {
//Type error! Disallowed information-flow from obj1 to obj2.
obj2.ref().f = 42;
}
Download
Try it out
ConSysT is available as a language extension to Java.Follow the installation instructions to get started.
Academic Publications
-
Mirko Köhler, Nafise Eskandani, Pascal Weisenburger, Alessandro Margara, Guido Salvaneschi: Rethinking Safe Consistency in Distributed Object-Oriented Programming. Proc. ACM Program. Lang. 4, OOPSLA, Article 188 (November 2020), 30 pages. https://doi.org/10.1145/3428256
-
Mirko Köhler, Nafise Eskandani Masoule, Alessandro Margara, and Guido Salvaneschi. 2020. ConSysT: Tunable, Safe Consistency Meets Object-Oriented Programming. In Proceedings of the 22th ACM SIGPLAN International Workshop on Formal Techniques for Java-Like Programs (FTfJP ’20), July 23, 2020, Virtual, USA. ACM, New York, NY, USA, 3 pages. https://doi.org/10.1145/3427761.3428346
-
Nafise Eskandani, Mirko Köhler, Alessandro Margara, Guido Salvaneschi: Distributed object-oriented programming with multiple consistency levels in ConSysT. SPLASH (Companion Volume) 2019: 13-14
-
Alessandro Margara, Guido Salvaneschi: Consistency Types for Safe and Efficient Distributed Programming. FTFJP 2017.
Credits
ConSysT is developed at the programming group in Technical University of Darmstadt and University of St. Gallen.