News for hackers. Stuff that matters.
Re:Cap'n Proto 0.8: Streaming flow control, HTTP-over-RPC, f... by malkia on Thursday April 23, 2020 @06:45PM (#22962425)
A big selling point for me, would be built-in IPC mechanism, instead of TCP, or UDP - be it mailslots (Windows), named pipes, shared files, etc. - does not matter. Now there are some projects that implement IPC over gRPC, but not part of the actual project.

Why I'm asking for this - for the simple reason - I don't want to deal with port allocation on a CI.

Re:Cap'n Proto 0.8: Streaming flow control, HTTP-over-RPC, f... by kentonv on Thursday April 23, 2020 @06:52PM (#22962501)
Cap'n Proto works great over unix sockets. For sandboxing usecases in Sandstorm and Cloudflare Workers, I've commonly used it over anonymous socketpairs -- definitely no ports involved there. :)

In fact, you can adapt the RPC system to operate over any kind of byte stream transport pretty easily, by implementing the kj::AsyncIoStream interface. Or if you already have a standard file descriptor (or iocp-compatible HANDLE in Windows), you can use that.

One fancier thing that's still on the roadmap is shared-memory IPC. Cap'n Proto's zero-copy serialization was really built for this, but so far for all my real-world projects, Unix sockets have been fast enough, so I haven't been forced to full implement a shared memory transport yet. Maybe soon?

Re:Cap'n Proto 0.8: Streaming flow control, HTTP-over-RPC, f... by zokier on Thursday April 23, 2020 @08:16PM (#22963210)
It's bit frivolous question, but would it be easy to use stdin/stdout as transport for capnp?
Re:Cap'n Proto 0.8: Streaming flow control, HTTP-over-RPC, f... by kentonv on Thursday April 23, 2020 @09:03PM (#22963524)
Sure, you could do that. You'd need to write a little shim to bind separate input stream and output stream FDs into a single AsyncIoStream but that shouldn't be hard.
Re:Cap'n Proto 0.8: Streaming flow control, HTTP-over-RPC, f... by anderspitman on Thursday April 23, 2020 @06:48PM (#22962456)
Have you looked into ZeroMQ? It has built-in shared memory IPC without having to worry about ports. Though I'm not sure exactly what you mean by "port allocation" in this context.