SlideShare a Scribd company logo
1 of 29
®




    Using PHP and SOA for Situational
    Applications in the Enterprise
    Mike Burr
    burrm@us.ibm.com
    Senior Developer
    WebSphere Technology Institute
    IBM



                New York PHP Conference & Expo 2006

                                                      © 2006 IBM Corporation
1
Goals
     Explore how PHP best fits in the enterprise. What
      works well, what doesn’t, what needs to be fixed?
     Propose some technologies, tools and approaches
      that we believe will help PHP reach its full potential in
      the enterprise environment.
     Get feedback from the PHP community. Do you think
      we’re on the right track?




2
      New York PHP Conference & Expo 2006
Application Landscape Overview


                                             Growth in # of Apps




Systematic / Operational                                  Situational / Opportunistic
  Applied to stable, well-understood environments           Applied to a new or still-changing environments
  Focus on efficiency                                       Focus on effectiveness
  Key metrics: cost / ROI, performance, error-free,         Key metrics: time-to-productive-use, good-
   secure                                                     enough
  Lifespan expectation: long-lived                          Lifespan expectation: short
  Basis: mostly Transactional, some Business                Basis: mostly Information Delivery, some
   Process                                                    Business Process
  Source: packaged software, minor modification, a          Source: situated design / custom development
   few custom                                                Decision Maker: partnership, primarily LOB
  Decision Maker: partnership, primarily IT (In-
    House or Bus Partner)



3
              New York PHP Conference & Expo 2006
Shifting focus
    Enterprise IT has traditionally focused toward the systematic end of
     the spectrum, but several forces are pushing them to incorporate
     the entire spectrum into their thinking:
      Increasing speed of business is translating to immediate need
        and shorter expected lifespan for applications.
      Difficulty adapting current IT processes and methodologies that
        assume greater up-front investment in application and
        amortization over long application lifespan.
      New technologies enabling classes of applications with real
        business value that are a better match for the technologies at
        the situational app end of the spectrum (e.g. mashups).
      Economies of scale from consolidating infrastructure used to
        deploy situational apps
      Need to audit application use of data, e.g. for governmental
        regulations

4
       New York PHP Conference & Expo 2006
PHP and SOA
    The combination of PHP and SOA is a good solution for these
      situational applications, but there are gaps between enterprise IT
      and PHP that need to be addressed to allow PHP to be an equal
      player in the enterprise IT space:


       Programming model
       Development and deployment model
       Management model
       Enterprise class QoS


    BUT…we must not destroy the things that make PHP appealing in
     the process of addressing these gaps.

5
       New York PHP Conference & Expo 2006
Training Tracker
    As an example, consider the needs of the
     accounting department in a large
     enterprise that needs to put all its
     employees through a training program
     offered by an external vendor to make the
     employees aware of some recently
     established accounting rules. The
     accounting department would like a
     Training Tracker application that allows
     employees to enroll and schedule their
     training and managers to track the
     successful completion of training by all
     their employees.

6
         New York PHP Conference & Expo 2006
Training Tracker architecture

                     Training
                     Tracker


                                                internet

                       corporate network
                                                           Education
                                                            service




                                    Employee
                                    directory




7
    New York PHP Conference & Expo 2006
Programming Model for PHP Enterprise
Applications
     Be simple and thus enable developers who have a much better
      understanding of business issues as compared to IT issues.
     Insulate the developer from underlying SOA implementation
      technologies, such as XML, WSDL, SOAP and REST.
     Provide a unified API for data from various data sources in a
      SOA environment, such as XML, databases and legacy
      applications.
     Provide a unified API for invoking different types of service
      implementations in a SOA environment, such as REST and
      SOAP.


8
       New York PHP Conference & Expo 2006
SDO (Service Data Objects)
    The bundle of technology called SDO is comprised of:
     APIs for working with the data in an individual SDO
     APIs for creating SDOs, hooking them into a graph, unsetting them…
     An XML DAS: a handful of lines of code to get data from XML and turn it
      into a graph of SDOs, one line to write it back out
       Like DOM but a lot easier to use
     A handful of lines to get data from a relational database and turn it into a
      graph of SDOs, one line to write it back
     Work with the data in the same way regardless of source
     A graph of SDOs is disconnected from the data source but retains a
      change history and a copy of its initial values (enables optimistic offline
      lock – see Fowler "Patterns of Enterprise Application Architecture")
     Readily serialised and un-serialised – hence a preferred way to move
      structured data around in distributed (SOA) applications



