logoalt Hacker News

tomtom1337today at 8:38 PM3 repliesview on HN

What are good alternatives when you need a common "single source of truth" schema shared between multiple languages? We use protobuf between c# and Python.


Replies

IshKebabtoday at 9:31 PM

I quite like the look of Typespec though I haven't used it much.

I always thought Thrift was waaay better than any of the alternatives, but it always had terrible documentation and I think it died mainly because of that.

throw1234567891today at 9:28 PM

Json schema?

ltbarcly3today at 8:42 PM

The goal is not to have a single source of truth schema. That is a means to some other goal, and it's not even a good means.

If you never change the schema then you don't have to worry about it, get things working and never look back.

If you do change your schema from time to time, you need testing between the two systems. If you have good tests again a single source of truth is fully redundant, both systems are talking just fine. If you don't have tests things can and will break all the time even using protobuf.

show 3 replies