Sie sind auf Seite 1von 7

Complete Pooling Best

Practices

Complete Pooling Best Practices

Index
Introduction ......................................................................................................................... 3
The Database...................................................................................................................... 4
Session number ........................................................................................................... 4
Sequence number ........................................................................................................ 4
Last query date ............................................................................................................ 4
Query in progress......................................................................................................... 4
Active context............................................................................................................... 4
The processes..................................................................................................................... 5
The maintenance process ............................................................................................ 5
The query process........................................................................................................ 6
The new session process ............................................................................................. 7

Document control

2006 Amadeus IT Group SA

Security level
Company

Amadeus IT Group SA

Department

Department Name

Author

JF Liotier

Reviewed by
Approved by

Guillaume Cardon
Guillaume Cardon

Date
Date

Version

Date

Comment

1.0

07/02/2008

JF Liotier

1.1

03/02/2009

JF Liotier

API Services
03 February 2009
Page N 2

Change

03/02/2009
03/02/2009
By

Complete Pooling Best Practices

Introduction

2006 Amadeus IT Group SA

This document describes a quick view of how to manage a pool of sessions for a part of any
webservice application. These best practices can be used for standalone (with or without
context) services.
There are 2 elements for the pooling: the database and the processes.

API Services
03 February 2009
Page N 3

Complete Pooling Best Practices

The Database
A database should be created containing 5 columns (Session number, Sequence number,
Last query date, Query in progress and Active context).
Session number

Sequence number

Last Query Date

Query in progress

Active context

B23F654
A654R45

5
3

12:00:00
12:04:23

False
True

Yes
No

Session number
This element contains the session number returned by Amadeus. It is the first part of the
session ID before the |.

Sequence number
This element contains the sequence number returned by Amadeus. It is the second part of
the session ID after the |.

Last query date


This element contains the exact date of the last query sent to the system.

Query in progress
This element is a boolean. It is set to False when a session is created, when the last query
date passed RTO (Response Time Out) or a reply to the previous query was received. It is
set to True once a query was sent to Amadeus.

Active context

2006 Amadeus IT Group SA

This element is also a boolean.It is set to False when the session is created. It is set to
True when a query creates an environment which could be used for follow up queries. It is
set back to False when the previous query closes the environment.

API Services
03 February 2009
Page N 4

Complete Pooling Best Practices

The processes
Three different processes should access this database: the maintenance process and the
query process and the new session process.

The maintenance process


The prupose of this process is to clean the database from too old sessions. It should run
every X seconds (we recommend 30).

Select first session

Select next session

No

Last query date


older than RTO*

Yes

Query in progress =
No
No

Last query date


older than ITO*

Yes

Delete session
Send sign out query

2006 Amadeus IT Group SA

*ITO: Inactivity Time Out, X minutes (we recommend 14, 15 is the maximum)

API Services
03 February 2009
Page N 5

Complete Pooling Best Practices

The query process

2006 Amadeus IT Group SA

The query process starts when a customer requests a standalone service (with or without
context). An available session is chosen or created, the query is sent and the database is
updated.
This schema is optimized for more non context queries, invert the order of the 2 checks of
the session selection in the opposite case.

*RTO: Response Time Out, X seconds (depends on the service)


API Services
03 February 2009
Page N 6

Complete Pooling Best Practices

The new session process


This process tries to create a session with a miximum of 5 retries. If it succeeds, session
information are stored in the database, else an error message is produced.

Count = 1

Count + 1

Send sign in query


No

Response received

No

Count =5

Yes

set Session number


Sequence number = 1
set last query date
Query in progress =
False
Active context = False

Error

2006 Amadeus IT Group SA

Yes

API Services
03 February 2009
Page N 7