Está en la página 1de 12

CopyrlghL l-SoluLlons A8, Sweden.

ConsulLlng and Lralnlng wlLhln l/Sl/lMS


L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se

8y. ll-5olotloos A8, 2008

Intiouuction to INS application
Bevelopment & Integiation

White papei
AppllcaLlon servers execuLe and hosL servlces wlLhln lMS (l MulLlmedla
SubsysLem). ln order Lo lnLegraLe and develop appllcaLlon servers for lMS,
Lhere are some conslderaLlons LhaL need Lo be Laken lnLo accounL, llke Lhe
Lhree maln lnLerfaces Lowards lMS: Lhe Sh, Sl and lsc lnLerfaces. uependlng on
Lhe Lype of servlce LhaL Lhe appllcaLlon server ls hosLlng, lL may run ln Lwo
dlfferenL modes: Sl uA (user agenL) or 828uA (back-Lo-back user agenL). 1he
appllcaLlon server may be locaLed lnslde Lhe home neLwork or ln a Lhlrd-parLy
neLwork.
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
2
IMS Core functions

I|gure 1 - 1he IMS core funct|ons
1he maln funcLlons ln lMS conslsL of Lhe -CSCl, l-CSCl and S-CSCl. A CSCl (Call Sesslon ConLrol
luncLlon) processes Lhe slgnalllng ln Lhe lMS neLwork.
-CSCI (roxy Call Sesslon ConLrol luncLlon) ls Lhe tetmlools enLrance Lo Lhe lMS neLwork. lL may be
locaLed ln Lhe home neLwork or ln Lhe vlslLed neLwork ln case of roamlng. 1he Lermlnal wlll dlscover
Lhe -CSCl wlLh elLher uPC or u conLexL acLlvaLlon (C8S) or have a preconflgured -CSCl
address. 1he -CSCl wlll noL change durlng Lhe llfeLlme of a reglsLraLlon.
I-CSCI (lnLerrogaLlng Call Sesslon Call ConLrol luncLlon) ls placed aL Lhe edge of an lMS domaln. 1he
l-CSCl ls Lhe polnL of enLry for (lncomlng) calls enLerlng Lhe neLwork from anoLher lMS domaln, and
lLs address ls Lhe one placed ln Lhe publlc unS. 1he l-CSCl uses Lhe ulAML1L8 based Cx lnLerface
(noL shown ln Lhe flgure) Lo communlcaLe wlLh Lhe PSS.
S-CSCI (Servlng Call Sesslon ConLrol luncLlon) ls Lhe maln funcLlon ln lMS. lL auLhorlzes Lhe user
upon reglsLraLlon and wlll always be ln Lhe home neLwork for any parLlcular user. lL uses Lhe Cx
lnLerface Lo communlcaLe wlLh Lhe PSS and ulAML1L8 ls Lhe proLocol used. 1he S-CSCl
auLhenLlcaLes Lhe user and downloads (from Lhe PSS) a user prof||e whlch lncludes lnformaLlon
abouL dlfferenL appllcaLlon servers used for Lhe parLlcular user. 1hls ls ln facL one of lLs prlmary
funcLlons. 1he S-CSCl also enforces Lhe pollcy of Lhe neLwork operaLor, l.e. lL keeps Lrack of whlch
Lypes of sesslons LhaL a user ls auLhorlzed Lo lnlLlaLe.
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
3
nSS (Pome Subscrlber server) ls a cenLral reposlLory of daLa relaLed Lo Lhe subscrlbers ln Lhe sysLem.
PSS ls Lhe successor of Lhe PL8, and lL also lncorporaLes Lhe AuC, as lL holds Lhe shared secreLs used
for auLhenLlcaLlng users. lnformaLlon lncluded ln Lhe PSS ls:
ubllc ld
rlvaLe ld
Servlce roflle
lnlLlal fllLer crlLerla
SecurlLy lnformaLlon
Asslgned S-CSCl

