Hi all
I have a proto based struct serialization for ByteBuffers
https://github.com/0xCopy/prautobeans/the library is 359+175 lines in 2 files
https://github.com/0xCopy/prautobeans/blob/master/prautobeans-lib/src/main/java/prauto/io/PackedPayload.java#L174the maven plugin generator is 230 lines, in one source file
https://github.com/0xCopy/prautobeans/blob/master/prautobeans-maven-plugin/src/main/java/prauto/PrautoGen.javaa unit test exists, also. sample code exists, modelling pouchdb api as a thought excercise.
this is still very early and has had no input so far.
prautobeans
this project was written with the following goals in mind
- enable an alternative autobeans marshalling and proxy codebase
- on serverside
- use a jdk8 baseline
- soon gwt 2.7 client, with bytebuffers
- marshal a binary encoding
- that packs element sizes into bytes, or 32-bit ints when >254, and someday never, longs
- that packs booleans into bits,
- that packs nulls into bits (or adds one bit to non-null nullables)
- that packs a DAG of proto defined objects
- DirectByteBuffer compatibility for zero-copy IO, to solve a need for
Direct IO where existing proto based generators to date rely on heap
based byte[]
- use maven to generate src/main/proto into the above autobeans and marshalling proxies
- heap-averse and compact code, c-like, suitable for a c++ interop port in the near-term
TIA
Jim