+ All Categories
Home > Documents > Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary...

Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary...

Date post: 23-Aug-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
33
Component Systems in the Field: Integrating and Controlling Operation Services easily using Connectors Unrestricted ©2017 Siemens AG Component Systems in the Field: Integrating and Controlling Operation Services easily using Connectors
Transcript
Page 1: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Component Systems in the Field: Integrating and Controlling Operation Services easily using ConnectorsUnrestricted ©2017 Siemens AG

Component Systems in the Field:Integrating and Controlling OperationServices easily using Connectors

Page 2: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Component Systems in the Field:Integrating and Controlling OperationServices easily using ConnectorsJoachim Fröhlich, Florian Krautwurm, Markus Lachenmayr

Siemens Corporate TechnologyUnrestricted © Siemens AG 2017

Page 3: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 3 Markus Lachenmayr | Siemens Corporate Technology

Component systems in the field: Integrating andcontrolling operation services easily using connectors

By using connectors, a system improves its

§ Flexibility

§ Structure

§ Transparency

Page 4: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 4 Markus Lachenmayr | Siemens Corporate Technology

Component systems in the field: Integrating andcontrolling operation services easily using connectors

Overview

§ Application system characteristics

§ Connectors – unloaded & loaded

§ Upgrade of a system in operation

Page 5: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 5 Markus Lachenmayr | Siemens Corporate Technology

§ Application system characteristics

§ Connectors – unloaded & loaded

§ Upgrade of a system in operation

Component systems in the field: Integrating andcontrolling operation services easily using connectors

Overview

Page 6: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 6 Markus Lachenmayr | Siemens Corporate Technology

What systems are we talking about here?

Application system characteristics

Systems …§ … control physical processes§ … operate for long periods of time§ … include small devices:§ little power§ small memory§ legacy code§ … with expensive downtimes

Example: Mobile assembly robot1)

§ Collect and assemble workpiecesin the production facility§ Navigate

autonomously§ Expensive

battery charge

1) Amerongen J. (2006): The Role of Controls in Mechatronics, CRC Press

RoboSat17

Page 7: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 7 Markus Lachenmayr | Siemens Corporate Technology

§ Drive fast to the next workpiece§ Drive efficiently to the next workpiece§ Keep product quality high

§ Workpieces distributed in production facility§ Robot navigates autonomously§ Operation environment gets unstructured

Requirements

SituationAssemble while drivingUpdate a robot’s navigation function for economic reasons

Adapt robots capabilities dynamicallyto new requirements

Page 8: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 8 Markus Lachenmayr | Siemens Corporate Technology

§ Monitor resource utilization§ Profile and trace system usage§ Test in the field, w/o side effects§ Parallel deployments (blue/green)§ Canary releases§ …

§ Reliability§ Availability§ Performance§ Security§ Resilience§ …

Continuous system quality, also when system environment changes

Application system requirements

System services needed Operation qualities needed

Page 9: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 9 Markus Lachenmayr | Siemens Corporate Technology

Component systems in the field: Integrating andcontrolling operation services easily using connectors

Overview

§ Application system characteristics

§ Connectors – unloaded & loaded

§ Upgrade of a system in operation

Page 10: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 10 Markus Lachenmayr | Siemens Corporate Technology

Where do we come from?

Asymmetric interfaces couple components physically

Provider “owns” the interfaces System build with components1)

$ cd Provider$ g++ -c *.cpp -I. && ar r ../Provider.bin *.o

$ cd Client$ g++ -c *.cpp -I../Provider && ar r ../Client.bin *.o

$ cd ..$ g++ -o System Client.bin Provider.bin

1) Static linking for example and for clarity

Page 11: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 11 Markus Lachenmayr | Siemens Corporate Technology

Where are we going?

Symmetric interfaces in connectorsdecouple components physically

Connector in between System build with connectors1)

$ cd Connector$ g++ -c *.cpp -I. && ar r ../Connector.bin *.o

