As suggested by Bruno Rijsman for example Thrift can be used for this. For example as in the RIFT protocol (https://datatracker.ietf.org/doc/draft-ietf-rift-rift/)