SlideShare a Scribd company logo
D-Bus
Emre Can Kucukoglu
eckucukoglu@gmail.com
06.08.2015
What is d-bus?
Desktop bus, IPC mechanism.
Medium for local communication between processes
running on the same host.
1:1 request-reply, 1:n publish-subscribe.
Structured view of the data.
messages can be validated and ill-formed messages rejected.
low-level C binding, also Java, Perl and Python.
2
Buses
Processes connect to the daemon
using the library.
p2p communication library:
used by any two processes in order to exchange
messages among themselves.
the daemon:
any number of processes may be connected at
any given time.
Multiple buses may be active
simultaneously.
system bus:
system-wide communication.
session bus:
single user's ongoing session.
● Addresses describes how to connect to bus such as "/tmp/.hiddensocket”. They completely
hidden from the client process by the dbus library.
3
Connections
When a connection is set up, the bus immediately assigns it an immutable bus
name that it will retain for as long as the bus exists.
Services under well-known names that are agreed upon by convention, like
org.freedesktop.DBus.
4
Object model
objects,
proxies,
methods,
signals,
interfaces.
5
Objects
Created by a client process,
Exists within the context of that client's connection to the bus.
Message types carried by the bus:
Requests sent to objects by client processes.
Replies to requests, going from an object back to a requesting process.
One-way messages emanating from objects, broadcast to any connected clients
that have registered an interest in them.
6
Proxies
Local representation of an object that is really accessed through the bus, and
typically lives outside your program.
GLib binding’s proxies support failover.
7
Methods
When a client sends a request to an object, it sees this request as invoking a
method on the object.
Arguments can be passed and result back to the requester, along with either
result data or exception information.
Messages are encapsulated by d-bus library.
Both asynchronous & synchronous method invocation.
8
Signals
One-way communications come from an object and go client processes.
Client processes can register an interest in signals of a particular name
coming from a particular object.
There are no replies to signals.
No input and output parameters like methods do.
Allow clients to restrict their interest to cases where certain of the signal's
parameters match given values.
9
Interfaces
Every object supports particular methods and may emit particular signals.
These are specified in interfaces.
When a client invokes a method or listens for a signal, it must indicate the
object and the member {methods, signals} it is referring to.
10
Addressing
11
Overview picture
12
furthermore; Activation
Bus daemon can be instructed to start clients automatically when needed.
To achieve that describe client in a service file.
Default path: /usr/share/dbus-1/services/*.service
For example: client program /usr/local/bin/bankcounter can be run to provide
well-known bus names com.bigmoneybank.Deposits and
com.bigmoneybank.Withdrawals.
# Sample bankcounter.service file
[D-BUS Service]
Names=com.bigmoneybank.Deposits;
com.bigmoneybank.Withdrawals
Exec=/usr/local/bin/bankcounter
13
Performance
One-to-one communication was about 2.5x slower than simply pushing the
data raw over a socket.
Bus daemon should be about twice as slow as one-to-one mode, because a
round trip involves four socket reads/writes rather than two socket
reads/writes.
Overhead comes from:
Abstraction penalty (marshalling)
Data validation (‘no validation’ mode exist, but not recommended)
Raw bandwidth isn't the only concern; D-Bus is designed to enable
asynchronous communication and avoid round trips. This is frequently a
more important performance issue than throughput.
14
Why D-Bus?
difference from other IPC protocols:
d-bus is also lifecycle tracking, service activation, security policy, and
other higher-level structure and assumptions.
not good for:
internet applications,
clustering, distributed swarms, peer-to-peer.
good for:
desktop application talks to other parts of the desktop session,
communications between system daemons and communications between
the desktop and system daemons.
15
Why D-Bus?
Method call transition, signals, properties, oo, broadcasting,
discovery, introspection, policy, activation, synchronization,
type-safe marshalling, security, monitoring, exposes APIs/not
streams, passing of credentials, file descriptor passing,
language agnostic, network transparency, no trust required,
high-level error concepts.
retrieved from http://0pointer.de/public/lca.pdf
16
Drawbacks
Used for control, not payload.
Inefficient (10 copies, 4 validations, 4 context switches per
duplex method call transaction)
No implicit timestamping.
Not available in boot time.
Security framework hooks happen in userspace.
retrieved from http://0pointer.de/public/lca.pdf
17
alternative: kdbus
Efficient (2 or fewer copies, 2 validations, 2 context switches per
duplex method call transaction).
Implicit timestamping.
Always available, from earliest boot to latest shutdown.
Security framework hooks happen in kernel space.
retrieved from http://0pointer.de/public/lca.pdf
18
References
freedesktop.org: intr. to dbus.
freedesktop.org: dbus faq.
maemo: dbus.
qt 4.8: dbus documentation.
wiki: dbus.
linux.conf.au.: Lennart Poettering.
19

More Related Content

What's hot

Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
Thomas Graf
 
L2 over l3 ecnaspsulations (english)
L2 over l3 ecnaspsulations (english)L2 over l3 ecnaspsulations (english)
L2 over l3 ecnaspsulations (english)Motonori Shindo
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Jian-Hong Pan
 
Embedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOSEmbedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOS
艾鍗科技
 
242 naver-2
242 naver-2242 naver-2
242 naver-2NAVER D2
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
Alexey Lesovsky
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
Michelle Holley
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companion
Alexander Kukushkin
 
SQL Server vs Postgres
SQL Server vs PostgresSQL Server vs Postgres
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
Jaeseung Ha
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San JoseThe Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
Nikolay Samokhvalov
 
Hive Authorization
Hive AuthorizationHive Authorization
Hive Authorization
Minwoo Kim
 
Windows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPWindows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCP
Seungmo Koo
 
Introduction To SELinux
Introduction To SELinuxIntroduction To SELinux
Introduction To SELinux
Rene Cunningham
 
Multithread & shared_ptr
Multithread & shared_ptrMultithread & shared_ptr
Multithread & shared_ptr
내훈 정
 
Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!
Kent Chen
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
PLUMgrid
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Cheng-Chun William Tu
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
I Goo Lee
 

What's hot (20)

Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
L2 over l3 ecnaspsulations (english)
L2 over l3 ecnaspsulations (english)L2 over l3 ecnaspsulations (english)
L2 over l3 ecnaspsulations (english)
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Embedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOSEmbedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOS
 
242 naver-2
242 naver-2242 naver-2
242 naver-2
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companion
 
SQL Server vs Postgres
SQL Server vs PostgresSQL Server vs Postgres
SQL Server vs Postgres
 
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San JoseThe Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
 
Hive Authorization
Hive AuthorizationHive Authorization
Hive Authorization
 
Windows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPWindows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCP
 
Introduction To SELinux
Introduction To SELinuxIntroduction To SELinux
Introduction To SELinux
 
Multithread & shared_ptr
Multithread & shared_ptrMultithread & shared_ptr
Multithread & shared_ptr
 
Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 

Similar to D-bus basics

Designing Application over mobile environment
Designing Application over mobile environmentDesigning Application over mobile environment
Designing Application over mobile environment
Maulik Patel
 
Chapter 3-Processes.ppt
Chapter 3-Processes.pptChapter 3-Processes.ppt
Chapter 3-Processes.ppt
sirajmohammed35
 
Internetworking
InternetworkingInternetworking
InternetworkingRaghu nath
 
Lec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdfLec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdf
samaghorab
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct doxBaig Mirza
 
Lecture5 architecture styles.pdf
Lecture5 architecture styles.pdfLecture5 architecture styles.pdf
Lecture5 architecture styles.pdf
ssuser9d62d6
 
Task communication
Task communicationTask communication
Task communication
1jayanti
 
distributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptxdistributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptx
lencho3d
 
Viloria osi layer4-7
Viloria osi layer4-7Viloria osi layer4-7
Viloria osi layer4-7
Jhoniel Viloria
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Sehrish Asif
 
Chapter 3-Processes2.pptx
Chapter 3-Processes2.pptxChapter 3-Processes2.pptx
Chapter 3-Processes2.pptx
MeymunaMohammed1
 
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
characteristicsofdistributedsystem-121004123308-phpapp02.pptcharacteristicsofdistributedsystem-121004123308-phpapp02.ppt
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
RamkumardevendiranDe
 
Module1 Mobile Computing Architecture
Module1 Mobile Computing ArchitectureModule1 Mobile Computing Architecture
Module1 Mobile Computing Architecture
raksharao
 
Presentation of ditributed system
Presentation of ditributed systemPresentation of ditributed system
Presentation of ditributed system
google
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
Aya Mahmoud
 
Java Networking
Java NetworkingJava Networking
Java Networking
68SachinYadavSYCS
 
Software architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding GuideSoftware architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding Guide
Mohammed Fazuluddin
 
Note: Introduction to Computer Networks
Note: Introduction to Computer Networks Note: Introduction to Computer Networks
Note: Introduction to Computer Networks
Hasibul Islam Nirob
 
An in-building multi-server cloud system based on shortest Path algorithm dep...
An in-building multi-server cloud system based on shortest Path algorithm dep...An in-building multi-server cloud system based on shortest Path algorithm dep...
An in-building multi-server cloud system based on shortest Path algorithm dep...
IOSR Journals
 

Similar to D-bus basics (20)

Designing Application over mobile environment
Designing Application over mobile environmentDesigning Application over mobile environment
Designing Application over mobile environment
 
Chapter 3-Processes.ppt
Chapter 3-Processes.pptChapter 3-Processes.ppt
Chapter 3-Processes.ppt
 
Internetworking
InternetworkingInternetworking
Internetworking
 
Lec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdfLec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdf
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct dox
 
Lecture5 architecture styles.pdf
Lecture5 architecture styles.pdfLecture5 architecture styles.pdf
Lecture5 architecture styles.pdf
 
Task communication
Task communicationTask communication
Task communication
 
distributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptxdistributed-systemsfghjjjijoijioj-chap3.pptx
distributed-systemsfghjjjijoijioj-chap3.pptx
 
Viloria osi layer4-7
Viloria osi layer4-7Viloria osi layer4-7
Viloria osi layer4-7
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
 
04 Client Server Computing
04 Client Server Computing04 Client Server Computing
04 Client Server Computing
 
Chapter 3-Processes2.pptx
Chapter 3-Processes2.pptxChapter 3-Processes2.pptx
Chapter 3-Processes2.pptx
 
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
characteristicsofdistributedsystem-121004123308-phpapp02.pptcharacteristicsofdistributedsystem-121004123308-phpapp02.ppt
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
 
Module1 Mobile Computing Architecture
Module1 Mobile Computing ArchitectureModule1 Mobile Computing Architecture
Module1 Mobile Computing Architecture
 
Presentation of ditributed system
Presentation of ditributed systemPresentation of ditributed system
Presentation of ditributed system
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
Software architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding GuideSoftware architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding Guide
 
Note: Introduction to Computer Networks
Note: Introduction to Computer Networks Note: Introduction to Computer Networks
Note: Introduction to Computer Networks
 
An in-building multi-server cloud system based on shortest Path algorithm dep...
An in-building multi-server cloud system based on shortest Path algorithm dep...An in-building multi-server cloud system based on shortest Path algorithm dep...
An in-building multi-server cloud system based on shortest Path algorithm dep...
 

Recently uploaded

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 

Recently uploaded (20)

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 

D-bus basics

  • 2. What is d-bus? Desktop bus, IPC mechanism. Medium for local communication between processes running on the same host. 1:1 request-reply, 1:n publish-subscribe. Structured view of the data. messages can be validated and ill-formed messages rejected. low-level C binding, also Java, Perl and Python. 2
  • 3. Buses Processes connect to the daemon using the library. p2p communication library: used by any two processes in order to exchange messages among themselves. the daemon: any number of processes may be connected at any given time. Multiple buses may be active simultaneously. system bus: system-wide communication. session bus: single user's ongoing session. ● Addresses describes how to connect to bus such as "/tmp/.hiddensocket”. They completely hidden from the client process by the dbus library. 3
  • 4. Connections When a connection is set up, the bus immediately assigns it an immutable bus name that it will retain for as long as the bus exists. Services under well-known names that are agreed upon by convention, like org.freedesktop.DBus. 4
  • 6. Objects Created by a client process, Exists within the context of that client's connection to the bus. Message types carried by the bus: Requests sent to objects by client processes. Replies to requests, going from an object back to a requesting process. One-way messages emanating from objects, broadcast to any connected clients that have registered an interest in them. 6
  • 7. Proxies Local representation of an object that is really accessed through the bus, and typically lives outside your program. GLib binding’s proxies support failover. 7
  • 8. Methods When a client sends a request to an object, it sees this request as invoking a method on the object. Arguments can be passed and result back to the requester, along with either result data or exception information. Messages are encapsulated by d-bus library. Both asynchronous & synchronous method invocation. 8
  • 9. Signals One-way communications come from an object and go client processes. Client processes can register an interest in signals of a particular name coming from a particular object. There are no replies to signals. No input and output parameters like methods do. Allow clients to restrict their interest to cases where certain of the signal's parameters match given values. 9
  • 10. Interfaces Every object supports particular methods and may emit particular signals. These are specified in interfaces. When a client invokes a method or listens for a signal, it must indicate the object and the member {methods, signals} it is referring to. 10
  • 13. furthermore; Activation Bus daemon can be instructed to start clients automatically when needed. To achieve that describe client in a service file. Default path: /usr/share/dbus-1/services/*.service For example: client program /usr/local/bin/bankcounter can be run to provide well-known bus names com.bigmoneybank.Deposits and com.bigmoneybank.Withdrawals. # Sample bankcounter.service file [D-BUS Service] Names=com.bigmoneybank.Deposits; com.bigmoneybank.Withdrawals Exec=/usr/local/bin/bankcounter 13
  • 14. Performance One-to-one communication was about 2.5x slower than simply pushing the data raw over a socket. Bus daemon should be about twice as slow as one-to-one mode, because a round trip involves four socket reads/writes rather than two socket reads/writes. Overhead comes from: Abstraction penalty (marshalling) Data validation (‘no validation’ mode exist, but not recommended) Raw bandwidth isn't the only concern; D-Bus is designed to enable asynchronous communication and avoid round trips. This is frequently a more important performance issue than throughput. 14
  • 15. Why D-Bus? difference from other IPC protocols: d-bus is also lifecycle tracking, service activation, security policy, and other higher-level structure and assumptions. not good for: internet applications, clustering, distributed swarms, peer-to-peer. good for: desktop application talks to other parts of the desktop session, communications between system daemons and communications between the desktop and system daemons. 15
  • 16. Why D-Bus? Method call transition, signals, properties, oo, broadcasting, discovery, introspection, policy, activation, synchronization, type-safe marshalling, security, monitoring, exposes APIs/not streams, passing of credentials, file descriptor passing, language agnostic, network transparency, no trust required, high-level error concepts. retrieved from http://0pointer.de/public/lca.pdf 16
  • 17. Drawbacks Used for control, not payload. Inefficient (10 copies, 4 validations, 4 context switches per duplex method call transaction) No implicit timestamping. Not available in boot time. Security framework hooks happen in userspace. retrieved from http://0pointer.de/public/lca.pdf 17
  • 18. alternative: kdbus Efficient (2 or fewer copies, 2 validations, 2 context switches per duplex method call transaction). Implicit timestamping. Always available, from earliest boot to latest shutdown. Security framework hooks happen in kernel space. retrieved from http://0pointer.de/public/lca.pdf 18
  • 19. References freedesktop.org: intr. to dbus. freedesktop.org: dbus faq. maemo: dbus. qt 4.8: dbus documentation. wiki: dbus. linux.conf.au.: Lennart Poettering. 19