Slmple cull flow
Caller
P-CSCF S-CSCF I-CSCF
Callee HSS S-CSCF P-CSCF
Cx.Query
INVITE
INVITE
INVITE
INVITE
INVITE
Originating trigger evaluation
Terminating trigger evaluation
INVITE
ACK
ACK
ACK
ACK
ACK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing
Caller
P-CSCF S-CSCF I-CSCF
Callee HSS S-CSCF P-CSCF
Cx.Query
INVITE
INVITE
INVITE
INVITE
INVITE
Originating trigger evaluation
Terminating trigger evaluation
INVITE
ACK
ACK
ACK
ACK
ACK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing
Caller
P-CSCF S-CSCF I-CSCF
Callee HSS S-CSCF P-CSCF
Caller Caller
P-CSCF P-CSCF S-CSCF S-CSCF I-CSCF I-CSCF
Callee Callee HSS HSS HSS S-CSCF S-CSCF P-CSCF P-CSCF
Cx.Query Cx.Query
INVITE INVITE
INVITE INVITE
INVITE INVITE
INVITE INVITE
INVITE INVITE
Originating trigger evaluation
Terminating trigger evaluation
INVITE INVITE
ACK
ACK
ACK
ACK
ACK
ACK
ACK
ACK
ACK
ACK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
200 OK
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing
180 Ringing 180 Ringing
180 Ringing
180 Ringing 180 Ringing
180 Ringing 180 Ringing
180 Ringing 180 Ringing
180 Ringing

I|gure 2 - S|mp|e Ca|| I|ow
A slmple call flow scenarlo ls shown ln llgure 2. 1he caller sends Sl lnvl1L Lo Lhe -CSCl (roxy)
found prlor Lo reglsLraLlon. 1he -CSCl forwards Lhe lnvl1L Lo Lhe S-CSCl LhaL ls asslgned Lo Lhe
caller. 1he S-CSCl checks lf Lhere are any orlglnaLlng Lrlggers for Lhe caller, whlch ls noL Lhe case ln
Lhls example, and forwards Lhe requesL Lo Lhe l-CSCl ln Lhe LermlnaLlng neLwork. 1he l-CSCl uses Lhe
Cx lnLerface (ulAML1L8) Lo query Lhe PSS for whlch S-CSCl Lhe callee ls asslgned Lo, and forwards
Lhe lnvl1L Lo Lhls parLlcular S-CSCl. 1he S-CSCl checks for LermlnaLlng Lrlggers of Lhe callee, whlch ls
noL Lhe case ln Lhls scenarlo, and Lhen forwards Lhe requesL Lo Lhe -CSCl of Lhe callee. When Lhe
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
4
callee plcks up Lhe phone a 200 Ck ls rouLed Lhe same way back as Lhe lnvl1L came. 1here may be
provlslonal messages (and correspondlng acknowledgemenLs) senL LhaL are noL shown ln Lhls call
flow. noLe, however, LhaL Lhese are noL lnherenLly necessary for a funcLlonlng sysLem.
MeJlu
llgure 1 also shows Lhe
MCCl (Medla CaLeway ConLrol luncLlon) - 1ranslaLlng beLween S1n slqoollloq and Sl
MCW (Medla CaLeway) - 1ranslaLlng beLween S1n ttofflc and l (81)
M8lC (Medla 8esource luncLlon ConLroller) and M8l (Medla 8esource luncLlon rocessor)
- laylng, recordlng and mlxlng medla sLreams
An ordlnary call beLween Lwo parLles does noL lnvolve any medla processlng of any of Lhese
funcLlons.
Pusb-To-Talk Uver Cellular {PoC]
oC ls Lhe cellular way of creaLlng a walkle-Lalkle servlce. 1he oC cllenL uses Sl as slgnalllng
proLocol and xCA Lo malnLaln user speclflc oC preferences ln an xuMS (xML uaLa ManagemenL
server). CMA (Cpen Moblle Alllance) ls responslble for sLandardlslng oC and resence, and was seL
up ln order Lo provlde sLandards for servlces LhaL can handle lnLeroperablllLy. 1he lnLegraLlon of oC
server and xuMS ls shown ln llgure 3. 1he xuMS holds user preferences and group llsLs. 1o lnform
Lhe lMS neLwork LhaL a Lermlnal supporLs push-Lo-Lalk, lL sends a 8LClS1L8 wlLh +g.ta|kburst and
+g.ta|kburst.groupadd feaLure Lags ln Lhe ConLacL header.

