←back to thread

634 points david927 | 1 comments | | HN request time: 0.208s | source

What are you working on? Any new ideas that you're thinking about?
1. treyd ◴[] No.41344267[source]
Have been working on a protocol library [1] meant to be a substitute for "JSON-RPC over HTTP/WebSocket". Part of the goal is to more natively support byte-oriented data structures and reduce overheads. It supports a bidirectional HTTP2-style "channel" concept, but without making any assumptions about how they're meant to be used. It also can be configured to require authentication of the client and/or server, but punts secrecy to a lower-level transport protocol. It uses Rust macros to generate traits and wrappers to make the ergonomics fairly easy.

Currently I've built a call/response RPC abstraction with it to use it for another project that I'm working on. Eventually I'd want to add a streaming message system beyond the basic call/response pattern. I also might like to ship some easy setup to bridge between these protocol abstractions and ZMQ, JSON-RPC, be able to behave like inetd, etc.

It's functional enough to use in non-production environments but not completely seriously yet. I'm working out the kinks and improving the DX by using it for that other project. There's still some easy improvements around the byte encoding that I still haven't gotten to yet.

[1] https://codeberg.org/treyd/ecksport