linux-varlink icon indicating copy to clipboard operation
linux-varlink copied to clipboard

Why?

Open i-rinat opened this issue 6 years ago • 2 comments

I've skimmed through the site (https://varlink.org/), but found no answer to the question in the title: Why?

I can understand that JSON is a "modern" way. Using in it kernel is fresh and exciting and everything else. But what existing issues does it solve? Why existing interfaces are not enough?

Also, what about binary data transfer? JSON is either UTF-8 or \u-encoded Unicode. What about arbitrary data transfer? Is it limited to text only? What about JSON validation?

i-rinat avatar Sep 15 '19 12:09 i-rinat

I've just noticed that commit dates are almost a year old. This PoC was discovered by a (some) local news site, so I thought it's something recently created. Sorry for that.

Answers to the questions will be appreciated though.

i-rinat avatar Sep 15 '19 12:09 i-rinat

I was kind of interested in this too, just out of curiosity. What would be the purpose of a varlink "device"?


@i-rinat As far as being able to transfer non-JSON over varlink, I didn't look deep into it, but you can create a varlink method that supports upgrading the connection and allowing you to send arbitrary data over the connection. This is supposedly similar to the way that WebSockets work ( I don't know anything about how WebSockets work myself ).

The caveat is that once the connnection is upgraded you have to create a new connection if you want to talk JSON RPC again. Not really a problem, though. Just a usage detail.

zicklag avatar Nov 15 '19 01:11 zicklag