9
       New York PHP Conference & Expo 2006
Training Tracker SDO example
     <?php
       /*****************************************************************
       * METADATA DEFINING THE DATABASE
       ******************************************************************/
       $training_table = array (
           'name' => „training',
           'columns' => array(„empid', „trainingDate'),
           'PK' => „empid'
           );
       $database_desc = array($training_table);
       ?>




10
        New York PHP Conference & Expo 2006
require_once 'SDO/DAS/Relational.php';
     /***************************************************************
     * Construct the DAS with the metadata
     ***************************************************************/
     $das = new SDO_DAS_Relational($database_desc);


     /**************************************************************
     * Get a database connection
     ***************************************************************/
     $dbh = new PDO(PDO_DSN, DATABASE_USER, DATABASE_PASSWORD);


     /**************************************************************
     * Issue a query to obtain an object for a row
     ***************************************************************/
     $pdo_stmt = $dbh->prepare('select empid, trainingDate from training where empid=?');
     $root = $das->executePreparedQuery($dbh, $pdo_stmt, array($empid));


     $training = $root->training[0];




11
          New York PHP Conference & Expo 2006
// Mary has scheduled her training
     $training->trainingDate = “June 23, 2006”;




     require_once 'SDO/DAS/Relational.php';
     /**************************************************************
      * Construct the DAS with the metadata and get a connection
      ***************************************************************/
     $das = new SDO_DAS_Relational($database_desc);
     $dbh = new PDO(PDO_DSN, DATABASE_USER, DATABASE_PASSWORD);

     /**************************************************************
      * Write the updates to the database. $root is the original root
      * data object returned during retrieval of the training information.
      ***************************************************************/
     $das->applyChanges($dbh, $root);




12
        New York PHP Conference & Expo 2006
SCA (Service Component Architecture)
      Simplifies application assembly by resolving references
       to other components and services at runtime
      Uses SDO to simplify working with complex XML data
       structures on Web service calls
      Simplifies writing components which can be called
       locally or remotely (via Web services)
      Automatically generates WSDL definitions from
       annotations within the script



13
       New York PHP Conference & Expo 2006
Training Tracker Component
     Training Tracker component aggregates the other services
      and database information

     /**
      * @service
      */
     class TrainingTracker {
       /**
        * @reference http://empdir.mycompany.com/empdir.wsdl
        */
       $empdir;

      /**
       * @reference http://websvc.we-teach.com/courseschedule.wsdl
       */
      $courses;
      ...



14
        New York PHP Conference & Expo 2006
Training Tracker Component (continued)

     function showStatus($manager) {
         foreach ($empdir->reportsTo($manager) as $employee) {
           // fetch training record for $employee->id as shown in
           // SDO example above

                 if ($training->trainingDate) {
                   print $employee->name.”:”.$training->trainingDate;
                 }
                 else {
                   print $employee->name.”: training still available on”.
                         $courses->datesAvailable(COURSE);
                 }
             }
         }
     }




15
             New York PHP Conference & Expo 2006
Development and Deployment Model
     Developing an application is only part of the problem.
      How do you make an application available to users?
      Staged mode – copy application artifacts from development
       environment to production environment
      Direct mode – use the same environment for both development
       and production

                                              ?


16
        New York PHP Conference & Expo 2006
The Packaging and Installation Problem
                           Packaging of PHP applications today is ad-hoc.
                              Many of the more mature PHP applications
                              seem to be converging on a common pattern:
                           1. Application files packaged as .zip or .tar.gz archive
                           2. Users extract archive, then point web browser to
                              application install script (e.g. install.php)
      install.php
                           3. Install script collects configuration information and
                              inspects/modifies environment to complete install

config.php
                           4. User performs some manual steps (e.g. cleanup install
                              directory) to indicate install/configuration is complete



17
             New York PHP Conference & Expo 2006
