33
© All rights reserved. Zend Technologies, Inc. Zend Server for IBM i Mike Pavlak Solution Consultant 1 Insert->Header & Footer

Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

  • Upload
    doliem

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server for IBM i

Mike Pavlak

Solution Consultant

1Insert->Header & Footer

Page 2: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Agenda

•Technical overview of Zend Server for IBM i

• Installation

•Administration

•Features

•Demo

2 Insert->Header & Footer

Page 3: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server 5 for IBM iwww.zend.com

Technical overview

Page 4: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

What Is Zend Server?

• Production quality PHP stack

�PHP, ZF, DB connectivity, debugging extension, and more

• Two Editions - Free “Community Edition”provided by IBM & Full commercial edition

�Both are production ready

• Application monitoring and diagnostics (integrated with Zend Studio)

• Multi-level performance enhancement capabilities

• Software updates and security hot fixes

• Easy and quick installation

• Zend Framework Integration

4 What is Zend Server

Page 5: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server for IBM i

•Next generation of PHP stack for IBM i

•Best of both Zend Core and Zend Platform

•Single Licensed Program Installation

•Two products

�Zend Server for IBM i Community Edition

• Available at no charge per IBM partnership

�Zend Server for IBM i

• Subscription available from Zend

• High value extra features

• Higher Support SLAs

5 Insert->Header & Footer

Page 6: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Why a new generation?

•Based on feedback of key areas for Improvement

• Improved basic PHP Performance

�30% to 600% depending on the application

•New capabilities

�Code Tracing – Faster problem resolution

�Job Queue – Performance and scalability

�Page Caching – Performance and Scalability

�Support for PHP 5.3

•Easier installation, administration & maintenance

6 Insert->Header & Footer

Page 7: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server for IBM iwww.zend.com

Installation

Page 8: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server Installation

•Current installation is beta

•Save File Only, Windows installer by GA

•Fast CGI built by IBM requires PTF’s

�Current group for 57nnDG1 – IBM HTTP Server for i5/OS

�http://www-912.ibm.com/s_dir/sline003.nsf/GroupPTFs?OpenView&view=GroupPTFs

�V5R4

• PASE – SI36004

• HTTP – SI36026

�i6.1

• PASE – SI36005

• HTTP – SI36027

8 Insert->Header & Footer

Page 9: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server Installation

•Optionally installs MySQL 5.n +

• Install side by side with Core/Platform

�Port 10088 (can be changed via IBM interface on port 2001)

�Migrate existing PHP code manually

�Test, test, test

�Flip the port and you are ready to go!

�See performance improvements first hand

9 Insert->Header & Footer

Page 10: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.10

Zend Server

Zend Server Under the Covers

HTTP:10088

Server(FastCGI)

IBM i

i/OS

DB2 UDB

PHP CGI

PHP filePASE

*PGM

CMD

ILE Apache:10088

• Default

configuration

FastCGI

Page 11: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server Administration

•New unified interface for all Zend controls

•Multi platform consistency in the interface

•Apache changes

�Single server (YAY!)

�PASE server eliminated

�IBM HTTP Server Powered by Apache

�PHP implemented using Fast CGI developed by IBM

�Restart button saves round trip to green screen!

11 Insert->Header & Footer

Page 12: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server Administration

12 Insert->Header & Footer

Page 13: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server 5 for IBM iwww.zend.com

Caching

Page 14: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Optimizer+

Eliminates what’s not needed

�Opcode cache

• Caches the PHP bytecode in RAM

• Significantly reduces disk access

�Opcode optimizer

• Optimizes certain code fragments to improve execution speed

Now part of the free Community packge

14 Insert->Header & Footer

Page 15: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Data Caching

Provides a set of API functions for caching data items

�DB query results, web service calls, complex or hard-to-get data

�Output elements

�Allows skipping slow PHP code chunks

�Shared memory and Disk storage backends

�Data could be grouped using namespaces

�APC user cache compatibility layer

�Zend Framework Zend_Cache_Backend adapters

15 Insert->Header & Footer

Page 16: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Page Caching

Don't execute a single line of PHP if you don't have to

�Caches entire HTTP response

�Configured from UI, no code changes required

�Live / cached decision is based on request or session parameters

�Variants can be created based on request or session parameters

16 Insert->Header & Footer

Page 17: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Page Caching

17 Insert->Header & Footer

Page 18: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server 5 for IBM iwww.zend.com

Monitoring & Code Tracing

