This talk by Marty Pitt has low-key blown my mind: https://www.youtube.com/watch?v=GUAVOkz_zWU
Despite the type-aliases in the title, that seems to be the least important part of the talk. Some quick notes:
- Distinguish between Semantic Contract and Structural Contract
- Makes a point on how Semantic Contracts are easier to share and encourages to do so
- Makes a point on how Structural Contracts are a pain to share and encourages to keep that private
- Taxi language can define semantic contracts. You can use Kotlin type aliases to write taxi semantic contracts
- Orbitalhq is a docker image that can consume semantic contracts and register data sources (DB, Kafka, REST API, Soap, etc)
- This wasn't mentioned, but you pay for orbital, the free tier is very limited. Still amazing what it can achieve.
- You can use taxi language queries to request an arbitrary structure of semantic data. (can also be written in Kotlin)
- Orbital can then automatically reach to the different sources and look for the semantic data and arrange it as requested
The result is:
- A single, formal, definition (across teams) of the semantic contracts
- Clients do not care where the semantic data is coming from. Resilient to changes.
- Orbital automates SQL, Kafka, REST glue code reducing overall code required.
- Does Orbital have any permission management? Exposing DB model and data seems dangerous without it.
- Can contract sync be an issue?
Overall what orbital does is impressive. I don't think I have seen it elsewhere. Nothing here is really Kotlin specific besides the fact that you can define taxi lang constructs (contracts and queries) with type safe Kotlin which actually is convenient as well.