S2 Connect implementations
S2 Connect allows for full interoperability between Resource Managers and Energy Management Systems in local, cloud and hybrid deployments. It is quite some work to implement the S2 Connect specification. Therefore, S2 Connect is implemented in libraries for several programming languages. The goal is to have libraries with a clean API for the discovery, pairing and S2 session initiation process that shields all the implementation details from the users of the libraries such that they can focus on the real work of creating Resource Managers and Energy Management systems.
Language overview
- Rust: currently the most complete implementation. S2 Connect is implemented in the S2-Rust library.
- Python: a solid implementation covering the main S2 Connect features, though not yet as complete as Rust. The implementation is available in the s2auth repository and published on PyPI as s2auth. If you are a Python developer and interested in contributing, please reach out on discord.
- C: a work in progress by Inversable. Will be published open source soon.
- Go: a work in progress.
Feature overview
The main efforts have been put into the implementation of S2 Connect in Rust and Python. Below is an overview of the current implementation status.
| Feature | Rust | Python |
|---|---|---|
| WAN discovery | ❌ | ❌ |
| LAN discovery | ✅ | ❌ |
| Pairing Client | ✅ | ✅ |
| Pairing Server | ✅ | ✅ |
| Pairing API | ✅ | ✅ |
| Session initiation | ✅ | ✅ |
| Unpairing | ✅ | ✅ |
Implementation notes:
- The specification says that there must be rate limiting on the pairing process of one pairing per
node_idper second. This is not yet implemented in either the Rust or Python implementations. - Both the Rust and Python implementations do enforce maximum token lifetimes.
Help wanted
There is still a lot of work to do. So if you like to contribute, have a look at the open issues, pick one, start the implementation and open a pull request. We would also like to get in touch with you on discord where we can also discuss technical decision for the implementation of S2 Connect.