Puneet's Blog
  • Home
  • About Me
  • Planet KDE
  • GSoC
Follow

Posts tagged dbus

GSoC Update!

Jun28
2012
3 Comments Written by Puneet

Hello all KDE Fans,

As my project is concentrated on dbus tubes, I had to develop an application which implemented the dbus tubes. KWhiteboard was the perfect application for that. So I removed all the extra features that were not needed and I was left with a simple application for testing purposes.

My next task was to implement the org.freedesktop.DBus.Peer interface. I had to implement the Ping method and the GetMachineId method in it. At first, I took my time understanding the concepts of interfaces and adaptors. At the very first place, it did not take much time to implement the methods using the session bus, as in Ping method I just had to write a kDebug output and in retrieving the machine ID I used the QDBusConnection::localMachineId () method. Initially, it was working at its best. But as soon as I started testing it with the DBus Tubes by connecting it with a telepathy service, it gave me a lot of problems, the most significant one being explained later in the text. Now, Daniele even found out that the Peer interface was already implemented in QT and was not shown in the Introspect because Daniele’s patch was yet to be released in another QT 4.8.X may be.

One main problem that I faced was the QDBusInterface using blocking DBus calls in constructor. In this case Daniele suggested me to split my program into two halves where one of them would be registered for handling outgoing dbus tubes and the other for incoming dbus tubes.Machine will know by itself about the tube to be handled by respective half and will pass the channels with the right properties. At first it seems pretty easy when you/to work on the interfaces with the session bus, but it creates a lot of problem when it comes to the peer-to-peer DBus. After both, the applications were working successfully on the same machine,thanks to Daniele, I finally got back implementing the interface and didnt took much time as it was already implemented in the QT.

Then it was time to implement the org.freedesktop.DBus.ObjectManager Interface. First job was to send a signal to the other machine that was connected with the DBus Connection; if a new object was registered, some properties are changed and a new interface is added or removed. To send a signal, I couldn’t just write “emit interfaceAdded();”. For this I needed an adaptor that implements the interface on the DBus, but you cannot know when an object is registered, unless it is directly implemented in QT. Therefore some methods, that the applications will use when they register one object on DBus, were needed to tell the interface to emit the signals.
On the other side, an interface (QDBusAbstractInterface) was needed to listen to the signals and to call the methods.I will be explaining the whole process in a new post with much better explanation.

Now as I have completed all this, I have the KWhiteboard ready to test it. As Daniele suggested, I will try to make a tabbed KWhiteboard where when one side opens a new tab, a new object will get registered on the dbus.The adaptor will emit the signal, the proxy will receive it and the program that will be listening to that signal, will open a new tab on the otherside as well.

I have just started writing blog. Any type of suggestions or comments are welcome.

Regards,
Puneet

Posted in GSoC, Planet KDE - Tagged dbus adaptors, dbus interface, dbus signals, GSoC, objectmanager interface, Peer interface
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail

GSoC Project: Enhancement to peer-to-peer DBus for Telepathy DBus Tubes

Jun14
2012
1 Comment Written by Puneet

Hello Planet KDE!

My name is Puneet Goyal. I am a B.Tech. 4th Year Student in Delhi Technological University, New Delhi, India. My GSoC  Project is an Enhancement to Peer-to-Peer DBus for Telepathy DBus Tubes. My mentor Daniele is one of the most awesome person I have ever met. He has great DBus Skills and also did a GSoC Project last year on Telepathy Tubes and File Transfer in KDE.

You can find more about Telepathy and Telepathy Tubes here .

D-Bus Tubes allow you to share a private DBus between two or more clients, proxied over Telepathy.Telepathy is a flexible, modular communications framework that enables real-time communication via pluggable protocol backends. Telepathy is a communications service that can be accessed by many applications (“clients”) simultaneously.D-Bus is a message bus system, a simple way for applications to talk to one another.

When an application connects to a peer to peer dbus tube, it is difficult to know if an object is registered or unregistered. Even when it registers for another object, the other side of the tube must know about it. So the idea is to create a class that could ease the object to register and unregister on the DBus Tubes and access the information about it.It would even let us create and share as many objects as we need, for e.g, we may want to run a number of kwhiteboard applications and share them with other peers.

This might even be possible using introspection, but it is not a good way to implement it because there are no signals on the introspect interface, so it won’t be possible to know if other the remote side has registered some new object.Also,different channels and connection objects may offer different interfaces to each other, depending on the capabilities of the channel or connection, but that most of the implementations of D-Bus introspection assume that all objects of the same class will have the same interfaces.

Thanks a lot to Daniele, George Kiagiadakis and David for helping me out.

These summer holidays are going to be a lot of fun and interesting :D


 

Posted in GSoC, Planet KDE - Tagged planet kde
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail

Recent Posts

  • GSoC Update!
  • GSoC Project: Enhancement to peer-to-peer DBus for Telepathy DBus Tubes

Archives

  • June 2012

Categories

  • GSoC
  • Planet KDE

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Blogroll

  • Akshit Peer
  • Daniele E. Domenichelli
  • David Edmundson
  • Gautam Prabhakar
  • Planet KDE

EvoLve theme by Theme4Press  •  Powered by WordPress Puneet's Blog