Proposed solution
     Solution needs to minimally ensure the following:
      consistent settings in the PHP environment (php.ini)
      database has the correct schema and all the pre-
       loaded data that the application depends on
      constants in the PHP application scripts that are used
       for things like establishing database connections,
       writing to temporary storage, etc. are set
      correct set of PEAR and PECL libraries (with the right
       versions) are available


18
       New York PHP Conference & Expo 2006
Proposed solution
                                                                         .html,
     Use PHPDoc tags to flag variables that need                         .gif,…        .php
      to be set to configure the application.
                                                        PEAR/PECL and
     Packaging tool that collects the following into      php.ini info

      an application archive file:
      application files (scripts and static content)                                  install.php


      database schema and initial data




                                                                           packaging
                                                                              tool
      install.php script generated from PHPDoc
       tags
      information about PEAR/PECL libraries
       needed and php.ini settings                                         .tar.gz




19
           New York PHP Conference & Expo 2006
Training Tracker install.php example
     /**
     * Database password
     *
     * Set the value to the password used to access the Training Tracker
     * database.
     *
     * @install
     */
     define('DATABASE_PASSWORD', 'mydbpassword');


     /**
     * Some other variable
     *
     * This text would describe what myvar is used for and how the administrator
     * should determine what to set it to.
     *
     * @global integer $GLOBALS['othervar']
     * @install
     */
     $GLOBALS['othervar'] = 42;


20
           New York PHP Conference & Expo 2006
Training Tracker install.php example




21
     New York PHP Conference & Expo 2006
Management model
      PHP developers like advantages of “under the desk” deployment:
        Simple to monitor app and correct operational problems as
         necessary
        Application trivially upgraded to handle bug fixes,
         enhancements and new requirements
      But this model does not match the needs of enterprise IT
       department:
        No ability to monitor or manage application and its impacts on
         other IT infrastructure (use of enterprise services, for example)
        Limited/no ability to track application usage for billing and
         regulatory compliance purposes
        No ability to assess backup and security provisions for
         application



22
        New York PHP Conference & Expo 2006
Private Virtual Servers
      Modeled after PHP hosting provided by ISPs
      PHP developer requests virtual PHP server from
       enterprise IT
      Server is hosted on IT infrastructure; developer uses
       web-based console and WebDAV to access
      Includes database space and simplified access to
       enterprise services (code snippets, preconfigured
       client code, etc.)



23
       New York PHP Conference & Expo 2006
Benefits
      Developer
      essentially the same experience as with a local
       LAMP stack
      gets enterprise-level backup, failover, security and
       support
      IT
      gains ability to monitor and manage application
      distributed shared caching
      simplified migration path when situational
       applications become strategic

24
       New York PHP Conference & Expo 2006
QoS
                                                             Dynamically adjust number
                                                              of instances of application
                  Training
                  Tracker             Training                in response to demand and
                                      Tracker
                                                              administrative policy
                                                 Training
                                                 Tracker
                                                             Impact of application on
                                                              enterprise services can be
                                                              measured, monitored and
                              SPEED     SPEED
                              LIMIT     LIMIT
                                                              controlled
                              20        20
       Core                                                  Access to application can
     enterprise       SPEED                                   be controlled and audited
                      LIMIT
        app
                      70        Employee                      for regulatory or billing
                                directory
                                                              purposes


25
      New York PHP Conference & Expo 2006
Conclusion
     The combination of PHP and SOA has the potential to
      address the rapidly-expanding need for situational
      applications in the enterprise. With a few carefully
      crafted changes, PHP and enterprise IT can converge
      in a way that lets users capitalize the strengths of
      each.




26
       New York PHP Conference & Expo 2006
Further reading
      PHP topics on developerWorks
       http://www-128.ibm.com/developerworks/opensource/top-projects/php.html

      SDO
       http://www-128.ibm.com/developerworks/library/os-sdophp/
       http://www-128.ibm.com/developerworks/opensource/library/os-php-sdo/
       http://www.php.net/manual/en/ref.sdo.php

      SCA
       http://www-128.ibm.com/developerworks/library/specification/ws-sca/ (although
        we expect PHP SCA will be much simpler than the Java and C++ examples
        you see here)




27
       New York PHP Conference & Expo 2006
28
     New York PHP Conference & Expo 2006
Thanks!
     If you have any questions or would like to get in touch
        with me, my email address is:
     burrm@us.ibm.com




