25
© 2014 IBM Corporation Service-oriented Architecture Principles, Practice, and IBM i Rich Diedrich [email protected] Lab Services Power Systems Delivery Practice – IBM i

What do I mean by a Service-oriented Architecture?

Embed Size (px)

DESCRIPTION

™. Service-oriented Architecture Principles, Practice, and IBM i Rich Diedrich [email protected] 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 - PowerPoint PPT Presentation

Citation preview

© 2014 IBM Corporation

Service-oriented ArchitecturePrinciples, Practice, and IBM i

Rich [email protected] Services Power Systems Delivery Practice – IBM i

© 2014 IBM Corporation

2

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

© 2014 IBM Corporation

3

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

© 2014 IBM Corporation

4

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

© 2014 IBM Corporation

5

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

© 2014 IBM Corporation

6

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

© 2014 IBM Corporation

7

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

© 2014 IBM Corporation

8

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

© 2014 IBM Corporation

9

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

© 2014 IBM Corporation

10

Traditional green screen flow

CustomerEntry

BillingEntry

ItemEntry

AddressEntry

OrderConfirmation

© 2014 IBM Corporation

11

Web Flow

Items

Customer

Address

Confirmation

Billing

© 2014 IBM Corporation

12

Screen Scraping State Problem

ItemInformation

ItemList

WrongState

ItemInformation

ItemList

ItemInformation

© 2014 IBM Corporation

13

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

© 2014 IBM Corporation

14

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

© 2014 IBM Corporation

Loosely coupled interfaces require larger grained calls for performance

Consumer Provider Consumer Provider

Lower overheadBetter performance

High overheadPoor performance

© 2014 IBM Corporation

16

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

© 2014 IBM Corporation

17

Business Level Interfaces

Customer

OrderCustomer

BillingAddress

ItemsPrice

Customer

Billing

Address

Item

Billing

Address

Item

PriceAdjustments

© 2014 IBM Corporation

18

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

© 2014 IBM Corporation

19

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

© 2014 IBM Corporation

20

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

© 2014 IBM Corporation

21

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

© 2014 IBM Corporation

22

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

© 2014 IBM Corporation

23

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

© 2014 IBM Corporation

24

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

© 2014 IBM Corporation

25

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