SlideShare a Scribd company logo
1 of 36
Download to read offline
Mazda Advanced web
services & PHP
Strengths & Flaws
Olivier Lépine – CEO Quatrain Technologies
2
About Myself
Olivier Lépine (not Lãˆpine nor any other charset mess)
Graduated in Communication in 1994
Founded Quatrain in 1997 as a Web Agency
Started to play with PHP and MySQL in 1998
Developped my first application in 1999 for the City of Marseille
(still in production, a bit rusty though)
I love Music, Art, Flying, Series & Movies, Cooking, etc.
3
What are we talking about ?
The what, the when and the why
4
The SIV Project
Presentation and challenges
5
SIV project in a nutshell (1/2)
SIV stands for “Système d'Immatriculation des Véhicules”
(Vehicles Registering System : like US DMV)
Nationwide system managed by the Ministry of the Interior
Web Services based on SOAP 1.2 specification
More than 30 different possible actions
Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
6
SIV project in a nutshell (2/2)
250 XSD definition files with dependencies
Messages can be either synchronous (immediate response) or
asynchronous (delayed response) depending on action type
Messages can contain attachments in MIME format
Communications are made via HTTPS with SSL client certificate
authentication (client IP address is also validated)
SAML (postponed to 2010)
7
SIV project workflow
The Mazda Implementation
Customer wants
to buy a car
Dealer enters
data & requests
registering
Ministry of
the Interior
Government
Printing Office
Controls are performed
Request is sent to PHP
Request is sent by PHP
Over the internet with HTTPS
Ministry transmits
Data to print doc
Car registration document
is directly sent to customer
Response is sent, containing
a PDF document if successful
8
Project Stakeholders
9
France Automobile Industry
87 Billion € Turnover (2006) – roughly $130 Billion
More than 3,000,000 new vehicles registrations per year
35 different makes available in France
Chosen languages for SIV interfaces development :
➔
Java
➔ packaged app
➔ custom development
➔
.Net
➔
PHP
10
Mazda Automobiles France
258 M € Turnover (2008) – roughly $385M
16,000 new vehicles registrations per year
160 car dealers
Information System
ERP, CRM, DMS on IBM i Servers (525 w/ OS/400 V5R4)
11
SIV Specifications
And how to understand them
12
A definition of SOAP (1/3)
W3C states :
“SOAP is a lightweight protocol for exchange of information in a
decentralized, distributed environment. It is an XML based protocol that
consists of three parts: an envelope that defines a framework for
describing what is in a message and how to process it, a set of encoding
rules for expressing instances of application-defined datatypes, and a
convention for representing remote procedure calls and responses. SOAP
can potentially be used in combination with a variety of other protocols;
however, the only bindings defined in this document describe how to use
SOAP in combination with HTTP and HTTP Extension Framework.”
Source : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
13
A definition of SOAP (2/3)
Wikipedia states :
“SOAP is a protocol specification for exchanging structured information
[...] in computer networks. It relies on Extensible Markup Language (XML)
as its message format, and usually relies on other Application Layer
protocols (most notably Remote Procedure Call (RPC) and HTTP) for
message negotiation and transmission.”
… and adds :
“Although SOAP is an open standard, not all languages offer appropriate
support. Java, Delphi, .NET and Flex offer excellent SOAP integration
and/or IDE support. Python and PHP support is much weaker”
Source : http://en.wikipedia.org/wiki/SOAP
14
A definition of SOAP (3/3)
“Messages composed of an XML-formatted array of structured
data exchanged in a client/server mode with HTTP”
15
SOAP With Attachments
It is not that complicated, but it's really ugly
------=_Part_a0342cd4096cdc8773a622
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <456F6BA913B27CAA3301C0B9363B202A>
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:ns="http://siv.mi.fr/DefinitionsServices/2007-06"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><depot_notif_immat_sur_vehicule_neuf_marque
xmlns="http://siv.mi.fr/DefinitionsServices/2007-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://siv.mi.fr/DefinitionsServices/2007-06
conf/siv/xsd/ImmatSivService/asynNotifImmatSurVehiculeNeufMarque/onBody/brp_asynNotifImmatSurVehiculeNeufMarque_Dep.x
sd">[...]<xmlMessageFichier href="cid:0621F2E74AFB4B486F0C62D77E9FAD43" xsi:type="ns1:octet-stream"
xmlns="http://siv.mi.fr/DefinitionsService/2007-06" xmlns:ns1="http://xml.apache.org/xml-
soap"/></soapenv:Body></soapenv:Envelope>
------=_Part_a0342cd4096cdc8773a622
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Id: <0621F2E74AFB4B486F0C62D77E9FAD43>
[...]
------=_Part_a0342cd4096cdc8773a622--
16
The Application
Architecture, Integration, etc.
17
Application Definition
An interface between Mazda Registering Application and the
Ministry of the Interior Web Services
No GUI, juste a front controller called from CLI
Capable of calling SOAP WS and handling attachments
Capable of fetching data from db2 and update some of them
Capable of calling RPG programs
Capable of handling SSL client certificate
Capable of working through a proxy
18
Application principles (2/2)
✔ Best Practices
✔ Abstractize & Extend
✔ Pluggable at all ends (all components use adapters)
✔ Design Patterns
✔
Factory
✔ Singleton
✔ Adapter
✔
Dependency Injection
19
Application principles (1/2)
✔ Based on Zend Products
✔ Zend Core for i5/OS
✔ Use i5 Toolkit Functions (i5_*)
✔ Zend Framework
✔ Zend_Db, Zend_Db_Select
✔ Zend_Config
✔ Zend_Http_Client
✔ etc.
20
Application Architecture
Front Controller :
➔
Reads parameters from command line
➔
Instanciates and injects all needed objects
➔
Triggers Action object execute() method
➔
Handles exceptions
CLI Front Controller
Action Object
Backend
Object
Message
Object
Transport
Object
21
How the front controller works (1/2)
➔
Gets parameters from command line (id, action, transport)
➔ Instanciates all needed objects
➔ Backend Adapter (Mazda adapter)
➔ Message Adapter (DomDocument adapter)
➔ Transport Adapter (Soap or Zhc Adapters)
➔ Action Adapter selected from context :
➔
Synchronous
➔ Asynchronous call (demand)
➔ Asynchronous callback (response)
➔ Inject all objects in Action object
22
How the front controller works (2/2)
➔
Triggers Action object prepare() then execute() methods
➔ Data is acquired from backend
➔ Message is composed, building sections recursively
➔
Message is validated against WSDL & XSD Definitions
➔
Message is injected in Transport and sent
➔ Response is parsed and data sent back to Backend
23
Available options for Transport
High-Level solutions (SOAP)
✔
WSO2 Framework (not available for IBM i)
✔
PHP Built-in SOAP Client
✔ NuSoap
Low-Level solutions (HTTP)
✔
Curl
✔
Zend Http Client
24
SOAP With Attachments
Some headers sent before data are very important :
POST /axis/services/ImmatSivService HTTP/1.1
Host: siv-vabf-part.interieur.gouv.fr
Accept-encoding: gzip, deflate
SOAPAction: "ImmatSivService:depReqNotifImmatSurVehiculeNeufMarque"
Accept: application/soap+xml, multipart/related, text/*
Content-Type: multipart/related; type="text/xml"; start="<456F6BA913B27CAA3301C0B9363B202A>";
boundary="----=_Part_a0342cd4096cdc8773a622"
Content-length: 2860
You need to keep full control over them
25
Selected components for Transport
High-Level solutions
✔ WSO2 Framework (not available for IBM i)
✔
PHP Built-in SOAP Client (using __doRequest() method)
✔
NuSoap
Low-Level solutions (HTTP Clients)
✔
Curl : lacking controls of important headers
✔
Zend Http Client : just the level of control you need
26
Even the Java guys were in Hell
Translated excerpts of message from Java developers to Ministry developers :
“We are using JAX-WS 2.1.1 which indeed doesn't generate a finale CRLF after
the last boundary. We have no option to simply add one CRLF at the very end of
the framework flow.”
[…] To try and solve this problem, we will try to take a newer version of the
framework (JAX-WS 2.1.5) to see if we can find more available options to
generate a conformant flow for your framework.
If it doesn't work, we will try to patch the framework source.
Ultimately, we will recode all the whole frontend part with another framework !
27
Conclusions (Part I)
28
The Good Part
Zend Framework
Dom extension (as a XML document builder & validator)
SimpleXml extension (as a fast XML document decoder)
Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
29
The not-so-good Part
Various SOAP specifications and implementations. Sometimes
shaky.
Problems in SOAP ext that should have been addressed long
before (WSDL parsing)
Lack of native support for WS-* extensions and attachments
Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
30
Using PHP for SOAP Pros & Cons
Pros
✔
Versatility : Many possible ways to call WS with PHP keeping
compliance with W3C recommandations
✔ Hacking : if the current components don't fit you or are buggy,
write your own in (almost) no time
✔
PHP : Runs on every server, even very small, with no hidden costs
Cons
✔ Support : so far, feedback from community on advanced WS is rare
✔ Can' t see any more but I am probably biased
31
Conclusions (Part II)
32
SIV project as Today
Started 15 April 2009 (phase 1 – new cars only)
1,984,750 registered vehicles since then,
16,487 registered vehicles in one day (October 8th
)
Phase 2 (used cars plates upgrade) started on 15 October.
Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
33
Mazda Opinion
Simultaneous developments in all Car Makers IT at the same time
for this project made it possible to compare cost.
“Compared to similar developments made with Java, .Net and
Websphere, PHP development cost was 30 to 70% cheaper.”
Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
34
The Unexpected Reward
On October 15, Mazda got the very first plate : AA-001-AA
35
Questions ?
Further questions :
Email : olivier@quatrain.com
Skype : crapougnax
Twitter : twitter.com/crapougnax
36
Thank you !

More Related Content

What's hot

Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Peter R. Egli
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCFBarry Dorrans
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Mehul Boricha
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overviewArbind Tiwari
 
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital ApplicationsHHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applicationsmatthew1001
 
Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesIMC Institute
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewJorgen Thelin
 
WebService-Java
WebService-JavaWebService-Java
WebService-Javahalwal
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCFybbest
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)ipower softwares
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPIMC Institute
 
Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Saltmarch Media
 
Ruby Meets Cocoa
Ruby Meets CocoaRuby Meets Cocoa
Ruby Meets CocoaRobbert
 

What's hot (20)

Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
 
WCF for begineers
WCF  for begineersWCF  for begineers
WCF for begineers
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
 
Web Service
Web ServiceWeb Service
Web Service
 
Wcf
WcfWcf
Wcf
 
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital ApplicationsHHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
 
Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web Services
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 
WCF And ASMX Web Services
WCF And ASMX Web ServicesWCF And ASMX Web Services
WCF And ASMX Web Services
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
WCF
WCFWCF
WCF
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCF
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAP
 
Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0
 
Ruby Meets Cocoa
Ruby Meets CocoaRuby Meets Cocoa
Ruby Meets Cocoa
 

Similar to Mazda siv - web services

Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonAdnan Masood
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web servicesNeil Ghosh
 
Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsSrdjan Strbanovic
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginnersEnoch Joshua
 
TOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEMTOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEMvishnuRajan20
 
Toll management system (1) (1)
Toll management system (1) (1)Toll management system (1) (1)
Toll management system (1) (1)vishnuRajan20
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTDr. Awase Khirni Syed
 
Mainframe Architecture & Product Overview
Mainframe Architecture & Product OverviewMainframe Architecture & Product Overview
Mainframe Architecture & Product Overviewabhi1112
 
Why we choose Symfony2
Why we choose Symfony2Why we choose Symfony2
Why we choose Symfony2Merixstudio
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Web Services
Web ServicesWeb Services
Web ServicesF K
 
Vorlesung "Web-Technologies"
Vorlesung "Web-Technologies" Vorlesung "Web-Technologies"
Vorlesung "Web-Technologies" Wolfgang Wiese
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
Java Networking
Java NetworkingJava Networking
Java NetworkingSunil OS
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los AngelesVMware Tanzu
 

Similar to Mazda siv - web services (20)

Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
TOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEMTOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEM
 
Toll management system (1) (1)
Toll management system (1) (1)Toll management system (1) (1)
Toll management system (1) (1)
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
Mainframe Architecture & Product Overview
Mainframe Architecture & Product OverviewMainframe Architecture & Product Overview
Mainframe Architecture & Product Overview
 
Why we choose Symfony2
Why we choose Symfony2Why we choose Symfony2
Why we choose Symfony2
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Detailed-Resume-Rebai-Hamida
Detailed-Resume-Rebai-HamidaDetailed-Resume-Rebai-Hamida
Detailed-Resume-Rebai-Hamida
 
Web Services
Web ServicesWeb Services
Web Services
 
Vorlesung "Web-Technologies"
Vorlesung "Web-Technologies" Vorlesung "Web-Technologies"
Vorlesung "Web-Technologies"
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
sveltekit-en.pdf
sveltekit-en.pdfsveltekit-en.pdf
sveltekit-en.pdf
 
Web assembly with PWA
Web assembly with PWA Web assembly with PWA
Web assembly with PWA
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
Simplify Networking for Containers
Simplify Networking for ContainersSimplify Networking for Containers
Simplify Networking for Containers
 

Recently uploaded

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 

Recently uploaded (20)

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 

Mazda siv - web services

  • 1. Mazda Advanced web services & PHP Strengths & Flaws Olivier Lépine – CEO Quatrain Technologies
  • 2. 2 About Myself Olivier Lépine (not Lãˆpine nor any other charset mess) Graduated in Communication in 1994 Founded Quatrain in 1997 as a Web Agency Started to play with PHP and MySQL in 1998 Developped my first application in 1999 for the City of Marseille (still in production, a bit rusty though) I love Music, Art, Flying, Series & Movies, Cooking, etc.
  • 3. 3 What are we talking about ? The what, the when and the why
  • 5. 5 SIV project in a nutshell (1/2) SIV stands for “Système d'Immatriculation des Véhicules” (Vehicles Registering System : like US DMV) Nationwide system managed by the Ministry of the Interior Web Services based on SOAP 1.2 specification More than 30 different possible actions Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
  • 6. 6 SIV project in a nutshell (2/2) 250 XSD definition files with dependencies Messages can be either synchronous (immediate response) or asynchronous (delayed response) depending on action type Messages can contain attachments in MIME format Communications are made via HTTPS with SSL client certificate authentication (client IP address is also validated) SAML (postponed to 2010)
  • 7. 7 SIV project workflow The Mazda Implementation Customer wants to buy a car Dealer enters data & requests registering Ministry of the Interior Government Printing Office Controls are performed Request is sent to PHP Request is sent by PHP Over the internet with HTTPS Ministry transmits Data to print doc Car registration document is directly sent to customer Response is sent, containing a PDF document if successful
  • 9. 9 France Automobile Industry 87 Billion € Turnover (2006) – roughly $130 Billion More than 3,000,000 new vehicles registrations per year 35 different makes available in France Chosen languages for SIV interfaces development : ➔ Java ➔ packaged app ➔ custom development ➔ .Net ➔ PHP
  • 10. 10 Mazda Automobiles France 258 M € Turnover (2008) – roughly $385M 16,000 new vehicles registrations per year 160 car dealers Information System ERP, CRM, DMS on IBM i Servers (525 w/ OS/400 V5R4)
  • 11. 11 SIV Specifications And how to understand them
  • 12. 12 A definition of SOAP (1/3) W3C states : “SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses. SOAP can potentially be used in combination with a variety of other protocols; however, the only bindings defined in this document describe how to use SOAP in combination with HTTP and HTTP Extension Framework.” Source : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
  • 13. 13 A definition of SOAP (2/3) Wikipedia states : “SOAP is a protocol specification for exchanging structured information [...] in computer networks. It relies on Extensible Markup Language (XML) as its message format, and usually relies on other Application Layer protocols (most notably Remote Procedure Call (RPC) and HTTP) for message negotiation and transmission.” … and adds : “Although SOAP is an open standard, not all languages offer appropriate support. Java, Delphi, .NET and Flex offer excellent SOAP integration and/or IDE support. Python and PHP support is much weaker” Source : http://en.wikipedia.org/wiki/SOAP
  • 14. 14 A definition of SOAP (3/3) “Messages composed of an XML-formatted array of structured data exchanged in a client/server mode with HTTP”
  • 15. 15 SOAP With Attachments It is not that complicated, but it's really ugly ------=_Part_a0342cd4096cdc8773a622 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-Id: <456F6BA913B27CAA3301C0B9363B202A> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:ns="http://siv.mi.fr/DefinitionsServices/2007-06" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><depot_notif_immat_sur_vehicule_neuf_marque xmlns="http://siv.mi.fr/DefinitionsServices/2007-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://siv.mi.fr/DefinitionsServices/2007-06 conf/siv/xsd/ImmatSivService/asynNotifImmatSurVehiculeNeufMarque/onBody/brp_asynNotifImmatSurVehiculeNeufMarque_Dep.x sd">[...]<xmlMessageFichier href="cid:0621F2E74AFB4B486F0C62D77E9FAD43" xsi:type="ns1:octet-stream" xmlns="http://siv.mi.fr/DefinitionsService/2007-06" xmlns:ns1="http://xml.apache.org/xml- soap"/></soapenv:Body></soapenv:Envelope> ------=_Part_a0342cd4096cdc8773a622 Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-Id: <0621F2E74AFB4B486F0C62D77E9FAD43> [...] ------=_Part_a0342cd4096cdc8773a622--
  • 17. 17 Application Definition An interface between Mazda Registering Application and the Ministry of the Interior Web Services No GUI, juste a front controller called from CLI Capable of calling SOAP WS and handling attachments Capable of fetching data from db2 and update some of them Capable of calling RPG programs Capable of handling SSL client certificate Capable of working through a proxy
  • 18. 18 Application principles (2/2) ✔ Best Practices ✔ Abstractize & Extend ✔ Pluggable at all ends (all components use adapters) ✔ Design Patterns ✔ Factory ✔ Singleton ✔ Adapter ✔ Dependency Injection
  • 19. 19 Application principles (1/2) ✔ Based on Zend Products ✔ Zend Core for i5/OS ✔ Use i5 Toolkit Functions (i5_*) ✔ Zend Framework ✔ Zend_Db, Zend_Db_Select ✔ Zend_Config ✔ Zend_Http_Client ✔ etc.
  • 20. 20 Application Architecture Front Controller : ➔ Reads parameters from command line ➔ Instanciates and injects all needed objects ➔ Triggers Action object execute() method ➔ Handles exceptions CLI Front Controller Action Object Backend Object Message Object Transport Object
  • 21. 21 How the front controller works (1/2) ➔ Gets parameters from command line (id, action, transport) ➔ Instanciates all needed objects ➔ Backend Adapter (Mazda adapter) ➔ Message Adapter (DomDocument adapter) ➔ Transport Adapter (Soap or Zhc Adapters) ➔ Action Adapter selected from context : ➔ Synchronous ➔ Asynchronous call (demand) ➔ Asynchronous callback (response) ➔ Inject all objects in Action object
  • 22. 22 How the front controller works (2/2) ➔ Triggers Action object prepare() then execute() methods ➔ Data is acquired from backend ➔ Message is composed, building sections recursively ➔ Message is validated against WSDL & XSD Definitions ➔ Message is injected in Transport and sent ➔ Response is parsed and data sent back to Backend
  • 23. 23 Available options for Transport High-Level solutions (SOAP) ✔ WSO2 Framework (not available for IBM i) ✔ PHP Built-in SOAP Client ✔ NuSoap Low-Level solutions (HTTP) ✔ Curl ✔ Zend Http Client
  • 24. 24 SOAP With Attachments Some headers sent before data are very important : POST /axis/services/ImmatSivService HTTP/1.1 Host: siv-vabf-part.interieur.gouv.fr Accept-encoding: gzip, deflate SOAPAction: "ImmatSivService:depReqNotifImmatSurVehiculeNeufMarque" Accept: application/soap+xml, multipart/related, text/* Content-Type: multipart/related; type="text/xml"; start="<456F6BA913B27CAA3301C0B9363B202A>"; boundary="----=_Part_a0342cd4096cdc8773a622" Content-length: 2860 You need to keep full control over them
  • 25. 25 Selected components for Transport High-Level solutions ✔ WSO2 Framework (not available for IBM i) ✔ PHP Built-in SOAP Client (using __doRequest() method) ✔ NuSoap Low-Level solutions (HTTP Clients) ✔ Curl : lacking controls of important headers ✔ Zend Http Client : just the level of control you need
  • 26. 26 Even the Java guys were in Hell Translated excerpts of message from Java developers to Ministry developers : “We are using JAX-WS 2.1.1 which indeed doesn't generate a finale CRLF after the last boundary. We have no option to simply add one CRLF at the very end of the framework flow.” […] To try and solve this problem, we will try to take a newer version of the framework (JAX-WS 2.1.5) to see if we can find more available options to generate a conformant flow for your framework. If it doesn't work, we will try to patch the framework source. Ultimately, we will recode all the whole frontend part with another framework !
  • 28. 28 The Good Part Zend Framework Dom extension (as a XML document builder & validator) SimpleXml extension (as a fast XML document decoder) Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
  • 29. 29 The not-so-good Part Various SOAP specifications and implementations. Sometimes shaky. Problems in SOAP ext that should have been addressed long before (WSDL parsing) Lack of native support for WS-* extensions and attachments Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
  • 30. 30 Using PHP for SOAP Pros & Cons Pros ✔ Versatility : Many possible ways to call WS with PHP keeping compliance with W3C recommandations ✔ Hacking : if the current components don't fit you or are buggy, write your own in (almost) no time ✔ PHP : Runs on every server, even very small, with no hidden costs Cons ✔ Support : so far, feedback from community on advanced WS is rare ✔ Can' t see any more but I am probably biased
  • 32. 32 SIV project as Today Started 15 April 2009 (phase 1 – new cars only) 1,984,750 registered vehicles since then, 16,487 registered vehicles in one day (October 8th ) Phase 2 (used cars plates upgrade) started on 15 October. Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
  • 33. 33 Mazda Opinion Simultaneous developments in all Car Makers IT at the same time for this project made it possible to compare cost. “Compared to similar developments made with Java, .Net and Websphere, PHP development cost was 30 to 70% cheaper.” Source : http://www.ants.interieur.gouv.fr/siv/-siv-.html
  • 34. 34 The Unexpected Reward On October 15, Mazda got the very first plate : AA-001-AA
  • 35. 35 Questions ? Further questions : Email : olivier@quatrain.com Skype : crapougnax Twitter : twitter.com/crapougnax