120 likes | 235 Views
RDA3 high- level – API & architecture 2 6th JUNE 201 3. Ilia Yastrebov BE-CO-IN. RDA3 Design Principles. Functional aspects Controls Middleware based on Device / Property model Operations: GET, SET (sync and async ), SUBSCRIBE Enhanced runtime diagnostics & statistics
E N D
RDA3 high-level – API & architecture26thJUNE 2013 • Ilia YastrebovBE-CO-IN
RDA3 Design Principles • Functionalaspects • Controls Middleware based on Device/Property model • Operations: GET, SET (sync and async), SUBSCRIBE • Enhanced runtime diagnostics & statistics • Technical aspects • C++ & Java support • Lightweight (minimum dependencies, small footprint) • Non-blocking communication • QoS guarantees (priorities for clients & subscriptions) • Scalable Half-Sync/Half-Async threading pattern • Sync: Event demultiplexer (Reactor) • Async: Message priority queue + Threadpool (Scheduler) • API based on interfaces and Dependency Injection RDA3 High-Level - API & Architecture
RDA3 Architecture • Transport Layer • Implements P2P non-blocking request-reply communication • Wraps ZeroMQbehind the interface • Detects disconnections / Provides reconnection facilities • High Layer • Client and Server API • Maintains connection state & client sessions • Extensible protocol independent of TL • Serialization • Subscriptions (with notifications ordering) • Processing engine (scheduler) • Integrates with Directory Service and RBAC (authorization) • Implements QoS (client & subscription priorities) Application RDA3 High Layer Transport ZeroMQ RDA3 High-Level - API & Architecture
Client API: Request-Reply (GET & SET) RDA3 High-Level - API & Architecture
Client API: Subscriptions RDA3 High-Level - API & Architecture
Client Flow Diagram RDA3 High-Level - API & Architecture
Subscription States RDA3 High-Level - API & Architecture
Server API: Request-Reply RDA3 High-Level - API & Architecture
Server API: Subscriptions RDA3 High-Level - API & Architecture
Server Flow Diagram RDA3 High-Level - API & Architecture
Serialization • Evaluated several 3rd party solutions • Google Protobuf (IDL based, huge project) • MessagePack (no IDL, many deps, slow for double arrays) • Endedup with home-made serialization • Small project, easy to implement • No dependencies • Performance gain • Data object with 3 arrays (int[], double[], String[]) of 40 elements each.Results for 100000 serialization+deserialization iterations RDA3 High-Level - API & Architecture
Conclusions • Alpha version of RDA3 Client & Server is done for Java • Work on RDA3 C++ Server is in progress • Plan to release alpha version in July 2013 • Work in closecollaboration with users • Regular meetings with most important users • Presented all components of RDA3, approved by clients • API was reviewed and approved by all major users • Questions? RDA3 High-Level - API & Architecture