29
       New York PHP Conference & Expo 2006

More Related Content

What's hot

Red prairie visualstudio2010_cs
Red prairie visualstudio2010_csRed prairie visualstudio2010_cs
Red prairie visualstudio2010_csrohit_sharma1977
 
Getting started-with-oracle-so a-vi
Getting started-with-oracle-so a-viGetting started-with-oracle-so a-vi
Getting started-with-oracle-so a-viAmit Sharma
 
20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...
20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...
20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...Sadalit Van Buren
 
Performance optimization: A combination of User Experience, Business and IT
Performance optimization: A combination of User Experience, Business and ITPerformance optimization: A combination of User Experience, Business and IT
Performance optimization: A combination of User Experience, Business and ITMozammel Hoque
 
CV - Irwan Syahputra Harahap
CV - Irwan Syahputra HarahapCV - Irwan Syahputra Harahap
CV - Irwan Syahputra Harahapirwan syahputra
 
Competitive analysis-red prairie-logistics-management-software
Competitive analysis-red prairie-logistics-management-softwareCompetitive analysis-red prairie-logistics-management-software
Competitive analysis-red prairie-logistics-management-softwareSplinternetMarketing.com
 
Syclo Techno Functional Consultant
Syclo Techno Functional ConsultantSyclo Techno Functional Consultant
Syclo Techno Functional ConsultantBalaji Mahesh B
 
20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...
20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...
20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...Sadalit Van Buren
 
Best practices for fusion hcm cloud implementation
Best practices for fusion hcm cloud implementationBest practices for fusion hcm cloud implementation
Best practices for fusion hcm cloud implementationmohamed refaei
 
Whats new in Primavera Prime 15.2?
Whats new in Primavera Prime 15.2?Whats new in Primavera Prime 15.2?
Whats new in Primavera Prime 15.2?p6academy
 
Nachi Sharma Oracle Product Consulting
Nachi Sharma Oracle Product ConsultingNachi Sharma Oracle Product Consulting
Nachi Sharma Oracle Product ConsultingNachiketa Sharma
 
Fusion app tech_con8707_pdf_8707_0001
Fusion app tech_con8707_pdf_8707_0001Fusion app tech_con8707_pdf_8707_0001
Fusion app tech_con8707_pdf_8707_0001jucaab
 
Fusion apps financials strategy - 20100721
Fusion apps   financials strategy - 20100721Fusion apps   financials strategy - 20100721
Fusion apps financials strategy - 20100721Suresh Mishra
 
How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...Ganesh Kumar
 

What's hot (20)

Technology Update
Technology UpdateTechnology Update
Technology Update
 
Technology update
Technology update   Technology update
Technology update
 
Hoffer mdm11e pp_ch08
Hoffer mdm11e pp_ch08Hoffer mdm11e pp_ch08
Hoffer mdm11e pp_ch08
 
Red prairie visualstudio2010_cs
Red prairie visualstudio2010_csRed prairie visualstudio2010_cs
Red prairie visualstudio2010_cs
 
Getting started-with-oracle-so a-vi
Getting started-with-oracle-so a-viGetting started-with-oracle-so a-vi
Getting started-with-oracle-so a-vi
 
20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...
20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...
20120428 How We Did It - Tracking and Reporting on a NonLinear Process with I...
 
Company profile Metrasys
Company profile MetrasysCompany profile Metrasys
Company profile Metrasys
 
Oracle Fusion Applications 101
Oracle Fusion Applications 101Oracle Fusion Applications 101
Oracle Fusion Applications 101
 
Performance optimization: A combination of User Experience, Business and IT
Performance optimization: A combination of User Experience, Business and ITPerformance optimization: A combination of User Experience, Business and IT
Performance optimization: A combination of User Experience, Business and IT
 
CV - Irwan Syahputra Harahap
CV - Irwan Syahputra HarahapCV - Irwan Syahputra Harahap
CV - Irwan Syahputra Harahap
 
Competitive analysis-red prairie-logistics-management-software
Competitive analysis-red prairie-logistics-management-softwareCompetitive analysis-red prairie-logistics-management-software
Competitive analysis-red prairie-logistics-management-software
 
Syclo Techno Functional Consultant
Syclo Techno Functional ConsultantSyclo Techno Functional Consultant
Syclo Techno Functional Consultant
 
