Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Support Mental Health. Or I'll kill you.


devel / comp.unix.programmer / D-Bus Versus Varlink

SubjectAuthor
o D-Bus Versus VarlinkLawrence D'Oliveiro

1
D-Bus Versus Varlink

<utgo8q$22vc4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11511&group=comp.unix.programmer#11511

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.programmer
Subject: D-Bus Versus Varlink
Date: Thu, 21 Mar 2024 07:40:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <utgo8q$22vc4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 21 Mar 2024 07:40:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="badb6633f042ee08dd03f65d8f49603e";
logging-data="2194820"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+THj4X//K3OuDe/975gAYV"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:LLhgqQrjPG4qkCudc2M8VRLrZIM=
 by: Lawrence D'Oliv - Thu, 21 Mar 2024 07:40 UTC

I recently discovered the existence of Varlink <https://varlink.org/>.
Turns out it’s been around for a few years--here
<https://lwn.net/Articles/742675/> is some discussion of a rationale for
its creation. Note this bit:

... it aims to provide IPC from early boot onward, though it does
not really address the longtime D-Bus performance complaints that
also served as motivation for kdbus and bus1.

Commonalities with D-Bus:
* the concept of an “interface”, uniquely named according to the common
reverse-domain format; which (among other things) defines named
“methods”, each of which takes zero or more arguments
(“in-parameters”) of specified types, and returns zero or more
results (“out-parameters”) of specified types.
* A standardized introspection interface, that can be used to query a
connection peer as to what interfaces it supports, and how they are
defined.

Differences from D-Bus:
* No concept of an object path as the target of a method call. Hence no
standardized interfaces for managing such objects, no get/set
properties etc.
* No “signals” as such; however, method calls can return no reply, or
even multiple replies. They can also return an “error” message
indicating something went wrong with the method call.
* Point-to-point protocol, no intermediary daemon. So a client has to
know the address (Unix socket, TCP etc) to connect to.
* Messages are JSON structs with standardized top-level fields;
messages are terminated by a null byte.
* Struct field/argument types may be marked as “optional”, which means
that the value is allowed to be null.
* Allows user-defined enumeration types, with specified strings as
values.
* Allows user-defined names for enumeration and struct types.
* Defines its own introspection language, not based on XML (or JSON,
or anything else immediately recognizable.)

(Anything else I missed?)

Note that a struct definition has exactly the same syntax as the
argument lists for methods and errors. Interesting that, instead of
C-style “«type» «name»” ordering for field/argument definitions, they
opted for Pascal-style “«name» : «type»” syntax. Named types are also
defined as “type «name» «definition»”, not as C would have it “typedef
«definition» «name»”.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor