3 ms·
Session types are more like “encode a state machine in your type system so it’s impossible to mess it up”. They don’t inherently have to do with network service
by steveklabnik 8y ago
Session types are more like “encode a state machine in your type system so it’s impossible to mess it up”. They don’t inherently have to do with network services, though since network services follow protocols that can be represented as state machines (think “the S in REST”), they’re a good application of session types.
That said, it looks like this library is not purely about session types, but applying them to channels. (Which are go-style, yes.)
- agumonkey 8y agoare they used in non academic contexts ?
- Munksgaard 8y agoI'm one of the authors of the original paper/repository. Part of the motivation behind our work was to try and apply it to the Servo project (Mozilla's experimental browser engine, of which parts have already been integrated into Firefox), which is highly parallelized. They had issues with their internal communication because of their expansive use of threads, and we wanted to see if session types could be applied to fix that. Unfortunately, Servo is a rapidly moving target, so while we did manage to convert some parts of the project to use our session types library, we never got around to finishing the work, and now I believe that they've found different solutions to their challenges. With regards to your first question, this library is solely for in-process communication. The concept could be expanded to cover inter-process communication as well as communication over the network, and actually has been in other similar session type projects, but focusing on in-process communication allows us to make stronger guarantees.
- agumonkey 8y agoVery nice