220 likes | 413 Views
Adaptive & Reflective Middleware for Distributed Real-time & Embedded Systems. Dr. Douglas C. Schmidt schmidt@uci.edu. Electrical & Computing Engineering Department The Henry Samueli School of Engineering University of California, Irvine. Wednesday, March 12, 2014. Matlab Code-Gen.
E N D
Adaptive & Reflective Middleware for Distributed Real-time & Embedded Systems Dr. Douglas C. Schmidt schmidt@uci.edu Electrical & Computing Engineering Department The Henry Samueli School of Engineering University of California, Irvine Wednesday, March 12, 2014
Matlab Code-Gen. Matlab Code-Gen. Config. Generator Partially automated solutions for limited domains if (inactiveInterval != -1) { int thisInterval = (int)(System.currentTimeMillis() - lastAccessed) / 1000; if (thisInterval > inactiveInterval) { invalidate(); ServerSessionManager ssm = ServerSessionManager.getManager(); ssm.removeSession(this); } } } private long lastAccessedTime = creationTime; /** * Return the last time the client sent a request associated with this * session, as the number of milliseconds since midnight, January 1, 1970 * GMT. Actions that your application takes, such as getting or setting * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { return (this.lastAccessedTime); } this.lastAccessedTime = ConfigurationSpecification Analysis Tool Code C2 assets & strike aircraft share image data in real-time Application needs increasingly require distributed real-time & embedded (DRE) systems Characteristics of DRE Systems • Mission-critical control • Resourceconstrained • Stringent simultaneous QoS demands • Network-centric • Dynamic operating conditions Accomplishments & New Directions Productivity & quality gains from higher-level abstraction mechanisms
Total Ship Computing Environments: Global dynamic resource management (1,000 nodes) Distributed Active Control: Vibration Damping on Delta-4Rocket Payload Fairing (1,000 nodes) Distributed Network of embedded sensor motes for environment monitoring,tracking, & surveillance (10,000 nodes) Gossamer Space Antenna (1,000,000 nodes) Noiseless sonar onsubmarines to providecamouflage (3,000 nodes) Current Challenges & Limitations Emerging Trends • DRE system requirements are increasingly more • Dynamic • Diverse • Demanding 1000 – 1,000,000 node fusion of physical& informationsystems
Technology Problems Today’s DRE systems are: • Stovepiped • Proprietary • Brittle & non-adaptive • Expensive • Vulnerable Applications Applications Applications Sensors Controllers Actuators Utility “Curve” Utility “Broken” Operating System “Works” Operating System Operating System Resources Endsystem Endsystem Networks Endsystem Networks Current Challenges & Limitations Emerging Trends • DRE system requirements are increasingly more • Dynamic • Diverse • Demanding Cultural Problems • Existing research approaches do not scale to address key technology problems • Non-appreciation of the importance of DRE software
Nation-states, Terrorists, Multinationals Military spying Economic intelligence HIGH Disciplined strategiccyber attack Information terrorism INNOVATION PLANNING STEALTH COORDINATION Selling secrets Civil disobedience Serious hackers Proliferating conventional & asymmetric CIP threats Embarrassing organizations Harassment Discrediting products Collecting trophies Stealing credit cards Script kiddies Copy-cat attacks Curiosity LOW Thrill-seeking Why We (Now) Care about DRE Systems Proliferating conventional, WMD, & asymmetric threats Power grids, national infrastructure networks, supply-chains, air transportation, & military systems are particularly vulnerable
Gigabit Ethernet Servers Clients R&D Challenge: Develop DRE Systems Technologies to Protect Critical Infrastructure The “soft underbelly” of commercial, military, & infrastructure DRE systems depend increasingly on information technology, making attacks both attractive & lethally effective “Planet-top systems” Information Appliances Clusters R&D Challenges: Create • efficient, • scalable, • reliable, • secure, • & predictable DRE system technologies from nano- to tera-scale MEMS BioMonitoring
CPUs & networks have increased by 3-7 orders of magnitude in the past decade 2,400 bits/sec to 1 Gigabits/sec These advances stem largely from standardizing hardware & software APIs and protocols, e.g.: 10 Megahertz to 1 Gigahertz • Intel x86 & Power PC chipsets • TCP/IP, ATM • POSIX & JVMs • Middleware & components • Quality of service aspects Lessons from IT History Extrapolating this trend to 2010 yields • ~100 Gigahertz desktops • ~100 Gigabits/sec LANs • ~100 Megabits/sec wireless • ~10 Terabits/sec Internet backbone DRE software has not improved as rapidly or as effectively as hardware & networks
The Road Ahead for DRE Systems Applications Applications Applications INTERNETWORKING ARCH Sensors Controllers Actuators MIDDLEWARE ARCH RTP TFTP FTP HTTP Middleware Applications Domain-Specific Services Domain-Specific Services Domain-Specific Services DNS TELNET Middleware Services UDP TCP Common Services Common Services Common Services IP Middleware Distribution Middleware Distribution Middleware Distribution Middleware Fibre Channel Ethernet ATM FDDI 20th Century 21st Century Infrastructure Middleware Infrastructure Middleware Infrastructure Middleware Benefits of Middleware • Highly scalable QoS • Enable new resource management capabilities • Support common & open technology bases • Leverage & enhance advances in assurance & security Operating System Operating System Operating System Applications Applications Applications Sensors Controllers Actuators Endsystem Endsystem Networks Endsystem Networks Solaris VxWorks Win2K Linux LynxOS Desired Utility Curve “Working Range” Utility Operating System Operating System Operating System Resources Endsystem Endsystem Networks Endsystem Networks We need to create the new generation of openDRE systemmiddleware technologies to • Simultaneously control multiple QoS properties & • Improve software development quality, productivity, & assurability
Historically, mission-critical apps were built directly atop hardware & OS Key remaining R&D challenges include: Layered QoS specification & enforcement Multi-level global resource management Decoupling mechanisms & policies across layers High confidence DRE middleware Time/space optimizations for DRE middleware Robust adaptive DRE system control The Evolution of Open DRE System Technologies Tedious, error-prone, & costly over lifecycles Open DRE system middleware helps: • Manage end-to-end resources & QoS • Leverage HW/SW technology advances • Evolve to new environments & requirements The domain-specific & common middleware services layers are where researchers & developers need to have the most impact Existing R&D efforts have addressed some, but by no means all, these challenges
Technical Challenge: Real-time Control of Distributed Resources Applications Middleware OS & Protocols TBMD Application AAW Application Hardware QoS QoS Requested QoS Global Middleware Control Algorithm Control Algorithm Control Algorithm Control Algorithm Control Algorithm Control Algorithm Measured QoS Goal: Create new generation of middleware to simultaneously control multiple QoS properties Distributed security Distributed fault tolerance Distributed resource management • Allocation/reservations, caching, scheduling, monitoring, & load balancing Control Vars. Workload & Replicas Workload & Replicas Workload & Replicas } Local middleware Connections & priority bands Connections & priority bands Connections & priority bands CPU & memory CPU & memory CPU & memory Ship-wide QoS Doctrine & Readiness Display Network latency & bandwidth Network latency & bandwidth Network latency & bandwidth
Hard Problem 1:Secure Multi-level Distributed Resource Management QoS QoS Problem • Multiple technology bases make it hard to analyze & control the QoS of distributed resources at multiple system levels dynamically, dependably, & securely TBMD Application Requested QoS AAW Application Control Algorithm Control Algorithm Control Algorithm Control Algorithm Control Algorithm Control Algorithm Measured QoS Load Balancer FT CORBA Workload & Replicas Connections & priority bands RT/DP CORBA + DRTSJ Research Challenge • Devise middleware to formally specify QoS-constrained global resource management plans; model, reason about and refine them; & monitor/enforce these plans automatically at run-time RTOS + RT Java CPU & memory Network latency & bandwidth IntServ + Diffserv Solution Approach • Doctrine-driven middleware to support multi-level management of DRE resources • i.e., dynamic, dependable, & scalable resource analysis, scheduling, allocation, monitoring & balancing • Guided by online reflective QoS models & empirical evaluation
Example: Data Parallel CORBA Parallel Object Computing Grid Client on parallel ORB Airborne HPEC Distributed shipboard clusters CONUS supercomputers … Part 1 Part 2 Data reorganization strategies Part 3 Data Parallel CORBA bridges the gap between traditional CORBA applications & high-performance embedded parallel processing applications as follows: • Enable CORBA applications over clusters of computers • No change required in software technologies, methodologies, or tools • Enable massively parallel applications to integrate easily with distributed systems • Allow parallel applications to benefit from distributed object methodologies, technologies, & tools • Add parallelism & data distribution to the transparencies offered by CORBA • Enable a new class of applications e.g., financial, industrial, medical, aerospace, multimedia, and military domains
Middleware Middleware Hard Problem 2:Meta-programmable DRE Middleware Frameworks Problem • Existing DRE systems are rigidly designed with fixed QoS parameters that limit their utility for new operations Research Challenges • Assuring dynamic flexibility and QoS simultaneously Solution Approach • Meta-programmingtechniques that • Decouple functional & QoS paths to allow more degrees of freedom • Specify QoS doctrine declaratively • Support dynamic QoS adaptation & optimizations Applications Applications Interceptor Interceptor Sys Cond Sys Cond Sys Cond Sys Cond Mechanism & Property Managers { } Workload & Replicas Workload & Replicas Connections & priority bands Connections & priority bands Local Resource Managers Local Resource Managers QoS Contract QoS Contract CPU & memory CPU & memory Network latency & bandwidth Network latency & bandwidth Endsystem Endsystem
P P P I I I B B B B B B B B B B B B B B B B B I I B B B B B B P B B P B P P IBBPBBPBBPBBPBBPBBIBBPB B B B P P I I P B B P P P P P P P P P B B I I B B B B B B B B B B B B B B B B B B B B B B B B B B B B P P B B B B B B B B B B B B B B B B B B B B B B B B B NETWORK RESERVATION • Condition: Excessive Network load • Action: Use IntServ & DiffServ to reserve bandwidth QoS Contracts X X IMAGE MANIPULATION • Condition: Excessive Network load • Action: Scale image to smaller size ...PBBPBBPBBI II I LOAD BALANCING • Condition: Excessive CPU load • Action: Migrate distributor to a lightly loaded host DATA FILTERING • Condition: Excessive Network or CPU load • Action: Drop selective frames Example: Meta-programmed Distributed QoS Aspects Fidelity • Highest fidelity frames must be delivered Importance • Frames must be dropped in reverse order of importance Timeliness • Maintain an out-of-the-window view of imagery Mission Requirements www.dist-systems.bbn.com/tech www.cs.wustl.edu/~schmidt
Hard Problem 3:DRE Middleware Generation & Optimization Tools Problems • COTS middleware is often unsuited for DRE systems due to insufficient • QoS specification & enforcement • Time/space optimizations • Flexibility & customizability • However, conventional DRE development techniques are • Tedious • Proprietary • Manual & ad hoc Workload & Replicas Workload & Replicas Connections & priority bands Connections & priority bands CPU & memory CPU & memory Network latency & bandwidth Network latency & bandwidth tSTART t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15 t16 t18 t19 tREQ’D t11 t17 Research Challenge • Minimizing footprint & customizing standard DRE middleware capabilities without sacrificing key QoS properties DRE Applications Optimized & verified DRE middleware Common Middleware Tools Common Semantic Rep. Solution Approach • Develop Model Driven Architecture (MDA) tools to reflectively auto-generate, optimize, & verify custom implementations of standard DRE middleware from higher-level specifications Application Requirements Impl1 Impl2 Impl1 Middleware Generator Plat1 Plat2 Plat3 Plat1.pd Plat2.pd Plat3.pd
Example:Applying Reflection as Compiler Optimization Ix86 Opt. VAX Opt. 68K Opt. Ix86 VAX 68K To illustrate the benefits of reflection as an optimization technique, consider the evolution of compiler technology: • Early compilers required • Separate internal representations hand-written for each programming language & C Program C Compiler Separate hand-written optimizers for each target backend Internal Rep. Developing, verifying, validating, & evolving all these components separately is costly, time-consuming, tedious, & error-prone The problem only gets worse as more languages & target backends emerge
Example:Applying Reflection as Compiler Optimization Ix86 Opt. VAX Opt. 68K Opt. Ix86 VAX 68K To illustrate the benefits of reflection as an optimization technique, consider the evolution of compiler technology: C++ Program Ada Program C Program • Early compilers required • Separate internal representations hand-written for each programming language and C++ Compiler Ada Compiler C Compiler Separate hand-written optimizers for each target backend Internal Rep. Internal Rep. Internal Rep. Developing, verifying, validating, & evolving all these components separately is costly, time-consuming, tedious, & error-prone The problem only gets worse as more languages & target backends emerge PPC Opt. MIPS Opt. 88K Opt. 1751 Opt. 32K Opt. HPPA Opt. PPC MIPS 88K 1751 32K HPPA
Example:Applying Reflection as Compiler Optimization 3. Generate an optimizer that is customized for the particular platform/language 2. Use discrimination network to analyze the optimization rules & opportunities Optimizer Generator Ix86 PPC 68K 1. Read the target machine description Ix86 .md PPC .md 68K .md • Modern compilers, such as GNU GCC, support • A common internal representation (still hand-written) for each programming language • Based on generalizing the language semantics C/C++/Ada Programs C/C++/Ada Compiler • A synthesized compiler optimizer that is customized automatically for each target backend • Based on reflective assessment of algebraic target machine description Common Internal Rep. Ix86 Opt. PPC Opt. 68K Opt. Key Benefit of Reflective Optimization • New targets can be supported by writing a new machine description, rather than writing a new code generator/optimizer
LynxOS Impl WinNT Impl VxWorks Impl WinNT LynxOS VxWorks New Approach:Applying Reflection to Optimize DRE Middleware Conventional middleware for embedded systems is developed & optimized in a manner similar to early compiler technologies: • Conventional middleware require • Separate tools and interfaces hand-written for each ORB middleware specification • e.g., CORBA, Java RMI, COM+ CORBA Application CORBA ORB & Assorted Tools • Separate hand-written & hand-optimized implementations for each embedded target platform • e.g., various OS/network/HW configurations Developing, verifying, validating, & evolving all these components separately is costly, time-consuming, tedious, & error-prone Moreover, it is even harder to hand-configure support for dynamic platform variations & complex application use-cases The problem only gets worse as more middleware, target platforms, & complex applications emerge
Java Application COM+ Application Java RMI & Assorted Tools COM+ ORB & Assorted Tools Solaris Impl Win98 Impl LynxOS Impl Win2K Impl WinNT Impl WinNT Impl Linux Impl WinCE Impl VxWorks Impl Win2K Solaris WinNT Win98 WinNT LynxOS Linux WinCE VxWorks New Approach:Applying Reflection to Optimize DRE Middleware Conventional middleware for embedded systems is developed & optimized in a manner similar to early compiler technologies: • Conventional middleware require • Separate tools and interfaces hand-written for each ORB middleware specification • e.g., CORBA, Java RMI, COM+ CORBA Application CORBA ORB & Assorted Tools • Separate hand-written & hand-optimized implementations for each embedded target platform • e.g., various OS/network/HW configurations Developing, verifying, validating, & evolving all these components separately is costly, time-consuming, tedious, & error-prone Moreover, it is even harder to hand-configure support for dynamic platform variations & complex application use-cases The problem only gets worse as more middleware, target platforms, & complex applications emerge
Application Requirements 3. Generate middleware that is customized for a particular platform & application use-case 2. Use discrimination network to analyze the optimization rules & opportunities Middleware Generator Plat1 Plat2 Plat3 Plat1 .pd Plat2 .pd Plat3 .pd 1. Read the target platform description & application requirements New Approach:Applying Reflection to Optimize DRE Middleware • The functional and QoS-related properties of embedded systems middleware can be improved greatly by advanced R&D on the following topics: • A common internal representation (ideally auto-generated) for each middleware specification • Based on generalizing the middleware semantics CORBA/Java/COM+ Applications Common ORB + Assorted Tools • A synthesized middleware implementation that is optimized automatically for each target platform & application use-case • Based on reflective assessment of platform descriptions & application use-case Common Semantic Representation Plat1 Impl Plat2 Impl Plat3 Impl
Multi-faceted Software Development Air Frame AP Nav WTS Comparable & Customizable Frameworks & Intelligent Middleware Event Channel Replication Service Object Request Broker GPS IFF FLIR Cross-cutting Concerns Synchronization Applications to Embedded Systems Persistence Memory Management Fault Tolerance Model-based Software Development & Domain-specific Languages Collaborative Software Development Environments Patterns & Pattern Languages DARPA DRE Software R&D Focus