$ cd Client$ g++ -c *.cpp -I../Connector && ar r ../Client.bin *.o

$ cd Provider$ g++ -c *.cpp -I../Connector && ar r ../Provider.bin *.o

$ cd ..$ g++ -o Connector.bin Provider.bin System Client.bin

1) Static linking for example and for clarity

Page 12: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 12 Markus Lachenmayr | Siemens Corporate Technology

Client view on a connector

Applications insulated from implementations

Connector hides provider(s) Use interface1: Navigate* n = Chassis::my()ànavigate();2: Route* r = nànavigate(w);

// Plan route to the next workpiece

1: Interface3) Navigate {2: virtual Route* navigate(Workpiece*) = 0;3: };4: Class4) Chassis {5: public: static Chassis* my();6: public: Navigate* navigate();2) // Factory7: };

1) RoboSat17 2) Client-specific interface 3) C++: #define Interface struct 4) C++: #define Class class

.h

.h

.C

Page 13: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 13 Markus Lachenmayr | Siemens Corporate Technology

1: Class Chassis {2: public: Navigate* navigate();1) // Factory3: protected: virtual Navigate* implement();2)

// Factory, provider part4: };

5: Navigate* Chassis::navigate() {6: return thisàimplement();7: }8: Navigate* Chassis::implement() {9: return new NavigateDefault();

// Standalone factory, independent connector0: }

View into an unloaded connector

Insulating connector enablesfully transparent services

Factory bisected to … … create defaults or test doubles

.h

.C

Page 14: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 14 Markus Lachenmayr | Siemens Corporate Technology

View into a loaded connector

Insulating connector enablesfully transparent services

… to inject servicing proxies

.h

.C

.h

.C

1: Class Chassis {2: public: Navigate* navigate();1)

3: protected: virtual Navigate* implement();2)

4: };

5: Navigate* Chassis::navigate() {6: Navigate* n = thisàimplement();7: return new SwitchNavigation(n); // Proxy8: }

1: Class RS17Chassis : Chassis { … };

2: Navigate* RS17Chassis::implement() {3: return new FastRoute(); // Override4: }

Factory bisected …

Page 15: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 15 Markus Lachenmayr | Siemens Corporate Technology

Implementing connectors withwell-proven and established patterns

PatternSeparated InterfaceFowler)

InsulationLakos)

Abstract FactoryGoF)

RegistryFowler)

ProxyGoF)

Chain of ResponsibilityGoF)

StrategyGoF)

GatewayFowler)

IntentionDefine interfaces in separate binaries.

Decouple clients and providers. Optionally, integrate serviceswithout recompiling clients and providers.

Defer object creation to (1) decouple clients and providers and to(2) optionally insert proxies.

Providers register and clients find concrete factories dynamically.

Integrate operation service around interfaces.

Integrate several operation services.

Control clients, providers, services in connectors.

Control connectors remotely.

Page 16: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 16 Markus Lachenmayr | Siemens Corporate Technology

Operation services in connectors

… handle several providers … be controlled dynamically

… handle several clients … provide different servicesLoaded connectors can …

Page 17: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 17 Markus Lachenmayr | Siemens Corporate Technology

Connectors link Development and Operations

Loaded connectors can be controlled dynamically and remotely

Page 18: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 18 Markus Lachenmayr | Siemens Corporate Technology

Component systems in the field: Integrating andcontrolling operation services easily using connectors

Overview

§ Application system characteristics

§ Connectors – unloaded & loaded

§ Upgrade of a system in operation

Page 19: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 19 Markus Lachenmayr | Siemens Corporate Technology

RoboSat17

The requirements that shape the Simplex architecture1) come close to ours

Upgrade of a mobile assembly robot in operation

Robot requirements§ Test two routing functions in the field§ Switch dynamically

Simplex requirements§ Change function units online safely§ Provide units that can be modified

