Re: schema&#x2F;RPC layer<p>Barrister semantically seems like the java type system with minor syntactic differences like field&#x2F;type order. It uses extends for choice&#x2F;sum&#x2F;polymorphism.<p>In addition to schema definition, it also has interfaces for RPC definition.<p>The only major limitation I noticed is it lacks recursion (cyclic type references). Important for completeness, but I don&#x27;t think it&#x27;s needed that often in practice - I&#x27;m interested if this is true.<p>One great thing about an IDL approach to schema definition, for RPC, is its similarity to objects&#x2F;classes - because that is the domain it is used from. It&#x27;s familiar to users, and minimal cognitive burdern to switch between. (Similar argument for JSON - it&#x27;s an &quot;Object Notation&quot;). In contrast, xml schema looks utterly different from objects&#x2F;classes.<p>I think there&#x27;s even a hypothetical argument for making the IDL look exactly like java - not because it&#x27;s great but because everyone knows it, even the haters (or, maybe borrow Python&#x27;s type hint system - or whatever is familiar to your target users).<p>XML schema has a rich type system, both for structure (eg minOccurs) and primitives. But these aren&#x27;t needed to represent objects, because programming type systems are poorer and lack those features.<p>---<p>I think your main problem is a very old one, of transferring primitive values between different languages (like different languages - even different C implementations - having 16 bit vs 32 bit ints). Text representations like XML and JSON mostly solve this, but of course they can still be too big. You might look at old solutions, like ASN.1, to see the problems that arise, but I think you&#x27;re better off solving much problems when (and if) they occur - because maybe they just won&#x27;t come up in practice today because of conventions unconsciously established, even though theoretically they should come up.  Just make it as easy to use as possible, to get the thing done that the user wants to do, and you&#x27;ll get all the feedback&#x2F;guidance you need.<p>Maybe you would like to have a type system subset that works for all languages - but this would just hamper those in the one language, or between two languages that are close. OTOH some enterprises like future proof options, in case they need to support other languages.<p>Would love to hear your thoughts and experience on all these issues.