I|gure 3 - Integrat|on of oC server and kDMS |n IMS
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
3
1he oC server handles Sl slgnalllng, medla bufferlng and LransporLaLlon. 1he oC server also
handles Lhe floor conLrol messages uslng 18C packeLs, carrled as 81C (appllcaLlon dependenL)
packeLs. When Lwo subscrlbers are exchanglng lnformaLlon, Lhe Sl messages wlll go Lhrough Lhe
oC Servers on Lhe orlglnaLlng slde as well as on Lhe LermlnaLlng slde. 1rlgger maLchlng wlll be
performed on each slde causlng Lhe Sl message Lo be forwarded Lo Lhe oC servers.

I|gure 4 - Contro|||ng and art|c|pat|ng oC servers
oC servers can operaLe ln elLher conLrolllng or parLlclpaLlng mode or boLh. 1he conLrolllng oC
server performs cenLrallsed sesslon handllng, llke medla mlxlng, floor conLrol and pollcy
enforcemenL.
How to Integrate applications into IMS
An appllcaLlon server ls a Sl server LhaL execuLes servlces wlLhln lMS. An appllcaLlon server can acL
as a Sl user AgenL CllenL, Sl user AgenL server or Sl 828uA (8ack-1o-8ack-user-AgenL).
AppllcaLlon servers are lnLerfaclng Lhe S-CSCl LhaL forwards requesLs Lo Lhe speclflc appllcaLlon
server. Slnce Lhere could be several appllcaLlon servers ln lMS Lhe PSS conLalns fllLer crlLerla LhaL
selecL (lf Lhey maLch) an appllcaLlon server Lo conLacL based on Lhe parLlcular conLenL of an lncomlng
requesL. 1he lnLerface from Lhe S-CSCl Lo Lhe appllcaLlon server ls called Isc and ls deflned ln 3C
1S 23.228. llgures 3 Lhrough 8 show Lhe dlfferenL roles an appllcaLlon server may have and Lhe
dlfferenL ouLcomes ln Lerms of Sl slgnalllng.
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
6
S-CSCF
Application
Server
SIP leg #1
SIP leg #1
From: X
To: Y
Call-ID: Z
From: X
To: Y
Call-ID: Z

I|gure S - App||cat|on server act|ng as term|nat|ng UA, or red|rect server
S-CSCF
Application
Server
SIP leg #1
SIP leg #1
From: X
To: Y
Call-ID: Z
From: X
To: Y
Call-ID: Z

I|gure 6 - App||cat|on server act|ng as or|g|nat|ng UA
S-CSCF
Application
Server
SIP leg #1
SIP leg #1
From: X
To: Y
Call-ID: Z
From: X
To: Y
Call-ID: Z
SIP leg #1
From: X
To: Y
Call-ID: Z
SIP leg #1
From: X
To: Y
Call-ID: Z

I|gure 7 - App||cat|on server act|ng as a SI proxy
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
7
S-CSCF
Application
Server
SIP leg #2
SIP leg #2
From: P
To: Q
Call-ID: R
From: P
To: Q
Call-ID: R
SIP leg #1
From: X
To: Y
Call-ID: Z
SIP leg #1
From: X
To: Y
Call-ID: Z

I|gure 8 - App||cat|on server perform|ng 3rd party ca|| contro|
S-CSCF
SIP leg #1
From: X
To: Y
Call-ID: Z
SIP leg #1
From: X
To: Y
Call-ID: Z

