One thing I've found impenetrable about Stellar is the use of the XDR data format. I've never encountered this before and it's been a painful step in starting to build on their platform.
Are their any simple, introductory texts on it? A lot of stuff is from Stellar themselves.
I'm sure there are good reasons for using it, the rest of the platform looks simple to understand and well designed.
It's a simple binary format similar to e.g. protocol buffers. You write an idl and then generate code for different languages. The reason they went for this is that is compact. This kind of matters because this stuff is actually stored in stellar in large quantities.
It's a pretty old ietf standard actually. I recently had a discussion on this on their slack channel making the point that the choice for this was a bit unfortunate given that this is a relatively obscure format with not a lot of developer ecosystem around it.
Because of this, the stellar guys are actually maintaining their own code generation tool for this because there's nothing else out there apparently. It's called xdrgen. It generates code for a few languages. If you want to understand xdr, that's a good place to start. You can find the idl in stellar core.
I actually have an open bug for the java code generation with them, it generates broken code currently.
Any idea why they picked XDR rather than something that is more widely used in the present day, like Thrift? That is efficient on the wire, and pretty widely supported:
they wanted something standard and I guess did not realize that the IETF standard for XDR is not that widely used. I agree it would have been nicer if they went for something like thrift instead. However, it's done and I don't think they can fix this without breaking compatibility.
I do wonder why XDR sort of failed to get used and why people went ahead and created protocol bufs and thrift as alternatives.
It's defined in an RFC. The original RFC is from 1995, at which time RFCs were fairly readable, although still very detailed, documents, so that's worth a look:
The backstory to XDR is that it fell out of Sun's development of NFS. Sun engineers realised that rather than defining a protocol for NFS from scratch, they could define a generic remote procedure call mechanism (SunRPC, which became ONC RPC), and then define NFS as an application protocol on top of that. An RPC mechanism needs a serialisation format, and XDR is that format.
I get the impression that this was part of a project build a whole new world of IDL-specified RPC-based protocols that would replace the janky, ad-hoc, mostly-textual protocol suite that existed at the time - telnet, rlogin, FTP, SMTP, etc.DCE and CORBA were rival attempts at around the same time. It was an interesting time.
Of course, what actually happened was HTTP. gRPC/HTTP2 is this idea finally coming back into fashion.
Are their any simple, introductory texts on it? A lot of stuff is from Stellar themselves.
I'm sure there are good reasons for using it, the rest of the platform looks simple to understand and well designed.