In this repository, we test D-Bus by providing clear examples of how to implement both a client and a server in two popular programming languages: C and Python. D-Bus is a powerful inter-process communication protocol that is widely used in Linux for software components to communicate with each other.
Our overarching aim is to delve deep into the D-Bus communication protocol and harness its capabilities for inter-process communication. By embarking on this project, we're not only setting out to understand D-Bus in theory but also to practically implement and test it across different programming languages, namely C and Python.
To be more specific, our objectives are:
- Understanding D-Bus: Gain a comprehensive understanding of the D-Bus communication protocol.
- Cross-Language Implementation: Develop both client and server programs using C and Python, showcasing the flexibility and applicability of D-Bus across languages.
- Seamless Communication: Implement and test communication between the client and server, ensuring seamless data exchange through method calls and return values.
- Error Handling Mastery: Familiarize ourselves with error handling in D-Bus, preparing for any potential pitfalls or exceptions that may arise.
- Evaluating Interoperability: Evaluate the characteristics, advantages, and challenges of D-Bus communication between different languages.
- Broadening Networking Knowledge: Ultimately, elevate our knowledge in communication protocols and networking as a whole through hands-on experience.
To run the code, ensure you have the required libraries and dependencies installed.
Follow the setting README.
- pydbus-client.py : Contains the Python implementation of a D-Bus client using the dbus module.
python3 pydbus-client.py
- add-client.c: Contains the C implementation of a D-Bus client(sender).
make
./add-client_execution
- pydbus-server.py: Contains the Python implementation of a D-Bus server using the dbus module.
python3 pydbus-server.py
- add-server.c: Contains the C implementation of a D-Bus server(receiver).
make
./add-server_execution