+ All Categories
Home > Documents > Evaluating PHP as a technology platform for SOA implementations

Evaluating PHP as a technology platform for SOA implementations

Date post: 17-Dec-2014
Category:
Upload: zubin67
View: 915 times
Download: 1 times
Share this document with a friend
Description:
 
44
Vedanta Barooah Hewlett-Packard Company Evaluating PHP as a Technology Platform for SOA Implementations
Transcript
Page 1: Evaluating PHP as a technology platform for SOA implementations

Vedanta Barooah

Hewlett-Packard Company

Evaluating PHP as a Technology Platformfor SOA Implementations

Page 2: Evaluating PHP as a technology platform for SOA implementations

Introduction

• Myself:

� Hewlett-Packard (Consulting & Integration)

� Consultant for Open Source Services• Linux

• Middleware

• PHP, Scripting• PHP, Scripting

• Java/ J2EE (Learning… ☺)

• Enterprise Directories

• Databases

• Open Source Governance

� Systems and Network Infrastructure

� Past: Web Developer, System Admin

11-Oct-07 Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 2

Page 3: Evaluating PHP as a technology platform for SOA implementations

Evaluating PHP as a Technology Platformfor SOA Implementations

• SOA and SOA @ HP

• The SOA Sandbox

• Component Evaluations

• Conclusions

11-Oct-07 Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 3

Page 4: Evaluating PHP as a technology platform for SOA implementations

Why SOA? - The Business Benefits

• Reduce time-to-market for new products and services

• More revenue from better

• Reduce IT resource costs for maintenance

Increase agility

Reduce costs

11-Oct-07 Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 4

• More revenue from better operational capability

• More revenue from newly enabled capabilities

• Increase IT innovation spend

• Reduce costs related to providing new functionality

• Eliminate redundant systems and architectures

Page 5: Evaluating PHP as a technology platform for SOA implementations

SOA – Technical Characteristics

• Abstraction of functionality into services

• Loose coupling

• Composition of new services

• Portable business logic • Portable business logic

• Interfaces are robust to change

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 5

Page 6: Evaluating PHP as a technology platform for SOA implementations

Example : Transaction Taxes in the Enterprise

Tax Calculation

ERP 1 ERP 2 Finance E CommBefore

11-Oct-07

USA Korea Brazil GermanyTax Reporting

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 6

Page 7: Evaluating PHP as a technology platform for SOA implementations

Example : Transaction Taxes in the Enterprise

Tax Calculation

ERP 1 ERP 2 Finance E Comm

Tax Calculation Service

After

11-Oct-07

USA Korea Brazil GermanyTax Reporting

Tax Calculation Service

Data

Warehouse

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 7

Page 8: Evaluating PHP as a technology platform for SOA implementations

Implementation

Business Application 1 Business Application N

BA Adapter BA Adapter

11-Oct-07 NAME OF THE SESSION COMES HERE PAGE 8

XML Router

Adapter Adapter

Tax Engine 1 Tax Engine N

Data Buffer

Data Warehouse

Page 9: Evaluating PHP as a technology platform for SOA implementations

SOA @ HP – Why are we doing this?

• HP’s Adaptive Infrastructure Strategy

• Significant investments in SOA

• Technology agnostic – supports both Open

Source and commercial platforms

• Need for characterization of SOA Infrastructure • Need for characterization of SOA Infrastructure

Components

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 9

Page 10: Evaluating PHP as a technology platform for SOA implementations

Evaluation Criteria

Functionality •Feature set

•Relevance to test app

Adaptability •Programmatic APIs

•XML APIs

•GUIs

RAS •Reliability/Stability

11-Oct-07

RAS •Reliability/Stability

•(High) Availability

•Scalability / Performance

Manageability •Built-in management and monitoring functions

•Relevance to test app

Developments Tools •IDE support

•Other tools support

Cost •License costs

•Support/training costs

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 10

Page 11: Evaluating PHP as a technology platform for SOA implementations