Page 19: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Application Monitoring

Zend Server Monitor will watch your application for:

�PHP Errors (including warnings, notices, uncaught exceptions...)

�Failing functions (user-defined or internal)

�Failing DB queries

�Slow functions (user-defined or internal) or DB queries

�Slow request executions

�High memory consumption

�Errors reported by Zend Server components

When an issue is detected, Zend Server reports an event

19 Code Tracing

Page 20: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Monitoring Events

20 Insert->Header & Footer

Page 21: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Code Tracing

•Eliminates the need to reproduce problems

•Records live application execution when problems occur

•Activated through Zend Server monitoring rules or manually

•Works in a live production environment or in a test lab

•Cuts Root Cause Analysis Time by up to 50%

Root Cause Analysisreproduce problem - debug

Root Cause Analysisanalyze code trace

Problem resolution time

without Code Tracing

Problem resolution time

with Code Tracing

Fix

Fix

Page 22: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Code Tracing – Data Capture

•Reproducing an issue is not always possible

�Dependency on specific SESSION or database state

�Dependency on server load

�“Replaying” the request is risky or impossible

•Code Tracing captures the entire execution flow:

�Execution tree including function calls and included files

�Function arguments and return parameters

�Output and header generation

�Location of errors, exceptions and Zend Monitor events

�For each node, execution time and memory usage is measured

Page 23: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

DVD-Like Playback of Application Problems

•Opening a Trace File enables you to “playback” the request execution flow using two perspectives:

•A Tree perspective: Pinpoint root cause by viewing the sequence of function calls

�Highlights the critical path of function execution flow (duration)

�Pinpoints events leading up to an error

Page 24: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

DVD-Like Playback of Application Problems

•A Statistics perspective: displays traced data from a function perspective

�Execution time: aggregated and a break down of each function

invocation

�Memory consumption: aggregated

and a break down of each function

invocation

�Total number of calls

Page 25: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Code Tracing Supported Workflows

•Monitoring workflow:

�When a monitoring event is created, the associated trace data of

the specific request is captured

�Trace data is attached and associated to the monitoring event

•Manual tests/functional workflow:

�Manually through the GUI or from a browser by adding a

parameter to the request

•Production workflow

�Can be activated automatically in case of a Zend Monitoring

event, for example a PHP error, a slow execution or high memory

usage

Page 26: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server 5: Technical Overviewwww.zend.com

Job Queue

Page 27: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Job Queue allows you to...

•Put certain tasks into a separate execution queue

�Off-load to new process (or defer to a later time)

�Off-load to a different server

•Execute certain tasks at a specified time

�Distribute processing load to off-hours

•Execute certain tasks periodically

•While..

�Maximizing reuse of existing infrastructure & code

�Making sure nothing falls between the cracks

�Doing it all from a PHP API

27

Page 28: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Creating Jobs

•Jobs are created using the createHttpJob() method

•Pass parameters

�Simple ones, via query string $_GET

�Complex ones, as an associative array of key => value pairs

•Set job options

�Name, priority, schedule, etc.

�Create deferred or recurring jobs

•Or… create from the UI

28 Insert->Header & Footer

$queue = new ZendJobQueue(); $queue->createHttpJob(

'http://backend.local/jobs/somejob.php');

Page 29: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Job Queue Management

View job status and manage execution

29 JobQueue

Page 30: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Other Job Capabilities

� Managing priorities

� Job dependencies

� Querying for jobs

� Checking job status and queue statistics

� Suspending and resuming recurring jobs & queues

� Passing custom HTTP headers

� Failure handling and retry control

� Load management and balancing

Page 31: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Zend Server on IBM i – What’s different on i?

•Clustering not supported

�IBM i customers scale vertically

�Clustering helps Intel based solutions scale horizontally

•Server replicating

�Since we scale horizontally, this feature is not needed.

•Download Server

�Most IBM i applications are transaction based

�Little need for downloads, etc.

•Tell us your needs…

31 Insert->Header & Footer

Page 32: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.

Demo Agenda

•Monitoring

�My broken script

•Job Queue

�Submit PDF’s to batch

•Code Tracing

�My broken script again?

32 Insert->Header & Footer

Page 33: Zend Server for IBM istatic.zend.com/topics/zend-server-for-ibmi.pdf · Zend Server for IBM i Mike Pavlak ... DB query results, web service calls, complex or hard-to-get data

© All rights reserved. Zend Technologies, Inc.33 Insert->Header & Footer

Q&A