and replaced online with facilities tomake the change simple§ Accelerate development with control

facilities, e.g., sequencing control,test and transaction

1) Rivera J.G. et al. (2006): An Architectural Description of the Simplex Architecture. CMU/SEI-96-TR-006

Page 20: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 20 Markus Lachenmayr | Siemens Corporate Technology

Transparent Blue/Green deployments with connectors

Orthogonal operation services in connectors

Run blue and test green Run green, option to switch to blue

Page 21: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 21 Markus Lachenmayr | Siemens Corporate Technology

§ Blue/green deployment§ A/B test§ Canary release§ Monitor, profile and trace§ Budget§ Parallel execution§ Test regressions§ …

Operation services as neededServices for durable control systems of high quality and quick on the market

Orthogonal operation services in connectors

Page 22: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 22 Markus Lachenmayr | Siemens Corporate Technology

§ Focus on domain concepts & relations§ Modular development and test§ Technologies and details excluded

Easier and maintainable operations§ Services separated from functions§ Modular deployment in the field§ Faster, exact feedback from the field

Central connectorsSymmetric interfaces in connectors that decouple components physically

Connectors simplify Development and Operations

Easier and faster development

Page 23: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 23 Markus Lachenmayr | Siemens Corporate Technology

Connectors link Development and Operations

Build, integration and test processes reach the operation environment

§ Domain-driven§ Modular and insulated§ Testable

§ High availability§ Faster feedback§ Exact field data

Development OperationInfrastructure§ Connectors§ Connector Manager§ Gateway to CI Server

Page 24: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 24 Markus Lachenmayr | Siemens Corporate Technology

Component systems in the field: Integrating andcontrolling operation services easily using connectors

Characteristics of connectors in this presentation

§ Flexibility Organize interfaces in binaries,independently from function components.

§ Structure Add services around interfaces,orthogonally to component functions.

§ Transparency Monitor, test, secure, load, change, budget …component functions transparently, during system operation.

Page 25: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 25 Markus Lachenmayr | Siemens Corporate Technology

Component Systems in the Field:

Integrating and Controlling SystemServices easily using Connectors

Joachim FröhlichFlorian KrautwurmMarkus LachenmayrOtto-Hahn-Ring 681739 Munich

+49 (89) 636 630741

[email protected]/corporate-technology

Page 26: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Component Systems in the Field: Integrating and Controlling Operation Services easily using ConnectorsUnrestricted ©2017 Siemens AG

Component Systems in the Field:Integrating and Controlling OperationServices easily using Connectors

Page 27: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 27 Markus Lachenmayr | Siemens Corporate Technology

Appendix: References

Amerongen J. (2006): The Role of Controls in Mechatronics. In Bishop, R.H. (2006)Bishop R.H. (2006): Mechatronics an Introduction. CRC PressBrown S. (2017): Software Architecture as Code. OOP MunichClements P., et al (2010): Documenting Software Architectures. Addison-WesleyFairbanks G. (2012): Just Enough Software Architecture. Marshall & BrainerdFowler M. (2003): Patterns of Enterprise Application Architecture. Addison-WesleyGamma E., et al. (1995): Design Patterns. Addison-Wesley (GoF)Hohmann L. (2008): Beyond Software Architecture. Addison-WesleyHohpe G., Woolf B. (2004): Enterprise Integration Patterns. Addison-WesleyLakos J. (1996): Large-Scale C++ Software Design. Addison-WesleyLöwy J. (2005): Programming .NET Components. O’ReillyRivera J.G., et al. (2006): An Architectural Description of the Simplex Architecture. CMU/SEI-96-TR-006Schmidt D., et al. (2000): Patterns for Concurrent and Networked Objects. Wiley (POSA2)

Page 28: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 28 Markus Lachenmayr | Siemens Corporate Technology

Component systems in the field: Integrating andcontrolling operation services easily using connectors

Overview

§ Application system characteristics

