I'm currently trying to write up something approaching, you might want to have a look at those high level modules :
- IO::Socket::UNIX allows you to specify the number of requests you might cache
- Storable for data serialization, it allows you to serialize easily deeply nested structures into a network format and put that data directly into a file handle (nstore_fd, fd_retrieve)
About the rpc protocol since you want to use UNIX sockets and (correct me if I'm mistaken) I AM!those are half duplex you might want to go full duplex with two sets of sockets : one with a high listen parameters which will cache the request and a number of sockets which will receive the answers as fast as they are produced.
I guess (again correct me if I'm wrong) that you could serialize the reply socket filehandle in whatever object you are sending
Just my two cents, I find this topic very interesting :)