I|gure 9 - A SI |eg |s passed through the S-CSCI w|thout pass|ng an app||cat|on Server
ln general Lhere are Lhree dlfferenL Lypes of appllcaLlon servers buL Lhey all acL as a Sl appllcaLlon
server Lowards Lhe lMS neLwork (S-CSCl). 1he dlfferenL Lypes of appllcaLlon servers are:
SI AS
1hls ls a naLlve lMS appllcaLlon server, based on Sl. lL could be lmplemenLed ln !ava, C++ or any
programmlng language. 1oday Lhere are Sl sLacks avallable wrlLLen ln !ava (!Aln) LhaL could be used
ln order Lo lmplemenL lMS servlces ln a fasL and conLrolled manner. 1hls Lype of appllcaLlon server ls
Lhe mosL llkely candldaLe for lmplemenLaLlons of new servlces. Pavlng !ava Als as a plaLform and
creaLlng servlces based on Sl/l wlLh open frameworks llke !ava ls even belleved Lo creaLe an
avalanche effecL ln Lhe number of servlces developed ln Lhe fuLure.
CSA-SCS (Cpen Serv|ce Access - Serv|ce Capab|||ty Server)
1he exlsLlng CSA framework appllcaLlon servers need Lo be lnLegraLed lnLo lMS. 1o fulflll Lhe
requlremenLs ln lMS, Lhe CSA-SCS acLs as an lnLerface beLween lMS and Lhe CSA appllcaLlon servers.
ln oLher words, lL uses Sl on one slde (as an AS, lnLerfaclng S-CSCl) and Lhe CSA appllcaLlon
rogrammlng lnLerface on Lhe oLher slde, Lowards Lhe CSA appllcaLlon server.
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
8
IM-SSI (I Mu|t|med|a Serv|ce Sw|tch|ng Iunct|on)
1oday Lhere ls already an exlsLlng base of CSM Servlces lmplemenLed uslng CAMLL (CusLomlzed
AppllcaLlons for Moblle neLwork Lnhanced Loglc). Analogous Lo Lhe CSA case above, Lhe CAMLL
appllcaLlons need an lnLerface Lowards Lhe lMS, ln order Lo remaln usable. 1he lM-SSl allows
gsmSCl (CSM Servlce ConLrol luncLlons) Lo conLrol an lMS sesslon by acLlng as an lnLermedlaLe
lnLerface. Cn one slde lL acLs as an appllcaLlon server wlLh Sl/l Lowards Lhe S-CSCl and on Lhe
oLher slde as an SCl (Servlce SwlLchlng luncLlon), lnLerfaclng Lhe gsmSCl wlLh a proLocol based on
CA (CAMLL appllcaLlon arL) deflned ln 3C 1S 29.278.
Interfaces 1owards the nSS
AparL from Lhe Isc lnLerface (Lowards Lhe S-CSCl), whlch ls a Sl based lnLerface, Lhe appllcaLlon
servers have lnLerfaces used for accesslng Lhe PSS. 1he Sh lnLerface ls responslble for Lransferrlng
lnformaLlon beLween Lhe PSS and Lhe Sl AS and beLween Lhe PSS and Lhe CSA-SCS, e.g. user
relaLed lnformaLlon and servlce relaLed daLa (MSlSun, user locaLlon, cell-lu). 1he Sh lnLerface ls
ulAML1L8-based and ls an lnLra-operaLor lnLerface, l.e. lL can noL be reached from any oLher
operaLor. 1he Sh lnLerface ls noL used beLween Lhe PSS and Lhe lM-SSl, whlch lnsLead employs Lhe
S| lnLerface. 1he Sl lnLerface LransporLs CAMLL subscrlpLlon lnformaLlon lncludlng Lrlggers for use by
CAMLL based appllcaLlons.
Servlce Profllex
IMS
Subscription
Private
User Identity
Public
User Identity
Public
User Identity
Public
User Identity
Service
Profile
Service
Profile

I|gure 10 - r|vate and ub||c |dent|t|es |n IMS re|ease 7
Cne of Lhe foundaLlons for all appllcaLlon servers ls LhaL Lhe subscrlber lnformaLlon sLored ln Lhe PSS
needs Lo be aware of Lhe Lypes of appllcaLlons/servlces LhaL are avallable for a cerLaln user. Lach
user has one or several assoclaLed setvlce ptoflles, sLored ln Lhe PSS. When a user reglsLers wlLh Lhe
lMS neLwork, lL may use lmpllclL reglsLraLlon", l.e. several publlc ldenLlLles assoclaLed wlLh Lhe
reglsLered prlvaLe ldenLlLy are reglsLered. When reglsLerlng a publlc ldenLlLy, Lhe assoclaLed servlce
proflle ls copled from Lhe PSS Lo Lhe asslgned S-CSCl.
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
9
An uML dlagram of Lhe servlce proflle ls shown ln llgure 11.