20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...
20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...
20120228 The SharePoint Maturity Model - How Far Along Are You? SPTechCon SF ...
 
Best practices for fusion hcm cloud implementation
Best practices for fusion hcm cloud implementationBest practices for fusion hcm cloud implementation
Best practices for fusion hcm cloud implementation
 
Whats new in Primavera Prime 15.2?
Whats new in Primavera Prime 15.2?Whats new in Primavera Prime 15.2?
Whats new in Primavera Prime 15.2?
 
Nachi Sharma Oracle Product Consulting
Nachi Sharma Oracle Product ConsultingNachi Sharma Oracle Product Consulting
Nachi Sharma Oracle Product Consulting
 
Fusion app tech_con8707_pdf_8707_0001
Fusion app tech_con8707_pdf_8707_0001Fusion app tech_con8707_pdf_8707_0001
Fusion app tech_con8707_pdf_8707_0001
 
Fusion apps financials strategy - 20100721
Fusion apps   financials strategy - 20100721Fusion apps   financials strategy - 20100721
Fusion apps financials strategy - 20100721
 
Resume subbu
Resume subbuResume subbu
Resume subbu
 
How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...
 

Similar to Using PHP and SOA for Situational Applications in the Enterprise

Deepak_OFSAA_6_Years_Exp_Resume
Deepak_OFSAA_6_Years_Exp_ResumeDeepak_OFSAA_6_Years_Exp_Resume
Deepak_OFSAA_6_Years_Exp_ResumeDeepak Sharma
 
IRJET- Training and Placement Database Management System
IRJET- Training and Placement Database Management SystemIRJET- Training and Placement Database Management System
IRJET- Training and Placement Database Management SystemIRJET Journal
 
IBM Innovate 2013 Session: DevOps 101
IBM Innovate 2013 Session: DevOps 101IBM Innovate 2013 Session: DevOps 101
IBM Innovate 2013 Session: DevOps 101Sanjeev Sharma
 
Biztalk Server 2006
Biztalk Server 2006Biztalk Server 2006
Biztalk Server 2006ipaciti
 
Pre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA TechnologiesPre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA TechnologiesCA Technologies
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 
SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01Argos
 
IT Modernization For Process Modernization
IT Modernization For Process ModernizationIT Modernization For Process Modernization
IT Modernization For Process ModernizationDheeraj Remella
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKSPhil Reay
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKSPhil Reay
 
Remote Assessment Services
Remote Assessment ServicesRemote Assessment Services
Remote Assessment Servicesgnreddi
 
Remote Assessment Services
Remote Assessment ServicesRemote Assessment Services
Remote Assessment Servicesmadhu54321
 
Remote Assessment Services
Remote Assessment ServicesRemote Assessment Services
Remote Assessment Servicessuparnarao
 

Similar to Using PHP and SOA for Situational Applications in the Enterprise (20)

Oracle soa training
Oracle soa training Oracle soa training
Oracle soa training
 
Deepak_OFSAA_6_Years_Exp_Resume
Deepak_OFSAA_6_Years_Exp_ResumeDeepak_OFSAA_6_Years_Exp_Resume
Deepak_OFSAA_6_Years_Exp_Resume
 
IRJET- Training and Placement Database Management System
IRJET- Training and Placement Database Management SystemIRJET- Training and Placement Database Management System
IRJET- Training and Placement Database Management System
 
IBM Innovate 2013 Session: DevOps 101
IBM Innovate 2013 Session: DevOps 101IBM Innovate 2013 Session: DevOps 101
IBM Innovate 2013 Session: DevOps 101
 
Resume
ResumeResume
Resume
 
Ibt Soa Babson Talk V8
Ibt Soa Babson Talk V8Ibt Soa Babson Talk V8
Ibt Soa Babson Talk V8
 
Biztalk Server 2006
Biztalk Server 2006Biztalk Server 2006
Biztalk Server 2006
 
Pre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA TechnologiesPre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA Technologies
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01
 
Symphony Driver Essay
Symphony Driver EssaySymphony Driver Essay
Symphony Driver Essay
 
Bte
BteBte
Bte
 
Bte
BteBte
Bte
 
