[Cryptography] Source for protocol compiler
hallam at gmail.com
Wed Aug 28 16:24:29 EDT 2013
The source is up on sourceforge now. It does need some spring cleaning and
documenting which I hope to get to next week.
The documentation is in the following directory
The origins of this work is that about 70% of the effort in working groups
goes into debating 'bikeshed' type issues (as in what color to paint it)
that really don't matter. Things like choice of encoding (just use JSON) or
binding (Any reason to not use HTTP + SSL) and so on.
And 70% of the effort of the editor would go into making changes to the
spec which would need to be reflected accurately in six different parts of
the document and the reference code and then conformant examples generated
and inserted at the right place and then other folk would have to check it
was all done right.
So JSONSchema converts an abstract schema definition (in a programming
language syntax, not JSON encoding!) and produces a stub client API and a
stub server with the appropriate holes to plug in your semantics. You can
then write documentation and insert examples from running code (provided
you like documentation in either HTML or Internet Draft format at the
It is all written in C# and has been run on OSX and Linux under Mono
(binary distributions to follow). The synth currently only generates code
in C# but I plan to add C and probably Objective C down the line. The
meta-synthesiser is also on sourceforge and open source:
The compiler only supports RPC like interactions at the moment, i.e.
query/response. But I am planning to expand the generator to support an
additional interaction pattern in which the client opens a transaction and
receives a series of async callbacks. That would be suited to supporting
chat like protocols.
One of the things I realized as I was doing all this is that all Web
Services really consist of are glorified RPC calls in a different syntax.
The code generated right now is targeted at being reference code but there
is no reason why the synth should not generate production code.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cryptography