標籤:
What is AllJoyn?[是一個合作的開源軟體架構目的在於串連萬物]
An Open Source API Framework For the Internet of Everything
A way devices and applications publish APIs over a network in a standard way
Why APIs?
– Because this is what software developers understand and work with every day
These APIs are the functionality that the “things” on the network expose to other “things”
– E.g. temperature, time of day, etc.…
– Services and/or devices can compose these APIs to provide whatever set of functionality they require
– The APIs are critical to interoperability between devices and services
How do applications know what APIs are available?
– AllJoyn provides application discovery and fine-grained discovery of the APIs supported by applications
– This is accomplished in a platform and radio-link agnostic way
Overview[它是一個分布式軟體匯流排,該匯流排提供的“介質”能夠使AllJoyn應用互相通訊,應用可以被固化在微處理器、手機apps或者是傳統的PC應用或服務;一個應用既可以是伺服器又可以是用戶端;該Bus的建立是ad hoc]
AllJoyn implements a “distributed software bus”
– The bus provides the “medium” that enables AllJoyn applications to communicate via published APIs
? Applications may be firmware on microcontrollers, mobile device “apps” or traditional applications on PCs/servers
– Applications publishing APIs are services, while those consuming the APIs are clients
? An application can be both a service and a client: this is makes AllJoyn a peer-to-peer system
– Communication is via messages that map directly to APIs in high-level programming languages
Bus formation is ad hoc
– Based on discovery of applications/services
– Abstracts link-specific discovery mechanisms
Protocol is network-independent
– Wire protocol is based on the D-Bus wire-protocol with extensions
– Can run over Wi-Fi, Wi-Fi Direct, Ethernet, PLC and Bluetooth
? Could likely run over others
High Level System Architecture[高層次體繫結構包括路由節點和頁節點,路由節點可以連線路由節點或分葉節點,分葉節點只能串連分葉節點]
AllJoyn Bus is composed of two types of nodes:
– Routing Nodes (RN)
– Leaf Nodes (LN)
? LN can only connect to RN
? RN can connect to other RN
– AllJoyn can be thought of as a mesh of stars
Ad Hoc Bus Formation: Discovery[Ad Hoc Bus的發現機制:介面描述包含在About Message中,真正的發現機制是依賴運輸層的,不同運輸層採用的協議多不相同]
Interface descriptions contained in About message
? Services advertise, and Clients find, About messages
? connect to advertisers supporting desired interfaces
Actual discovery mechanism is transport dependent:
? On Wi-Fi, PLC, Ethernet: lightweight IP multicast protocol
? On Wi-Fi Direct: would use pre-association discovery
Ad Hoc Bus Formation: Session Creation[會話建立將導致bus串連擴充]
Session creation will cause Routing Nodes to connect and extend the bus
? Once connected, buses merge and have a single shared namespace
? Peers can discover when other peers join or leave the bus
? Peers can interact via their APIs
? Session reference counting keeps device-to-device connections alive
? Multicast events can be sent to all peers in the session
AllJoyn Software Framework: High-level architecture[軟體架構高層體繫結構]
A comprehensive software communication framework
Software Components[AllJoyn由Client Library和Router組成。其中Client Library包括Standard Client(SC)和Thin Client(TC),SC跑在HLOS上,支援多線程,不同開發平台和語言。TC限制比較多,僅有C語言]
AllJoyn has two main architectural components: the Client Library and the Router
Client Library
– This is referred to as a Client Library because all AllJoyn applications are clients of the router
? This is true regardless of if, in their application context, they are exposing services, or are clients of other services
? Applications are peers if they implement both client and service functionality
– The Client Library is what software developers interact with: the API set of the AllJoyn SDK
– There are two implementations of the Client Library: the Standard Client (SC) and the Thin Client (TC)
– The SC is targeted at applications running in HLOS environments
? The SDK APIs for the SC provide a high level of abstraction, and allow complex multi-threaded applications
? Native implementation is in C++ and there are a number of language bindings for various platforms available
– The TC is targeted at applications that would reside on deeply embedded devices (i.e. device firmware)
? Targets a very minimal memory (RAM and ROM) footprint,
? Implemented in C, with no other language bindings
? TC depends on a Routing Node running elsewhere, likely off device
Software Components: Router[任何包含路由器的節點是路由節點,路由器使用SC(因此跑在HLOS上)
Router
– Any node containing the router is a Routing Node
– The router is built using the Standard Client library, and so must run on an HLOS
– This can be deployed as a standalone daemon/service or integrated with the SC in an application
? The only platforms on which standalone functionality is currently supported are Linux-based, such as OpenWRT
– The Router functionality consists of bus management and routing AllJoyn messages
? Bus management includes
– Managing the namespace: application addressing over the bus
– Cross-device communication: discovering services and connecting to the routing node supporting that service on behalf leaf nodes
? Message routing consists of delivering messages between applications, or to the router itself
– AllJoyn control signaling also uses AllJoyn messages
– Routing Nodes do the “heavy lifting” in the Alljoyn system
– Leaf Nodes depend on Routing Nodes to interact with other nodes
Software Components: Language Bindings
Standard Client Library supports multiple language bindings
? Java binding available, compatible with Dalvik
? Objective C binding is available for use on iOS and MacOS
? Managed C++, C#, WinJS, and Visual Basic are available for use in Windows 8 style applications
? Unity + C Binding available for use on Android
? NPAPI binding for JavaScript is available
– All of the bindings are currently wrappers around the native C++ implementation
– Same object model for all bindings
– Seamless interoperability between applications written in different languages
Thin Client Library only supports C
– Most appropriate language for embedded RTOS development
– Other language wrappers around the C implementation being investigated
[正版請搜尋:beautifulzzzz(看樓主部落格園官方部落格,享高品質生活)]
[如果您也喜歡智能硬體的東西,可以交個朋友~]
[如果您胸懷大志,能團結各路豪傑的亂世英雄,也可以留下一下資訊~]
AllJoyn持續更新中。。。\(^o^)/~
[Alljoyn] 1、物聯網開源軟體架構alljoyn研究(一)——初步瞭解