250 likes | 414 Views
™. Service-oriented Architecture Principles, Practice, and IBM i Rich Diedrich richd@us.ibm.com Lab Services Power Systems Delivery Practice – IBM i. What do I mean by a Service-oriented Architecture?. Software architecture consisting of services Principles, not specific technologies Services
E N D
™ Service-oriented ArchitecturePrinciples, Practice, and IBM iRich Diedrichrichd@us.ibm.comLab Services Power Systems Delivery Practice – IBM i
What do I mean by a Service-oriented Architecture? Software architecture consisting of services Principles, not specific technologies Services Provide a business function Reusable Encapsulated Additional service properties Loosely coupled Stateless May reside on different platforms
A service performs a business function and has several important properties Performs business function Get information Perform action Properties Encapsulated Reusable Stateless Event driven Loosely coupled
An encapsulated interface hides the implementation Documented interface Web Services Description Language (WSDL) Can be done in other ways Internal implementation not exposed Changes in implementation do not affect consumers Enables platform changes
Services should be designed to be reusable Services implement business function Interface should reflect actual business operations Questions to be asked: What are the business objects? What information needs to be returned from these objects? What operations can be performed on these objects Can be combined in new ways Not restricted to specific flow in traditional programs Can be used by new interfaces Trend is to have customers enter data themselves Desktops Phones
Services are modular Definition Constructed in standardized units or dimensions for flexibility and variety in use Modern Applications Rapidly changing requirements Wide variety of interfaces Different properties New interfaces on short notice State is driven by the interface
ILE (Integrated Language Environment) enables modular coding in IBM i languages Enables modular code Fast calls Fine grained reusable procedures Service programs Common code Dynamic binding Encapsulation Update capable Activation can be deferred Teraspace Large storage allocation
Stateless services are critical for reusability and scalability Service order may change based on interface Traditional application flow may not match user expectation Different users may request or enter information in different order Thousands of users entering data at once Not a few users doing mass entry Not feasible to assign a job to a user Library list situation Changing the library list may have performance impacts Important factor in consolidating systems
Stateless programming can be a significant change for traditional IBM i applications Monolithic programs are filled with state User interface state interlaced with business logic Difficult to separate Deep structural problem “Magic” solutions do not fix Two kinds of state Modal interface state Current screen Dictated by program flow Accumulated state “Shopping cart” Flexible operation order
Traditional green screen flow Customer Entry Billing Entry Item Entry Address Entry Order Confirmation
Web Flow Customer Items Confirmation Address Billing
Screen Scraping State Problem Item Information Item List Wrong State Item List Item Information ItemInformation
Event driven Consumer controls flow Service is not driving Consumer may be a person or another process Consumer controls timing Service is very different than batch entry process Record locking becomes interesting Service cannot rely on notification of external process ending Pending transactions must be handled appropriately
Loosely coupled Service may be consumed over a network Each interaction will have higher overhead Green screen is a very light and responsive interface Interface must be designed for higher latency Fewer calls with more data in each call
Loosely coupled interfaces require larger grained calls for performance Lower overhead Better performance High overhead Poor performance Consumer Provider Consumer Provider
Service interfaces should be designed for extensibility Operations and parameters may need to be added Shouldn't break existing interfaces New operations Optional parameters Business object model is important Allows logical changes Original implementation may be limited Underlying data Available procedures Interfaces can be designed for future functionality
Business Level Interfaces Order Customer Billing Address Items Price Customer Customer Billing Billing Address Address Item Item Adjustments Price
What does implementing a service-oriented architecture mean to my IBM i applications? Code modernization Separation of layers Modularization ILE RPG direction is toward modern coding practices Database modernization Integrity in database Use of SQL Development tools SEU no longer being enhanced RPG changes not recognized by SEU
What are some steps to modernize an IBM i application? Develop/Update application programming process and standards Current tools Modular and service oriented code Stateless when practical Current language techniques Design new architecture Based on desired business process Understand the relationship to current architecture Use the architecture and standards as code is developed or modified Develop reusable procedures for any new interfaces or functions Modify older code to use the procedures
More steps in modernization: Some parts of an application may required dedicated projects Large programs Unmaintainable programs Some parts of an application may be left alone Rarely used Few users Start now! No magic solution Lots of hard work ahead
That is a lot of change, how should it be prioritized? Prioritize business services Designed based on business functions Used with a variety of interfaces Used with rapidly changing requirements Not everything must be done immediately Infrequently used functions Limited set of users Infrequently changed Tactical tools HATS Open Access Watch for scope creep
How can do I know that I can handle future technologies? How do I design for (name an interface technology)? Specific interface technologies will change The fundamental principles work across technologies Flight/400 Modernized years ago Presented at LUG 2010 Lombardi presentation used the interfaces Integrated Web Services Server Compile service oriented procedure with integrated PCML option Web based wizard can expose as web service Service can be running in minutes
What are some current technologies? Web Services SOAP REST IBM MQ High function heterogeneous message queue Request/response Send and forget Publish and subscribe IBM Integration Bus Can perform transforms
Integrated Web Services for IBM i Server Rapidly deploy programs or procedures as web services Simple web based wizard Client Generate web services client code from WSDL C++, C, RPG stubs http://www-03.ibm.com/systems/power/software/i/iws/index.html
What should I remember from this presentation? Principles are important Specific technologies will change Tooling will change Think about business functions Probably related to current application flow Needs to be thought through Use modern tools Increased productivity Continuing enhancements Get started The basic principles will apply in the future All the actual magic applies to modularized code