IT Modernization For Process Modernization
IT Modernization For Process ModernizationIT Modernization For Process Modernization
IT Modernization For Process Modernization
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
Remote Assessment Services
Remote Assessment ServicesRemote Assessment Services
Remote Assessment Services
 
Remote Assessment Services
Remote Assessment ServicesRemote Assessment Services
Remote Assessment Services
 
Remote Assessment Services
Remote Assessment ServicesRemote Assessment Services
Remote Assessment Services
 
SreenuPrasad
SreenuPrasadSreenuPrasad
SreenuPrasad
 

More from webhostingguy

Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Frameworkwebhostingguy
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guidewebhostingguy
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3webhostingguy
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serverswebhostingguy
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidationwebhostingguy
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreementwebhostingguy
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...webhostingguy
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...webhostingguy
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructurewebhostingguy
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.pptwebhostingguy
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy webhostingguy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandiserswebhostingguy
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Productswebhostingguy
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mbwebhostingguy
 

More from webhostingguy (20)

File Upload
File UploadFile Upload
File Upload
 
Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Framework
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web servers
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidation
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreement
 
Notes8
Notes8Notes8
Notes8
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructure
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.ppt
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandisers
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Products
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mb
 
Reseller's Guide
Reseller's GuideReseller's Guide
Reseller's Guide
 

