
Small library enabling efficient asynchronous peer-to-peer communication with type-safe contracts. Features include unidirectional remoting, Ktor transport adaptors, code generation, and extendable binary serialization.
contract library
+-----------------------------------------+
| // contract definition |
| interface Calculator { |
| suspend fun add(a: Int, b: Int): Int |
| } |
+-----------------------------------------+
client process server process
+----------------------------------+ +----------------------------------------------+
| // contract usage | | // contract implementation |
| val calculator: Calculator = ... | | class CalculatorImpl : Calculator { |
| println(calculator.add(1, 2)) | | override suspend fun add(a: Int, b: Int) = |
| | | a + b |
| | | } |
|..................................| |..............................................|
| contract library | | contract library |
|..................................| |..............................................|
| yass2 library | | yass2 library |
|..................................| |..............................................|
| transport library | <---> | transport library |
+----------------------------------+ +----------------------------------------------+
provides unidirectional and session-based bidirectional remoting
provides Ktor transport adaptors for Http, WebSocket and Socket
generates code (works on any platform and is fast) either with KSP or with reflection
yass2 has multiple modules with the following dependencies
yass2-core <-- yass2-generate
^
|
yass2-coroutines --> kotlinx-coroutines-core
^
|
yass2-ktor --> Ktor
artifacts on Maven Central (GroupId: ch.softappeal.yass2)
API doc on javadoc.io
uses Semantic Versioning
Open Source (BSD-3-Clause license)
supersedes yass
contract library
+-----------------------------------------+
| // contract definition |
| interface Calculator { |
| suspend fun add(a: Int, b: Int): Int |
| } |
+-----------------------------------------+
client process server process
+----------------------------------+ +----------------------------------------------+
| // contract usage | | // contract implementation |
| val calculator: Calculator = ... | | class CalculatorImpl : Calculator { |
| println(calculator.add(1, 2)) | | override suspend fun add(a: Int, b: Int) = |
| | | a + b |
| | | } |
|..................................| |..............................................|
| contract library | | contract library |
|..................................| |..............................................|
| yass2 library | | yass2 library |
|..................................| |..............................................|
| transport library | <---> | transport library |
+----------------------------------+ +----------------------------------------------+
provides unidirectional and session-based bidirectional remoting
provides Ktor transport adaptors for Http, WebSocket and Socket
generates code (works on any platform and is fast) either with KSP or with reflection
yass2 has multiple modules with the following dependencies
yass2-core <-- yass2-generate
^
|
yass2-coroutines --> kotlinx-coroutines-core
^
|
yass2-ktor --> Ktor
artifacts on Maven Central (GroupId: ch.softappeal.yass2)
API doc on javadoc.io
uses Semantic Versioning
Open Source (BSD-3-Clause license)
supersedes yass