Intelligent Discovery, Configuration and Composition of Devices in a Distributed System
Total Page:16
File Type:pdf, Size:1020Kb
Intelligent Discovery, Configuration and Composition of Devices in a Distributed System Nicole Kaiyan Thesis submitted for the degree of Doctor of Philosophy in the School of Computer Science Faculty of Engineering, Computer and Mathematical Sciences The University of Adelaide Adelaide SA 5005 AUSTRALIA 2014 ii Abstract Establishing access to the functionality of input/output devices across a distributed system presents significant challenges worth investigating. To accomplish this requires locating devices and understanding their identity so that requests for them can be satisfied. Current systems require the domain of requestable devices be resolved beforehand and that they be identified as discrete items. Additionally, configuring devices only happens if an operating system has access to suitable drivers and composition is conducted by middleware applications, without any system service awareness. These approaches restrict device use in a distributed context and fail to provide a satisfactory solution. This research has the goal of accomplishing access to devices in a distributed system without such constraints. We present an approach where devices are described by a language based upon a rich taxonomy of form and function. Requests for devices are formulated using the same language and a matching process is employed to satisfy requests. The devices capable of being matched may be rich in functionality, complex, consist of sub-units, and include those yet to be developed. A taxonomy capturing the scope of form and function populates the description space with terms relevant to devices. The description space is structured hierarchically to manage complexity. A contribution is also made to improving the design and integration of operating systems components, in particular, those services responsible for managing devices, from configuration through to composition, and accomplishing such across a distributed system. In this context, configuration serves as a local system response to device connections, ensuring they become operational then advertising their availability remotely. Distributed composition services receive these notifications, adding device descriptions to a database for use when matching requests. We have adopted the language Prolog to describe devices and for implementing a distributed system. It supports a database of device descriptions in the form of assertions and provides powerful support for matching via an inference engine. The inference engine systematically examines a potentially large and complex search space for an acceptable extent of correspondence. Requests can be expressed minimally as those elements of a device relevant to matching. A consequence of this style of matching is the ability to allow requesters partial access to device functionality as a result of incomplete satisfaction. Through awareness of the device domain, the composition process handles allocation of control and access arbitration. A demonstration of structural matching is provided through a fully worked example. We set out to build a distributed system with sufficient capability to investigate structural matching between requests for functionality and device identities. Furthermore, to accomplish this dynamically when devices connect and permit access to their functionality as the outcome of matching requests. The resultant schema presents a comprehensive solution by combining a structured language, expressive enough to describe current devices and future possibilities, with a tailored inference engine, designed to compose an entire distributed system. iii iv Acknowledgements A research program spanning more than a decade would not have managed to sculpture a significant contribution to knowledge without the collective support and contributions from key people in my life. Francis, in his role as principal advisor, receives a debt of thanks that runs deep. The project that I came to you with required an extraordinary supervisor, to mould it into a shape where it could fit it into a thesis. Together, we dared to dream of a better world, to explore computer science at the edges of what was possible and to look up at the blue sky and wonder. Chris, as the overseeing advisor, always the sensible and wise one. I am grateful to you for encouraging Francis and I to make something of this unique opportunity to work together. Also, for the friendly fun evenings spent at your place discussing research, then enjoying fine wine and food. Peter, the enthusiastic researcher, astounding programmer and most of all a friend. We met as both of us encountered the write up stage and, through our discussions, a common interest in Operating Systems emerged. I look forward to the years ahead and the chance to discuss how we might shape the discipline. Significant friends from my journey are NV, Jonno, Richard and Thoran. I would not have been able to figure out the important issues had each of you not been so enthusiastic about chatting, showing insight, and encouraging me to keep gophering away. Michael B. the mathematician, for his encouragement to stick at trying to explain the concept that I saw outside the cave and not let wild horses drag me away from the project, no matter how hard it becomes to make progress. My sister, Shello, who acknowledged the sacrifices required of long term study and the extreme financial struggle to keep the show going. You made a difference when there was no one else I was able to turn to for support. My mother and father, who have been there to provide support and encourage me to keep going when I doubted my strength to continue. Finally to my father, who such a long time ago impressed me with a grand typed manuscript that was his PhD thesis. You inspired me to want to make my own contribution to the world of intellectual enquiry. v vi Statement of Originality This work contains no material which has been accepted for the award of any other degree or diploma in any university or other tertiary institution to Nicole Kaiyan and, to the best of my knowledge and belief, contains no material previously published or written by another person, except where due reference has been made in the text. I give consent to this copy of my thesis, when deposited in the University Library, being made available for loan and photocopying, subject to the provisions of the Copyright Act 1968. I also give permission for the digital version of my thesis to be made available on the web, via the University’s digital research repository, the Library catalogue and also through web search engines, unless permission has been granted by the University to restrict access for a period of time. ____________ Nicole Kaiyan 2014 vii viii Contents Abstract iii Acknowledgements v Statement of Originality vii List of Figures xiii 1 Introduction 1 1.1 Home Automation 1 1.2 Analysing the Example 2 1.3 The Challenge 3 2 Issues with Distributed Systems 5 2.1 Building a Capacity to Endure 5 2.1.1 Model of the Process 5 2.2 Discovery 7 2.2.1 Achieving Remote Awareness 7 2.2.2 Shortcomings in Distributed Awareness 10 2.3 Configuration 13 2.3.1 Articulating System Dependencies 13 2.3.2 Impact of Dependencies 24 2.4 Composition 26 2.4.1 Describing Devices 26 2.4.2 Problems With Device Descriptions 36 2.4.3 The Distributed Match Process 36 2.4.4 Issues With Distributed Composition 40 2.5 Requirements of a System 41 2.5.1 Trends and Contexts 41 2.5.2 Arriving at the Technical Requirements 42 3 The Distributed System 43 3.1 Distributed Services 43 3.1.1 Distributed Agreement 43 3.1.2 Service Architecture for Composition 44 3.2 IO_Discovery Service 46 3.2.1 Tasks Performed by the IO_Discovery Service 46 3.2.2 Implementing the IO_Discovery Service 46 3.2.3 Interconnect Specification Changes 47 3.2.4 Requirements of Device Descriptions 48 3.2.5 Protocol Definitions 48 3.2.6 Records Maintained 50 3.2.7 Changes to Computer System Specifications 52 3.3 IO_Configuration Service 53 3.3.1 Tasks Performed by the IO_Configuration Service 53 3.3.2 Implementing the IO_Configuration Service 53 3.3.3 Interconnect Specification Changes 54 3.3.4 Requirements of Device Descriptions 55 3.3.5 Protocol Definitions 56 3.3.6 Records Maintained 56 3.3.7 Changes to Computer System Specifications 57 3.4 IO_Composition Service 59 3.4.1 Tasks Performed by the IO_Composition Service 59 3.4.2 Implementing the IO_Composition Service 59 ix 3.4.3 Requirements of the Match Process 60 3.4.4 Requirements of Device Descriptions 60 3.4.5 Protocol Definitions 60 3.4.6 Changes to Computer System Specifications 61 3.5 Support Services 62 3.5.1 IO_Resources 62 3.5.2 IO_Requesters 62 3.5.3 IO_Outlets 62 3.5.4 IO_Results 63 3.6 Event Sequencing 64 3.6.1 Device Connect 64 3.6.2 Device Disconnect 65 3.6.3 System Connect 66 3.6.4 System Disconnect 67 3.6.5 Requester Create 68 3.6.6 Requester Cancel 68 3.6.7 Perform Match 69 4 Taxonomy and Structural Description of Devices 73 4.1 Overcoming Named Type Restrictions 73 4.1.1 Assigning Types to Whole Devices 73 4.1.2 Assigning Types to Code Interfaces 74 4.1.3 Implied Device Properties 74 4.2 Exploring Structural Description 76 4.2.1 Properties to Describe Devices 76 4.2.2 Interaction at the User Interface 76 4.2.3 Physicality of Devices 82 4.2.4 Operational Control 85 4.2.5 Concurrency and Sharing Access 88 4.2.6 Non-Functional Aspects 89 4.2.7 Finer Grained Description 91 4.3 Building an I/O Taxonomy 94 4.3.1 Problems Encountered Compiling Taxonomies 94 4.3.2 Structurally Relating Terms 95 4.3.3 A Taxonomy of I/O 97 4.4 Device Typing 98 4.4.1 Structural Typing