Service Profile
Public Identification
Core Network Service
Authorization
Subscribed Media
Profile Id: Integer
Initial Filter Criteria
1...n
0...1
0...n
Shared iFC Set
0...n
Identifier: Integer
I|gure 11 - UML d|agram of the Serv|ce rof||e
1he lnlLlal fllLer crlLerla conLalns one or zero Lrlgger polnLs. 1he Lrlgger polnL conslsLs of a seL of rules,
or setvlce polot ttlqqets, LhaL need Lo be Lrue ln order Lo forward Lhe requesL Lo an appllcaLlon
server. Lach Servlce olnL 1rlgger ls formulaLed as a boolean expresslon consLrucLed by Anu, C8 and
nC1 ln con[uncLlve or dls[uncLlve form.
An example Lrlgger:

(Method="INVITE" OR Method = "MESSAGE" OR Method="SUBSCRIBE") AND
(Method="INVITE" OR Method = "MESSAGE" OR (NOT Header = "from" Content =
"alice"))

1he Servlce olnL 1rlgger ls Lhen sLored ln Lhe PSS ln xML formaL and ls feLched by Lhe S-CSCl durlng
reglsLraLlon (along wlLh all oLher user relaLed lnformaLlon).

SIP Header
Header: string
Content: string
Service Point Trigger
ConditionNegated: boolean
Group: list of integer
RegistrationType: list of
enumerated
SIP Method
Method: string
Session Description
Line: string
Content: string
Session Case
SessionCase: enumerated
Request-URI
RequestURI: string
I|gure 12 - Serv|ce o|nt 1r|gger
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
10
Development of IMS applications
lMS ls based on open sLandards such as lL1l 8lCs and 3C 1echnlcal SpeclflcaLlons and as a base
Lhe Sl proLocol ls used. Sl lLself ls a very flexlble and exLenslble proLocol. lL ls lmperaLlve Lo have a
conslsLenL and exacL lnLerpreLaLlon of Lhese speclflcaLlons, ln Lerms of slgnalllng, and such
lnLerpreLaLlons are much appreclaLed by developers. lf Lhe developers are able Lo LesL and debug
Lhelr appllcaLlons durlng Lhe lmplemenLaLlon phase wlLhouL large overhead, lL wlll decrease Lhe
overall developmenL phase slgnlflcanLly. Slnce lMS ls a complex neLwork archlLecLure, lL ls dlfflculL Lo
supply one lMS neLwork for each developer. LfforL should be made, however, Lo supporL Lhe
developers wlLh a good LesLlng and debugglng envlronmenL.
1extlng your uppllcutlon xerver
1esLlng can be done aL dlfferenL levels. Cne level ls Lo ensure LhaL your appllcaLlon server ls dolng
whaL lL ls supposed Lo be dolng funcLlon-wlse, l.e. acLlng accordlng Lo Lhe use cases. 8oLh poslLlve
and negaLlve LesL cases should be used for Lhls purpose. AnoLher level, and a more dlfflculL one, ls Lo
lnvesLlgaLe how your appllcaLlon server acLs durlng sLress. 8oLh levels should be parL of Lhe LesL
phase. A developmenL pro[ecL wlll greaLly beneflL from havlng auLomaLed LesL cases wlLh scheduled
scrlpLs LhaL may run aL any glven Llme and dellver deLalled reporLs. 1hls wlll mosL llkely also lncrease
Lhe quallLy of Lhe appllcaLlon slgnlflcanLly. lf a cerLaln number of auLomaLed scrlpLs have been LesLed
and performed on one verslon, Lhey could be reused for laLer releases ln regresslon LesLs. 1he maln
prlnclples Lo keep ln mlnd are:
use auLomaLed LesLlng, l.e. scrlpLed LesL cases
o Makes your LesLlng more sLreamllned
ScrlpLed LesL cases for regresslon LesLs
o Makes lL easy Lo ensure LhaL prevlous funcLlonallLy has noL been affecLed
8un funcLlon LesLs Lo ensure LhaL your appllcaLlon behaves ln accordance wlLh boLh
successful and unsuccessful use cases
8un sLress LesLs, wlLh successful as well as unsuccessful use cases
o Check memory consumpLlon and neLwork performance and behavlour
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
11
Performunce conxlJerutlonx
lMS appllcaLlons are prone Lo puLLlng hlgh demands on processlng power. 1hls ls due Lo Lhe lnherenL
properLles of Lhe Sl proLocol as well as accompanylng formaLs such as xML. xML ls a hlghly flexlble
formaL and very easy Lo lmplemenL, buL Lhe drawback ls LhaL xML parsers and valldaLors Lyplcally
puL Cus Lo Lhe LesL. 8oLLlenecks should be Laken lnLo accounL when developlng lMS appllcaLlons,
and some of Lhe ma[or ones are:
Sl parsers and xML parsers
o SLrlng managemenL done wlLh reference counLers? 1hreadsafe sLrlng operaLlons?
o xML parsers and valldaLors dlffer ln speed. arsers could be used ln a way Lo reduce
Lhe use for valldaLors ln some cases. ls valldaLlng done more Lhan once?
1hread usage and locklng
o normally, for any glven sysLem, Lhe number of Lhreads used should be equal Lo Lhe
number of Cus lf l/C walL ls noL Laken lnLo accounL.
o Locklng beLween Lhreads should be carefully consldered. 1he more locks LhaL are
used, Lhe more schedullng needs Lo be done by Lhe sysLem whlch leads Lo more
wasLe of Cu Llme. Several Lhreads and locks can also lead Lo deadlocks LhaL may be
very dlfflculL Lo break.
neLwork processlng
o Asynchronous l/C processlng ls hlghly recommended. SockeL operaLlons LhaL are
performed ln blocklng mode mlghL sLarL Lo fall, whlch ln Lurn forces us Lo use some
oLher klnd of mechanlsm for relssulng Lhe sockeL operaLlon. 1hls ls a hlghly
unwanLed slLuaLlon and wlll consume exLra Cu and appllcaLlon lnLelllgence Lo
handle one slngle operaLlon. lf Lhere ls a queue for dolng oLher operaLlons on Lhe
sockeL, lL wlll sooner or laLer clog up and creaLe an avalanche effecL of ouLbound
operaLlons and Lhe appllcaLlon wlll sooner or laLer fall.
o lor bulldlng a hlgh performance appllcaLlon on Wlndows based operaLlng sysLems
non-blocklng meLhods for sockeL operaLlons ln con[uncLlon wlLh lCCompleLlon porLs
should be used. Some of Lhe non-blocklng operaLlons are WSASend, WSA8ecv,
WSAAccepL, WSACeLCverlapped8esulL, WSAClose, WSAConnecL and
WSAWalLlorMulLlpleLvenLs.
o ln Llnux based operaLlng sysLems, Lhere are currenLly non blocklng llbrarles under
developmenL and Lhese wlll be used ln Llnux kernels 2.6.9 and laLer. 1hese are called
AlC (Asynchronous lC).
o !ava supporLs asynchronous sockeL operaLlons ln Lhe [ava.nlo packages. 1esLs show
LhaL asynchronous processlng ln naLlve C++ ls abouL 27 fasLer Lhan !ava nlC (!uk
Intiouuction to INS application Bevelopment anu Integiation - White papei

CopyrlghL l-SoluLlons A8, Sweden. ConsulLlng and Lralnlng wlLhln l/Sl/lMS
L-mall: lnfo[lp-soluLlons.se, 1el: +46 8 613 08 60, web: www.lp-soluLlons.se
12
v1.4) on an x based compuLer and abouL 10 fasLer on Llnux based compuLers.
MlcrosofLs .nL1 package ln C# falls shorL, belng 44 slower Lhan Lhe C++ naLlve
asynchronous processlng. ln oLher words, on a Wlndows based compuLer, Lhe besL
alLernaLlve ls C++ naLlve asynchronous lC, Lhen !ava nlC packages and lasLly .nL1
C#. ln Llnux based sysLems, !ava ls qulLe close Lo naLlve C++ wlLh only a 10 margln.
Referencex
3C 1S 23.228 - l MulLlmedla SubsysLem (lMS), SLage 2
3C 1S 29.228 - lMS Cx and ux lnLerfaces, Slgnalllng flows and message conLenLs
3C 1S 29.278 - CAMLL AppllcaLlon arL (CA) speclflcaLlon for lMS
3C 1S 32.240 - 1elecommunlcaLlon managemenL, Charglng managemenL, Charglng
archlLecLure and prlnclples
3C 1S 32.260 - 1elecommunlcaLlon managemenL, Charglng managemenL, lMS charglng
8lC 3388 - ulAML1L8
Async lC on Llnux -
hLLp://lse.sourceforge.neL/lo/alo.hLml
(LasL vlslLed 2008-01-30)
Comparlng Lwo hlgh performance paLLerns -
hLLp://www.arLlma.com/arLlcles/lo_deslgn_paLLerns3.hLml
(LasL vlslLed 2008-01-30)

También podría gustarte