The SOA Sandbox

Page 12: Evaluating PHP as a technology platform for SOA implementations

What is it?

• A test and validation sandbox for SOA

infrastructure components

• A development environment and runtime

environment for web services and clients

• A demonstration environment

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 12

• A demonstration environment

Page 13: Evaluating PHP as a technology platform for SOA implementations

The SOA Eco System

Client 1 Client 2 Client N Client Layer

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 13

Service1 Web Services LayerService 2 Service 3 Service M

Infrastructure Components: Service Bus, Registry, Workflow/BPM, Security,

Management, etc.

SOA

Infrastructure

Components

Page 14: Evaluating PHP as a technology platform for SOA implementations

Sample Application

“Quickloans” Banking Application

• Business Processes

• Server Components

• Client Components

• Web Services

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 14

• Web Services

• Commercial and Open Source Technologies

Page 15: Evaluating PHP as a technology platform for SOA implementations

Business Processes

Start

Customer

Registration

Customer

Loan

Application

Customer Bank Manager Bank VP

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 15

Credit Score

Check

High Credit Score

Low Credit Score

Loan Approved

Manual

Loan

Approval

Logout

Stop

Page 16: Evaluating PHP as a technology platform for SOA implementations

Technology View

VIEW CONTROLLER MODEL

Frontend (PHP)MySQL

LDAP

Reports (PHP)

Hibernate

JNDI

Web Services

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 16

Reports (PHP)

WAP (PHP)

PHP5 / SOAP

JNDI

Web Services

PHP

MySQL

C#

J2EE

Page 17: Evaluating PHP as a technology platform for SOA implementations

Software Components

PHP5

SOAPSOAP

PHP5

NuSOAP

PHP

Credit Score WS

Autho

rization

WS

Registra

tion

WS

LoanA

pplica

tion

WS

LoanQ

ueryWS

LoanRep

orting

WS

Auto

LoanA

pproval

WS

Manua

lLoanA

pproval

WS

Mobile ClientFrontend UI (Customer UI & VP Reports)

XFire

Java

Manager Approve/ Reject UI

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 17

Business Logic

Hibernate

JNDI

SUN/BEA JVM

JBoss Web Services

NuSOAP

C#

ASP .Net

Credit Score WS

Autho

rization

WS

Registra

tion

WS

LoanA

pplica

tion

WS

LoanQ

ueryWS

LoanRep

orting

WS

Auto

LoanA

pproval

WS

Manua

lLoanA

pproval

WS

OpenLDAP Directory

MySQL Database

Core Application

Page 18: Evaluating PHP as a technology platform for SOA implementations

SOA Evaluation Scenario

PHP

PHP UDDI

Service #1

Service #2

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA Implementations

PHP

PHP (WAP)

Clients

UDDI

Rule Engine

ESB

Service n

Page 19: Evaluating PHP as a technology platform for SOA implementations

Component Evaluation

Page 20: Evaluating PHP as a technology platform for SOA implementations

PHP Components

• Most web clients, reporting and mobile client

• Simpler web services in PHP

• Services written using NuSOAP and PHP5 SOAP

Extn

• Clients written in PHP5 SOAP extensions• Clients written in PHP5 SOAP extensions

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 20

Page 21: Evaluating PHP as a technology platform for SOA implementations

Java Components

• JBossWS Web Services Library

• Web/EJB Container – JBoss AS

• Wrapper services

� Authentication / Authorization using LDAP

� Data access using Hibernate/MySQL� Data access using Hibernate/MySQL

• Tomcat / XFire for building Java client

• Used JSR-181 annotations to simplify coding,

auto-generate WSDL and XML metadata

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 21

Page 22: Evaluating PHP as a technology platform for SOA implementations

Why PHP?

• Rapid development and debugging

(Compared to Java)

• Wide availability of libraries for integration and

extension (XML, String,… extensions)

