Components and Aspects for Embedded Middleware Product Lines Problem Statement: Concepts: Embedded systems developers can use RTZen, a CORBA implementation in Java, to satisfy the complex requirements found in distributed, real-time, and embedded (DRE) systems. However, a fullfeatured CORBA implementation may not satisfy the stringent requirements of a highly constrained embedded system: the resource requirements are too great, and unwanted features may reduce run-time performance. Component-Based Software Development (CBSD) describes software as assemblies of fully encapsulated software parts. CBSD tools can build different applications by connecting components according to their application programming interfaces (APIs), but it cannot modularize crosscutting concerns between components. Aspect-Oriented Programming (AOP) identifies and isolates the implementation of crosscutting concerns like security, logging, and domain-specific features. By modularizing these concerns, AOP enables better programming practices. Extr Thesis: Sync Real-Time ORB Core GIOP GIOP Real-Time System I/O Improve Jiazzi to support AOP-like constructs. ➢ ... Support for wstring. ➢ ele c t Op tions ... POA policies. ➢ ... Real-time implementation strategies. ➢ ... Supported I/O protocols. ➢ Jiazzi Composition Product-Line Jiazzi Component Composition Jiazzi is a type-safe component-management tool that provides interfaces between individual components. An interface is called a “signature”; it describes available classes, methods, and fields, along with their declarations for type checking. “Compound” components describe assemblies of other components (“atoms” and other compounds). Input Package(s) Input Package(s) BaseClass GIOP (General Inter-ORB Protocol) is the communication backbone. It supports several lower-level protocols, insulating the network details from higher-level systems. Motivation Atom ClassConsumer The Interface Definition Language (IDL) describes an interface and RMI implementation between client and server. A compiler generates client stubs and server skeletons from an IDL file. Consumer Source Base Source Extension Source package consumer; public class Consumer { public Consumer(){} public static void main(String[] args) { hello.Greeting greeting = new hello.Greeting(); greeting.hello(); }} package pkg_base; public class Greeting { public Greeting(){} public void hello() { System.out.println( "I'm pleased to meet you!"); }} package pkg_extend; public class Greeting extends pkg_base.Greeting { public void hello() { System.out.println("Hello!"); super.hello(); }} signature consumer = { public class Consumer { public Consumer(); public static void main(String[] args); }} signature pkg_base = { public class Greeting { public Greeting(); public void hello(); }} atom pkg_extend { import pkg_base : pkg_base; export pkg_extend extends pkg_base: pkg_extend; } atom consumer { import hello: pkg_base; export consumer: consumer; } atom pkg_base { export pkg_base: pkg_base; } signature pkg_extend = pkg_base + {} Base Source compound prog_basic { export hello: pkg_base; }{ link unit bp : pkg_base; link package bp@pkg_base to hello; } Extension Source compound prog_extend { export hello: pkg_extend; }{ link unit bp : pkg_base, nm : pkg_extend; link package bp@pkg_base to nm@pkg_base, nm@pkg_extend to hello; } Output Package(s) Compound Input Package(s) ExtendClass Interesting concerns often crosscut existing subsystem boundaries! Componentize crosscutting concerns in RTZen with Jiazzi: ... Support for anys. Compounds Real-Time ORB Core Better understanding of what "components + aspects" means in general Source POA Describe targets & build them from product line. Product Core IDL Stubs Create Jiazzi “atoms” and “compounds.” ➢ A Portable Object Adapter (POA) provides an additional layer of insulation for the high-level systems. It functions to provide object translation, persistence, object factories, and server reuse. IDL Skeleton Adapt code for product line. ➢ Server RetVal + “out” args Identify components and crosscutting concerns in RTZen. CORBA Core Product Options S Client Process: Current Tasks Detail: CORBA middleware provides a standardized conduit for clientserver communication over a network. Its power lies in its platform agnosticism and well-tested, rich functional suite. Many parts of a CORBA system can be componentized for system configuration. Call() + “in” args John Regehr and Eric Eide “On the Head of a Pin” Signatures Jiazzi can modularize the implementation of concerns within RTZen and assemble the resulting modules in ways that exclude features not needed for particular applications. ac o C t nent o p m s Component-based software development (CBSD) and aspect-oriented programming (AOP) can help reconfigure and improve modularity of the RTZen platform. advised by Atoms Approach: Sean Walton Atom Output Package(s) Goal: Without changing the program source, replace ClassConsumer's connection to BaseClass with ExtendClass. Output Package(s) Operation: Jiazzi components import and export groups classes called packages. External consumers see the package/classes that Jiazzi exposes. Principles Challenges: Componentization is problematic due to the high subsystem cohesion. ● Some concerns span multiple programs (e.g., IDL compiler and RTZen runtime). ● Jiazzi appears to lend itself to new development; legacy systems present unique challenges. ● Results This material is based upon work supported by the National Science Foundation under Grant No. 0410285. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.