Vali, a C library for Varlink
emersion.fr
Vali, a C library for Varlink
1–10 of 16 posts
Re: Vali, a C library for Varlink
#2Re: Vali, a C library for Varlink
#3What does varlink do that grpc or capnproto don't offer? Hell, it doesn't even seem much batter than openapi...
Re: Vali, a C library for Varlink
#4What does varlink do that grpc or capnproto don't offer? Hell, it doesn't even seem much batter than openapi...
The main use-case is different: gRPC and Cap'n'Proto are designed for networked servers, while D-Bus and Varlink are designed for local IPC. Varlink is a lot simpler than other alternatives.
This might enf up being be fine, but it gave me pause when I looked at it previously.
Re: Vali, a C library for Varlink
#5Though my Haskell and Rust primed brain really dislikes the way ownership of the memory allocation for the response struct works.
It gets allocated by the caller (library), handed over to the function fully owned, and then gets consumed by the response function?
Re: Vali, a C library for Varlink
#6Earlier quoted context omitted.
The main use-case is different: gRPC and Cap'n'Proto are designed for networked servers, while D-Bus and Varlink are designed for local IPC. Varlink is a lot simpler than other alternatives.
I've only had a cursory look at Varlink, but it almost felt too simple. In particular the lack of unsigned or sized integers. This might enf up being be fine, but it gave me pause when I looked at it previously.
We've been using Varlink for one project, but I've never found myself in a situation where I had any benefit from the data being JSON. You rarely read the raw data. But compared to gRPC or CapnProto, you lost compile-time type checking and now you need 10mins of testing a vending machine before you get a "key not found"-error because you missed one spot on renaming.
Also, I've written varlink-cpp building on asio and nl-json at some point: https://github.com/wolletd/varlink-cpp. But as our varlink usage declined, it never found much usage and isn't maintained.
Re: Vali, a C library for Varlink
#7Earlier quoted context omitted.
I've only had a cursory look at Varlink, but it almost felt too simple. In particular the lack of unsigned or sized integers. This might enf up being be fine, but it gave me pause when I looked at it previously.
It's JSON with some simple idea of RPC added to it. With the main idea apparently being that it is human-readable. We've been using Varlink for one project, but I've never found myself in a situation where I had any benefit from the data being JSON. You rarely read the raw data. But compared to gRPC or CapnProto, you lost compile-time type checking and now you need 10mins of testing a vending machine before you get a…