• Many frameworks (Report Generation, Web • Many frameworks (Report Generation, Web

Services, Frontend, RAD, MVC)

• Lesser lines of code due to the dynamic nature

of the language

• Extensive API with custom extensions

• Popular language with a “not so steep” learning

curve

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 22

Page 23: Evaluating PHP as a technology platform for SOA implementations

Java

Lesser LOC and Maintenance Effort

http://server/wsdl

User[ ] getUsers(role) # using PHP5 Soap$wsdl = “http://server/wsdl”;$input = array(role=>“admin”);$cl = new SoapClient($wsdl);$users = $cl->__soapCall(‘getUsers’, $input);var_dump($users);

PHP

WSDL tool•Proxy Class (stub)

11-Oct-07

var_dump($users);•Proxy Class (stub) •User class

Import ProxyImport User

Proxy p = new Proxy();User [ ] p.getUsers(“admin”);

Client.java

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 23

Page 24: Evaluating PHP as a technology platform for SOA implementations

PHP for Web Services

• Easier to create (compared to Java)

• Fewer lines of code

• WSDL generation on the fly

• Platform of choice when not integrating with

legacy systems.legacy systems.

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 24

Page 25: Evaluating PHP as a technology platform for SOA implementations

PHP SOAP Implementations

• PHP5 SOAP Extensions

• PEAR::SOAP

• NuSOAP

• Others

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 25

Page 26: Evaluating PHP as a technology platform for SOA implementations

PHP5 SOAP

• Native PHP Extension

• Faster than any other PHP implementation

• Support - SOAP 1.1 , SOAP 1.2, WSDL 1.1

• Uses Gnome’s libxml

• Provides both server and client function• Provides both server and client function

• WSDL has to be hand crafted

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 26

Page 27: Evaluating PHP as a technology platform for SOA implementations

Example : PHP 5 SOAP

Server

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 27

Client

Page 28: Evaluating PHP as a technology platform for SOA implementations

PEAR::SOAP

• Part of the PEAR repository

• Written in PHP

• Provides both client and server functions

• Does not depend on any PHP extension

• Depends on Pear – Mail, Mail_Mime, Net_DIME, • Depends on Pear – Mail, Mail_Mime, Net_DIME,

Net_SMTP, Auth_SASL, Mail_mimeDecode

• Works with PHP 4

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 28

Page 29: Evaluating PHP as a technology platform for SOA implementations

NuSOAP

• Written in PHP

• Works with PHP4

• Creates WSDL on the fly

• Provides server and client functions

• A class name clash with PHP5 soap• A class name clash with PHP5 soap

11-Oct-07 Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 29

Page 30: Evaluating PHP as a technology platform for SOA implementations

Sample Code: PHP WS (NuSOAP)

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 30

Page 31: Evaluating PHP as a technology platform for SOA implementations

J2EE for Web Services

• Industry wide acceptance

• Stable, mature and scalable platform

• Integration with legacy applications

• Enterprise Features

� High Availability / Failover� High Availability / Failover

� Messaging

� Robust web services platform

� Business Process Management / Orchestration

11-Oct-07 NAME OF THE SESSION COMES HERE PAGE 31

Page 32: Evaluating PHP as a technology platform for SOA implementations

PHP : Experiences so far

• Compact code – fewer lines compared to Java

• Reduced maintenance effort

• Fast code, test and debug cycle

• nuSOAP did not work with complex services

• Easy WSDL generation with nuSOAP• Easy WSDL generation with nuSOAP

• PHP5 SOAP extensions faster than nuSOAP

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 32

Page 33: Evaluating PHP as a technology platform for SOA implementations

Java, C# : Experiences so far

• JBossWS simplifies web services creation

compared to old J2EE 1.4 model

• Annotations are easy, compared to XML

hacking

• Lack of in-depth JBoss documentation• Lack of in-depth JBoss documentation

• Visual Studio .net tooling is very flexible for C#

Web Services creation

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 33

Page 34: Evaluating PHP as a technology platform for SOA implementations

PHP WS Clients : Best Practices

• Reuse – API, Extensions, Classes

• Wrap Consumer Classes – simplify objects

• Layer UI and Logic - use Template Systems and

MVC frameworks

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 34

Page 35: Evaluating PHP as a technology platform for SOA implementations

SOA Infrastructure Components

• jUDDI - Registry

• HP SOA Manager (HP SOAM)

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 35

Page 36: Evaluating PHP as a technology platform for SOA implementations

UDDI/Registry

• jUDDI used as a UDDI registry

• Eclipse WST to publish web services - Also works

for PHP web services

• jUDDI client API to query registry

• PEAR::UDDI client API to query registry• PEAR::UDDI client API to query registry

11-Oct-07

ws.apache.org/juddi/

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 36

Page 37: Evaluating PHP as a technology platform for SOA implementations

HP SOA Manager

• Management critical for all SOA infrastructure

components

• Ability to integrate into upstream enterprise level

management platform

• Monitors transaction counts and latency• Monitors transaction counts and latency

• Broker-based integration

11-Oct-07

www.managementsoftware.hp.com/products/soa/

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 37

Page 38: Evaluating PHP as a technology platform for SOA implementations

HP SOAM : Use Case

Client 1 Client 2 Client N Client Layer

11-Oct-07

Service1Web Services Layer

Service 2 Service 3 Service MEvaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 38

Page 39: Evaluating PHP as a technology platform for SOA implementations

SOAM – Broker based integration

Client LayerClient 1 Client 2 Client 3 Client 4

11-Oct-07

Web Services LayerService1 Service 2 Service 3 Service M

SOAM Broker Services LayerBroker1 Broker2 Broker3 BrokerM

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 39

Page 40: Evaluating PHP as a technology platform for SOA implementations

SOAM – Experiences so far

• Seamless operation with Sandbox WS platforms

• Non-intrusive (no changes to WS required)

• GUI for creating proxy (broker) services

• Latency impact for broker based integration

• Run SOAM broker on the same machine that • Run SOAM broker on the same machine that

runs the web service to be monitored

� Risk of significant networking overhead impacting end-to-end processing times

• Use multiple broker instances for scalability and

high availability

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 40

Page 41: Evaluating PHP as a technology platform for SOA implementations

Conclusions

Page 42: Evaluating PHP as a technology platform for SOA implementations

Conclusions

• Open Source technologies for web services and web services clients are valid implementation platforms

• Open Source SOA infrastructure components are often API-centric and require custom coding for integration and user interfaces

• Commercial SOA infrastructure components provide for

11-Oct-07

• Commercial SOA infrastructure components provide for business process changes out of the box

• Interoperability between web services written in different languages is not always straightforward

Evaluating PHP as a Technology Platformfor SOA Implementations

PAGE 42

Page 43: Evaluating PHP as a technology platform for SOA implementations

PHP SOA Components

• SOAP for PHP

� PHP SOAP Extensions (php.net/soap)

� PEAR::SOAP (pear.php.net/package/SOAP)

� NuSOAP (dietrich.ganx4.com/nusoap/)

� eZ SOAP (ez.no)

• Pear UDDI (pear.php.net/package/UDDI)• Pear UDDI (pear.php.net/package/UDDI)

• XML-RPC Toolkit (phpxmlrpc.sourceforge.net)

• Zend Framework (framework.zend.com)

• Blackbird ESB (blackbirdesb.org)

• Eclipse PDT, WST (eclipse.org)

• SDO (php.net/sdo)

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 43

Page 44: Evaluating PHP as a technology platform for SOA implementations

Questions and Resources

• Questions?

• HP & Open Source (hp.com/go/opensource)

• HP & SOA (hp.com/go/soa)

11-Oct-07Evaluating PHP as a Technology Platform

for SOA ImplementationsPAGE 44


Recommended