§ Connectors – unloaded & loaded

§ Upgrade of a system in operation

§ Component and connector views AOP

Interceptor

Smart Proxy

Interface-basedProgramming

Page 29: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 29 Markus Lachenmayr | Siemens Corporate Technology

Component and connector views

§ Interceptors are for networking objects§ Smart proxies monitor networks§ Proxies in connectors like smart pointers

§ Connectors are boxes, not lines§ Connectors drive architectural styles1)

§ No connectors in the 4C model2)

… middleware§ Interface-based programming:

Programming with connectors!§ AOP: weave services into connectors

§ Overly complex technologies forembedded systems§ Connectors can be integrated

… techniques

… component and connector views … patternsConnectors in this presentation in relation to …

1) Shaw M, Garlan D. (1996), D’Souza D.F., Wills A.C. (1998) in Fairbanks G. (2012): Just Enough Software Architecture, Marshall & Brainerd2) 4C = Context, Container, Components, Classes from Brown S. (2017): Software Architecture as Code. OOP Munich

Page 30: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 30 Markus Lachenmayr | Siemens Corporate Technology

Provider view on a connector

Implementations insulated from applications

1: Class Chassis {2: protected: virtual Navigate* implement();1)

// Factory, provider interface3: };

4: Class RS17Chassis : Chassis { … };

5: Navigate* RS17Chassis::implement() {6: return new FastRoute();7: }

8: Class FastRoute: Navigate {9: Route* navigate(Workpiece*);0: }

1) Provider-specific interface 2) RoboSat17

Connector hides client(s) Implement interface

.h

.C

.h

.h

Page 31: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 31 Markus Lachenmayr | Siemens Corporate Technology

1: Class Chassis {2: public: Navigate* navigate();1) // Factory3: protected: virtual Navigate* implement();2)

// Factory, provider interface4: };

5: Navigate* Chassis::navigate() {6: return thisàimplement();7: }8: Navigate* Chassis::implement() {9: return 0; // Makes the factory standalone

and the connector provider- independent0: }

View into an unloaded connector

Insulating connector enablesfully transparent services

Separated interfaces Standalone factories

.h

.C

Page 32: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 32 Markus Lachenmayr | Siemens Corporate Technology

View into a connector

Insulating connector enablesfully transparent services

Hidden and lazy factory creation …1: Class Chassis {2: public: static Chassis* my();1) // Hide factory3: protected: Chassis();2)

4: };

5: static Chassis* c = 0;6: Chassis::Chassis() { c = this; } // Auto register7: Chassis::my() {8: if (0 == c) { c = new Chassis(); } // Default9: return c;0: }

1: Class RS17Chassis : Chassis { … };

2: static RS17Chassis r; // Auto register provider

… to enable auto-registration

.h

.C

.h

.C

Page 33: Component Systems in the Field: Integrating and ... · §Blue/green deployment §A/B test §Canary release §Monitor, profile and trace §Budget §Parallel execution §Test regressions

Unrestricted © Siemens AG 2017May 2, 2017Page 33 Markus Lachenmayr | Siemens Corporate Technology

Implementing connectors withwell-proven and established patterns

PatternSeparated InterfaceFowler)

InsulationLakos)

Abstract FactoryGoF)

RegistryFowler)

ProxyGoF)

Chain of ResponsibilityGoF)

StrategyGoF)

GatewayFowler)

IntentionDefine interfaces in separate binaries.Decouple clients and providers. Optionally, integrateservices without recompiling clients and providers.Defer object creation to (1) decouple clients andproviders and to (2) optionally insert proxies.Providers register and clients find concrete factoriesdynamically.Integrate operation service around interfaces.Integrate several operation services.Control clients, providers, services in connectors.Control connectors remotely.

Urr

r

r

nananana

Lrr

r

r

rooo

U = Unloaded connectors, L = Loaded connectors, r = required, o = optional, na = not available


Recommended