4 ms·
Taxi is a documentation and query language, but not a runtime wire format. ie., you can't encode a message into Taxi and send it across the wire, like you can
by martypitt 4y ago
Taxi is a documentation and query language, but not a runtime wire format. ie., you can't encode a message into Taxi and send it across the wire, like you can with Protobuf.
Taxi is intended to work with protobuf, rather than replace it.
The idea is teams work on the Taxi type system collaboratively, building a library of terms (FirstName / LastName / etc), which can be applied consistently across multiple team's schemas.
Developers using Protobuf / OpenAPI / RAML / etc., can embed those terms directly into their existing schemas, to improve documentation, and describe interoperability between multple internal systems.
(TeamA's field called "givenName" is the same data as TeamB's field called "FIRST_NAME")
As I write this, I realize our docs are missing how to use Taxi with Protobuf, which is kinda embarrassing. There's examples documented elsewhere[0], but we need to get the Taxi docs updated!
[0] https://docs.vyne.co/reference/message-formats/protobuf/#embedding-semantic-types-in-protobuf https://docs.vyne.co/reference/message-formats/protobuf/#emb...
- Groxx 4y agoYep, excellent point, I completely missed that it had no encoding specified. Thank you! That's mostly on me for skimming, don't take it as any kind of strong "docs should be more clear on this" signal :) Honestly I think this makes it more interesting... though I'm curious how it handles its generics in an agnostic way, as protobuf has some, but they're quite crippled. Or do you just have to know the limitations of your encoding and not use those features, and/or build your own translation layer to handle it? E.g. you can get pretty far with a double-encoded blob of bytes.
- martypitt 4y agoTaxi has support for generics[0], but it's pretty nascent at the moment. Internally, the compiler understands the idea of a generic type A<B>, which is used for Array<T> and Stream<T>, as well as describing generic functions. I definitely think there's more we could do here, but haven't hit the usecase yet. Hit me up on Slack[1] if you wanna discuss ideas, as I'd love to hear more about what role generics can play. [0] https://docs.taxilang.org/language-reference/functions/#generic-types https://docs.taxilang.org/language-reference/functions/#gene... [1] https://join.slack.com/t/vyne-dev/shared_invite/zt-697laanr-DHGXXak5slqsY9DqwrkzHg https://join.slack.com/t/vyne-dev/shared_invite/zt-697laanr-...