Mod_ooRexx Final presentation 2010-01-28

Maschek Robert ID: 895 27 11 Agenda

ƒ Introduction ƒ Apache 2 Software architecture – Basic concepts – Core objects – Reqqguest handling ƒ Mod_ooRexx – Testsystem – Live demonstration: Examples ƒ Conclusion ƒ Questions and Answers

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 2 Introduction – I – Focus “A beginner’s guide for installing and using ooREXX on the Apache webserver. ”

Focus on: • Apache webserver Architecture • Testsystem (Fedora 12; Windows 2008) • Mod_ooRexx installation • Basic examples

Not in focus: • Nuts and Bolts of Module programming • Apache Webserver configuration and administration

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 3 Introduction – II – Apache - a brief history

ƒ Base: NCSA httpd server ƒ April 1995: Version 0. 62 – Naming: 2 versions (“a patchy server”; “respect for the various Native American nations collectively referred to as Apache”) ƒ December 1995: Version 1.0 – Redesign of the codebase; adding some features ƒ February 1998: Plans for Version 2.0 summarized – The same code for every platform ƒ April 2002: Version 2.0.35 – First general ava ila ble vers ion o f Apac he 2

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 4 Agenda

ƒ Introduction ƒ Apache 2 Software architecture – Basic concepts – Core objects – Reqqguest handling ƒ Mod_ooRexx – Testsystem – Live demonstration: Examples ƒ Conclusion ƒ Questions and Answers

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 5 Apache 2 architecture – I – Overview

ƒ relatively small core Module Module ƒ most important Module parts Apache HTTPD Module – Apache Portable MPM Runtime (APR) – Multi-Processing APR Module (MPM) ƒ MdlModules – compiled statically (Kew 2007, p. 22) into the server – Loaded dynamically at runtime

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 6 Apache 2 architecture – II – APR

ƒ Middleware between Operating System and the Apac he HTTPD ƒ Standard application programming interface (API) ƒ Consistent interface to underlying platform- specific implementations ƒ maintained by the Apache Software Foundation ƒ APR is not only used for the webserver − Tomcat, Subversion, …

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 7 Apache 2 architecture – III – MPM

ƒ Optimize Apache for the underlying operating systthtiitem so that incoming request s are mapped onto an execution primitive. ƒ Thread or process ƒ Supports three different kinds of MPM – MPM module: prefork (Unix); beos (BeOS) – MPM module: mpm_netware (Netware); mpm_winnt (f)(Microsoft) – Hybrid mode: worker, event and mpmt_OS2 (OS2)

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 8 Apache 2 architecture – IV – Pools

ƒ Grouped collection of resources – file handles,,y,pg, memory, child programs, … ƒ Hierarchically structured – Pool Æ Subpool Æ Subsubpool and so on ƒ During the startup phase Apache creates a pool from which all others are derived. – Configuration information is held in this pool ƒ The next level of pools is created for each connection Apache receives and is destroyed when the connection ends – A connection can span several requests and a new pool is created (and destroyed) for each request.

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 9 Apache 2 architecture – IV – Operation

ƒ Startup phase – Reads and verifies the configg()uration file(s) httpd.conf – Loading modules, initialize system resources such as log- files, shared memory segment – Open network connections – single-process, single-thread program and has full system priilivileges – Before entering the operational phase Apache relinquishes its system privileges. ƒ Operational phase – child processes or threads will accept external connections

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 10 Apache 2 architecture – V – Core objects

Client Server

IP-Network

Client request_rec Server http:// .... 2: http-request Application Application conn_rec server_ rec (Browser) 1TCP1: TCP-connection (Server)

TCP-Port: 80 process_rec Operating System Operating System

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 11 Apache 2 architecture – V – Core objects

ƒ process_rec – more a pppgyart of the operating system – main goal is the handling of pools ƒ server_rec – created during the startup phase – defines a logical webserver (more for virtual hosts) ƒ conn_rec – created w hen a client connects to the w ebserv er ƒ request_rec – created whenever a request is accepted – stores and processes all the relevant data for all stages of the entire request handling process

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 12 Apache 2 architecture – VI – Request handling

For a more detailed view: New concept: Filter chain • See the paper • The Apache Modeling Project

Webpage creation

basic operation ofbf a webserver

much cleaner and more efficient data processing

checking user authentication, (Kew 2007, p. 47) Logfile entries URI mapping … created

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 13 Apache 2 architecture – VII – Hooks

ƒ A point at which a module can request to be called ƒ Interaction between modules and the webserver ƒ Functions can return either "declined" or "ok" or an error ƒ Offers 10 hooks in total for modules to step in Examples: ƒ translate_name: – Maps the request URL to the filesystem. ƒ access_ checker: – Apache checks whether access to the requested resource is permitted according to the server configuration (httpd.conf)

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 14 Agenda

ƒ Introduction ƒ Apache 2 Software architecture – Basic concepts – Core objects – Reqqguest handling ƒ Mod_ooRexx – Testsystem – Live demonstration: Examples ƒ Conclusion ƒ Questions and Answers

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 15 Mod_ooRexx – I – A brief history

ƒ Mid 1990s: IBM offered Object – origgyinally for the OS/2 and OS/390 – Based on REXX (REstructured eXtended eXecutor) ƒ 2004: Object REXX was transferred to the Rexx Language Association (RexxLA) – became an open-source ppjroject named O pen Ob ject REXX ƒ REXX and ooREXX are compatible ƒ Mod_ Rexx – Include Rexx into the Apache webserver ƒ Mod_ooRexx – rewritten to improve the performance and to support the latest version (4 .0) of ooREXX

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 16 Mod_ooRexx – II – Testsystem

mod_ooREXX mod_ooREXX Still crashes due to a bug in ooRexx 2202.2.0 2202.2.0

4.0 4.0

2.2.14 2.2.14

VMWare Workstation Version 7

Windows XP professional

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 17 Mod_ooRexx – II – Examples

Running on

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 18 Agenda

ƒ Introduction ƒ Apache 2 Software architecture – Basic concepts – Core objects – Reqqguest handling ƒ Mod_ooRexx – Testsystem – Live demonstration: Examples ƒ Conclusion ƒ Questions and Answers

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 19 Mod_ooRexx – I – Conclusion

ƒ Powerful package

ƒ Limitations – LkfLack of resources avail ilblable resu ltitilts in timeconsum ing implementations – The existing bug in the Windows version

ƒ Lot of space for academic work – Examples of using all the Hooks – BSF4Rexx and mod_ ooRexx in a web environment

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 20 Questions and Answers

Agenda Introduction SW Architecture Mod_ooRexx Conclusion Q&A 21 22