Premium
Event‐driven asynchronous method calls with the D‐Bus message system
Author(s) -
Salli Olli,
Nevalainen Olli,
Leppänen Ville
Publication year - 2015
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.2216
Subject(s) - computer science , asynchronous communication , erlang (programming language) , event (particle physics) , xml , javascript , software , focus (optics) , distributed computing , embedded system , operating system , computer network , world wide web , programming language , functional programming , physics , quantum mechanics , optics
SUMMARY The use of inter‐process communication can yield many benefits for event‐driven desktop software. However, inter‐process communication (IPC) research has traditionally been focused on calculation‐oriented distributed computing. This article shows that existing IPC solutions are a poor fit for the constraints imposed by event‐driven programming. Our novel solution is built on top of the D‐Bus system, which enjoys increased practical usage, but is still scantily researched. We focus on efficient handling of asynchronous D‐Bus method calls, in a fashion similar to how Hypertext Transfer Protocol requests are treated in Asynchronous JavaScript and XML Web applications. This is supplemented with two design patterns that simplify processing of results for many kinds of asynchronous operations in event‐driven software, besides just D‐Bus calls. Our approach is shown to be more appropriate for event‐driven applications than traditional remote procedure call systems in aspects as diverse as interactivity, threading complexity and electrical power usage. Copyright © 2013 John Wiley & Sons, Ltd.