this post was submitted on 28 Dec 2023
202 points (81.8% liked)
Linux
48328 readers
589 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Wouldn't this also be possible with plain sockets tho? To continue with your example of music players, the current standard is MPRIS, which uses dbus. But in an alternate universe, the people behind MPRIS could just have decided that music players shall create sockets at
/run/user/1000/mpris/[player name]
that all speak the same standardized protocol. If a player wanted to add functionality beyond MPRIS, it could accept nonstandard requests on its socket, or create a new socket altogether for extended control.I just don't see how this would require any more coordination between developers than the current solution. And I don't see how dbus can save you from having to "understanding every single [...] app out there". If anything, it adds the overhead of learning how dbus itself works, on top of how a specific app's dbus interface works.
You keep using this phrase. Given time and money anything is possible. Technically we don't need to use http - every server could implement their own standard using raw sockets. You then could download a simple client library for every site!
With a well defined dbus interface your application can talk to any number of applications that implement that interface. Even those you didn't know about it at time of development. It provides a structure for ipc other than "go fetch libblah" and also "libblarg" and "libfloob" and read all of their docs and implement each one separately.
Many toolkits make dbus usage simple. It’s also introspectable so very easy to explore or generate bindings for dynamically.
It’s pretty nice to use IME.
this is the real answer - programming language bindings
Anything is possible with sockets... and that is a meaningless statement. It is like saying you can build anything with bricks. Technically true, but missing all the important details of how.
In an alternative universe we could have done so many things differently to solve the same problems. But we don't live there and in our universe dbus was the attempt to solve that problem among others. And yes you can create a standardization for music players easily enough - but what about notifications, and everything else? DBus tries to be a generic interface anything can talk over at a logical level - rather that just being the basic way two process can physically send bytes between each other.