Using PHP and SOA for Situational Applications in the Enterprise

  • 1. ® Using PHP and SOA for Situational Applications in the Enterprise Mike Burr burrm@us.ibm.com Senior Developer WebSphere Technology Institute IBM New York PHP Conference & Expo 2006 © 2006 IBM Corporation 1
  • 2. Goals  Explore how PHP best fits in the enterprise. What works well, what doesn’t, what needs to be fixed?  Propose some technologies, tools and approaches that we believe will help PHP reach its full potential in the enterprise environment.  Get feedback from the PHP community. Do you think we’re on the right track? 2 New York PHP Conference & Expo 2006
  • 3. Application Landscape Overview Growth in # of Apps Systematic / Operational Situational / Opportunistic  Applied to stable, well-understood environments  Applied to a new or still-changing environments  Focus on efficiency  Focus on effectiveness  Key metrics: cost / ROI, performance, error-free,  Key metrics: time-to-productive-use, good- secure enough  Lifespan expectation: long-lived  Lifespan expectation: short  Basis: mostly Transactional, some Business  Basis: mostly Information Delivery, some Process Business Process  Source: packaged software, minor modification, a  Source: situated design / custom development few custom  Decision Maker: partnership, primarily LOB  Decision Maker: partnership, primarily IT (In- House or Bus Partner) 3 New York PHP Conference & Expo 2006
  • 4. Shifting focus Enterprise IT has traditionally focused toward the systematic end of the spectrum, but several forces are pushing them to incorporate the entire spectrum into their thinking:  Increasing speed of business is translating to immediate need and shorter expected lifespan for applications.  Difficulty adapting current IT processes and methodologies that assume greater up-front investment in application and amortization over long application lifespan.  New technologies enabling classes of applications with real business value that are a better match for the technologies at the situational app end of the spectrum (e.g. mashups).  Economies of scale from consolidating infrastructure used to deploy situational apps  Need to audit application use of data, e.g. for governmental regulations 4 New York PHP Conference & Expo 2006
  • 5. PHP and SOA The combination of PHP and SOA is a good solution for these situational applications, but there are gaps between enterprise IT and PHP that need to be addressed to allow PHP to be an equal player in the enterprise IT space:  Programming model  Development and deployment model  Management model  Enterprise class QoS BUT…we must not destroy the things that make PHP appealing in the process of addressing these gaps. 5 New York PHP Conference & Expo 2006
  • 6. Training Tracker As an example, consider the needs of the accounting department in a large enterprise that needs to put all its employees through a training program offered by an external vendor to make the employees aware of some recently established accounting rules. The accounting department would like a Training Tracker application that allows employees to enroll and schedule their training and managers to track the successful completion of training by all their employees. 6 New York PHP Conference & Expo 2006
  • 7. Training Tracker architecture Training Tracker internet corporate network Education service Employee directory 7 New York PHP Conference & Expo 2006
  • 8. Programming Model for PHP Enterprise Applications  Be simple and thus enable developers who have a much better understanding of business issues as compared to IT issues.  Insulate the developer from underlying SOA implementation technologies, such as XML, WSDL, SOAP and REST.  Provide a unified API for data from various data sources in a SOA environment, such as XML, databases and legacy applications.  Provide a unified API for invoking different types of service implementations in a SOA environment, such as REST and SOAP. 8 New York PHP Conference & Expo 2006
  • 9. SDO (Service Data Objects) The bundle of technology called SDO is comprised of:  APIs for working with the data in an individual SDO  APIs for creating SDOs, hooking them into a graph, unsetting them…  An XML DAS: a handful of lines of code to get data from XML and turn it into a graph of SDOs, one line to write it back out  Like DOM but a lot easier to use  A handful of lines to get data from a relational database and turn it into a graph of SDOs, one line to write it back  Work with the data in the same way regardless of source  A graph of SDOs is disconnected from the data source but retains a change history and a copy of its initial values (enables optimistic offline lock – see Fowler "Patterns of Enterprise Application Architecture")  Readily serialised and un-serialised – hence a preferred way to move structured data around in distributed (SOA) applications 9 New York PHP Conference & Expo 2006
  • 10. Training Tracker SDO example <?php /***************************************************************** * METADATA DEFINING THE DATABASE ******************************************************************/ $training_table = array ( 'name' => „training', 'columns' => array(„empid', „trainingDate'), 'PK' => „empid' ); $database_desc = array($training_table); ?> 10 New York PHP Conference & Expo 2006
  • 11. require_once 'SDO/DAS/Relational.php'; /*************************************************************** * Construct the DAS with the metadata ***************************************************************/ $das = new SDO_DAS_Relational($database_desc); /************************************************************** * Get a database connection ***************************************************************/ $dbh = new PDO(PDO_DSN, DATABASE_USER, DATABASE_PASSWORD); /************************************************************** * Issue a query to obtain an object for a row ***************************************************************/ $pdo_stmt = $dbh->prepare('select empid, trainingDate from training where empid=?'); $root = $das->executePreparedQuery($dbh, $pdo_stmt, array($empid)); $training = $root->training[0]; 11 New York PHP Conference & Expo 2006
  • 12. // Mary has scheduled her training $training->trainingDate = “June 23, 2006”; require_once 'SDO/DAS/Relational.php'; /************************************************************** * Construct the DAS with the metadata and get a connection ***************************************************************/ $das = new SDO_DAS_Relational($database_desc); $dbh = new PDO(PDO_DSN, DATABASE_USER, DATABASE_PASSWORD); /************************************************************** * Write the updates to the database. $root is the original root * data object returned during retrieval of the training information. ***************************************************************/ $das->applyChanges($dbh, $root); 12 New York PHP Conference & Expo 2006
  • 13. SCA (Service Component Architecture)  Simplifies application assembly by resolving references to other components and services at runtime  Uses SDO to simplify working with complex XML data structures on Web service calls  Simplifies writing components which can be called locally or remotely (via Web services)  Automatically generates WSDL definitions from annotations within the script 13 New York PHP Conference & Expo 2006
  • 14. Training Tracker Component Training Tracker component aggregates the other services and database information /** * @service */ class TrainingTracker { /** * @reference http://empdir.mycompany.com/empdir.wsdl */ $empdir; /** * @reference http://websvc.we-teach.com/courseschedule.wsdl */ $courses; ... 14 New York PHP Conference & Expo 2006
  • 15. Training Tracker Component (continued) function showStatus($manager) { foreach ($empdir->reportsTo($manager) as $employee) { // fetch training record for $employee->id as shown in // SDO example above if ($training->trainingDate) { print $employee->name.”:”.$training->trainingDate; } else { print $employee->name.”: training still available on”. $courses->datesAvailable(COURSE); } } } } 15 New York PHP Conference & Expo 2006
  • 16. Development and Deployment Model Developing an application is only part of the problem. How do you make an application available to users?  Staged mode – copy application artifacts from development environment to production environment  Direct mode – use the same environment for both development and production ? 16 New York PHP Conference & Expo 2006
  • 17. The Packaging and Installation Problem Packaging of PHP applications today is ad-hoc. Many of the more mature PHP applications seem to be converging on a common pattern: 1. Application files packaged as .zip or .tar.gz archive 2. Users extract archive, then point web browser to application install script (e.g. install.php) install.php 3. Install script collects configuration information and inspects/modifies environment to complete install config.php 4. User performs some manual steps (e.g. cleanup install directory) to indicate install/configuration is complete 17 New York PHP Conference & Expo 2006
  • 18. Proposed solution Solution needs to minimally ensure the following:  consistent settings in the PHP environment (php.ini)  database has the correct schema and all the pre- loaded data that the application depends on  constants in the PHP application scripts that are used for things like establishing database connections, writing to temporary storage, etc. are set  correct set of PEAR and PECL libraries (with the right versions) are available 18 New York PHP Conference & Expo 2006
  • 19. Proposed solution .html, Use PHPDoc tags to flag variables that need .gif,… .php to be set to configure the application. PEAR/PECL and Packaging tool that collects the following into php.ini info an application archive file:  application files (scripts and static content) install.php  database schema and initial data packaging tool  install.php script generated from PHPDoc tags  information about PEAR/PECL libraries needed and php.ini settings .tar.gz 19 New York PHP Conference & Expo 2006
  • 20. Training Tracker install.php example /** * Database password * * Set the value to the password used to access the Training Tracker * database. * * @install */ define('DATABASE_PASSWORD', 'mydbpassword'); /** * Some other variable * * This text would describe what myvar is used for and how the administrator * should determine what to set it to. * * @global integer $GLOBALS['othervar'] * @install */ $GLOBALS['othervar'] = 42; 20 New York PHP Conference & Expo 2006
  • 21. Training Tracker install.php example 21 New York PHP Conference & Expo 2006
  • 22. Management model  PHP developers like advantages of “under the desk” deployment:  Simple to monitor app and correct operational problems as necessary  Application trivially upgraded to handle bug fixes, enhancements and new requirements  But this model does not match the needs of enterprise IT department:  No ability to monitor or manage application and its impacts on other IT infrastructure (use of enterprise services, for example)  Limited/no ability to track application usage for billing and regulatory compliance purposes  No ability to assess backup and security provisions for application 22 New York PHP Conference & Expo 2006
  • 23. Private Virtual Servers  Modeled after PHP hosting provided by ISPs  PHP developer requests virtual PHP server from enterprise IT  Server is hosted on IT infrastructure; developer uses web-based console and WebDAV to access  Includes database space and simplified access to enterprise services (code snippets, preconfigured client code, etc.) 23 New York PHP Conference & Expo 2006
  • 24. Benefits  Developer essentially the same experience as with a local LAMP stack gets enterprise-level backup, failover, security and support  IT gains ability to monitor and manage application distributed shared caching simplified migration path when situational applications become strategic 24 New York PHP Conference & Expo 2006
  • 25. QoS  Dynamically adjust number of instances of application Training Tracker Training in response to demand and Tracker administrative policy Training Tracker  Impact of application on enterprise services can be measured, monitored and SPEED SPEED LIMIT LIMIT controlled 20 20 Core  Access to application can enterprise SPEED be controlled and audited LIMIT app 70 Employee for regulatory or billing directory purposes 25 New York PHP Conference & Expo 2006
  • 26. Conclusion The combination of PHP and SOA has the potential to address the rapidly-expanding need for situational applications in the enterprise. With a few carefully crafted changes, PHP and enterprise IT can converge in a way that lets users capitalize the strengths of each. 26 New York PHP Conference & Expo 2006
  • 27. Further reading  PHP topics on developerWorks  http://www-128.ibm.com/developerworks/opensource/top-projects/php.html  SDO  http://www-128.ibm.com/developerworks/library/os-sdophp/  http://www-128.ibm.com/developerworks/opensource/library/os-php-sdo/  http://www.php.net/manual/en/ref.sdo.php  SCA  http://www-128.ibm.com/developerworks/library/specification/ws-sca/ (although we expect PHP SCA will be much simpler than the Java and C++ examples you see here) 27 New York PHP Conference & Expo 2006
  • 28. 28 New York PHP Conference & Expo 2006
  • 29. Thanks! If you have any questions or would like to get in touch with me, my email address is: burrm@us.ibm.com 29 New York PHP Conference & Expo 2006