192

sdy50_b

Embed Size (px)

DESCRIPTION

ΟΔΗΓΟΣ ΜΕΛΕΤΗΣ ΓΙΑ ΤΙΣ ΑΝΑΓΚΕΣ ΤΗΣ ΣΔΥ50

Citation preview

  • 2 , () (2007-2013), 7: 8 MIS 296121 ( ) , () ...

    .

    ,

    .

  • :

    . Surrey

    .. .

    ..

    opusMAGNUM

    ISBN: 978-960-538-919-2 : 50/

    Copyright 2013

    18, 26335 .: 2610 367300, : 2610 367650

    To (. 2121/1993 ) . , , , , , , , (, ..) .

  • :

    2013

  • O X - - . 2002 - () . () -: ().

    (1995), (1997) - (2001) Essex ( ). 2007 2010 : () . , // ad hoc . 100 , . .

  • .................................................................................................11

    1

    .

    ,,-,

    ................................................................................131.1 ........................................................................................................161.2 ; ..............................191.3 ...........................................22

    1.4 .......................23

    1.5 ...............25

    1.5.1 ..................................................26

    1.5.2 ......................................28

    1.5.3 ......................................................................301.6 .................................33 ...................................................................................................................35

    .....................................................................................36 .........................................................................................................37 ..........................................................................38

    .....................................................39 ..............................................................................42

  • 8 :

    2

    .

    ,,-,

    ................................................................................47

    2.1 ...........................................................................50

    2.1.1 ..........................................................................................50

    2.1.2 .........................................................................................53

    2.1.3 ............................................................................................57

    2.1.4 .........................................................58

    2.1.5 ...........................................................................................602.2 ..................................................62

    2.2.1 - ........................................................62

    2.2.2 - ................................64

    2.2.3 ...............................................................................68

    ...................................................................................................................70 .....................................................................................71 .........................................................................................................72

    ..........................................................................73 .....................................................74

    ..............................................................................77

    3

    .

    ,,-,

    ................................................................................83

    3.1 ...........................................................................................86

    3.2 .................................88

    3.3 ..........................................................................................93

  • 9

    ...................................................................................................................98

    .....................................................................................99 .......................................................................................................100 ........................................................................101 ...................................................102

    ............................................................................104

    4

    .

    ,,-,

    ..............................................................................1074.1 .....................................1104.2 .................................................1134.3 ...............................115

    4.3.1

    SOAP ...................................................................115

    4.3.2

    REST .............................................120

    4.4 WSDL .......................................125

    4.5 .................................................................134

    4.6 ............135

    4.7 ......................................................................................138

    .................................................................................................................142

    ...................................................................................143

    .......................................................................................................144

    ........................................................................146

    ...................................................147

    ............................................................................149

  • 1 0 :

    5

    .

    ,,-,

    ..............................................................................155

    5.1 .................................................................................................159

    5.2

    P2P .............................................................1615.3 P2P .................................................................166 .................................................................................................................171 ...................................................................................172

    .......................................................................................................173 ........................................................................175

    ...................................................176 ............................................................................178

    ..............................................................................................................181

  • (). 1 -

    .

    2

    -

    . 3

    , , -

    . 4

    (web services) -

    . ,

    . , 5 (Peer-to-Peer

    P2P) ,

    P2P P2P -

    .

    .

    .

  • .

    - (). - ,

    . -

    .

    ,

    :

    -

    .

    1

  • 1 4 1 :

    -

    -

    -

    , - () (Distributed Systems).

    (centralized systems),

    (mainframe), () - .

    - , ,

    .

    , - ,

    . ,

    , - - .

  • 1 5

    -

    .

    -

    . ,

    , ,

    . , - , , ,

    . ,

    ,

    ,

    . , - , .

  • 1 6 1 :

    1.1

    - .

    :

    , - - (Tanenbaum & Van Steen, 2006).

    ( ) -

    (Coulouris,

    Dollimore, Kindberg & Blair, 2011).

    , - ,

    ,

    (Emmerich,

    1997).

    ,

    - (Lamport, 1987).

    ,

    :

    :

    - .

    ,

    .

    :

    , ,

  • 1 . 1 1 7

    . ,

    (distributed shared memory).

    :

    . ,

    , , , , - .

    / ,

    ,

    .

    : - . -, , - ,

    ,

    , .

    .

    : (, , )

    ( )

    . , ,

    : )

    ) - .

    :

    ,

    .

    (Wide Area Network

    WAN). / (network/cluster of

    workstations) .

    Google, , .

  • 1 8 1 :

    1.1

    ,

    ,

    , , -, , , , .

    .

    15 .

  • 1 . 2 ; 1 9

    1.2 ;

    . ,

    ,

    :

    1 : - . - , , , , ,

    , , , ,

    , .

    ,

    , .

    , , , - , -, , . - , ,

    , .., - (groupware).

    2 : ,

    ,

    ,

    . , - ,

    . , -

    (), - .

    3 /:

    . - , , -

    , /

    .

  • 2 0 1 :

    4 : -, , -,

    (replication). ,

    . , 5% ,

    5%. ,

    , - , , . ,

    .

    5 :

    ,

    ( ) . - , - . -,

    ,

    ,

    . ,

    , .

    -,

    . - .

    6 : , - . , -

    ,

    . ,

    -

  • 1 . 2 ; 2 1

    . ,

    , , ,

    .

    7 :

    (.., ,

    ...). , - , ,

    .

    1.2

    - 1.1.

    - . 25

    .

  • 2 2 1 :

    1.3

    ,

    ,

    .

    , - , -. , - .

    , , ,

    . , - .

    ,

    - .

    (

    ), - /.

    , -

    .

    ,

    , .

    1.1

    70

    .

  • 1 . 4 2 3

    1.4

    - . Flynn

    (Multiple

    Instruction Multiple Data MIMD) (Flynn, 1972).

    :

    (multiprocessors), (- ) , -

    .

    - (multicomputers), - /,

    . -- , ,

    .

    ,

    (bus) (switched network). -, , (backplane),

    (/).

    , - . , - , - .

    - . -

    (tightly-coupled) (loosely-coupled).

  • 2 4 1 :

    ( ).

    , - .

    -

    . (grids)

    (hypercubes). - (Massively Parallel Processors MPPs),

    , -.

    .

    . , -,

    . - - -, , , - .

    1.2

    1.4 - ; - ;

    1.1.

  • 1 . 5 2 5

    1.5

    , - . -

    (Tanenbaum,

    2007 , 2001). , , -

    , , , ,

    . , , -

    - ,

    .

    ,

    , - , :

    . ,

    , , ,

    . - ,

    , - /. ,

    . ,

    ,

    , . -, - . ,

    .

    -

    (Distributed Operating System

  • 2 6 1 :

    DOS) --. , (Network Operating System NOS) - --. , ,

    -

    (Middleware) .

    .

    1.3

    ; - ,

    , .

    1.5.1

    - .

    .

    ,

    ( 1.1).

    (.. UNIX, Windows, Mac OS),

    (format)

    .

  • 1 . 5 2 7

    , , , - ..

    .

    ,

    .

    1.1

    -. rcp rlogin, , ,

    .

    , , - , ,

    .

    -. -, ,

    (file servers). -

  • 2 8 1 :

    , (clients).

    , ,

    .

    .

    (Network

    File System NFS) Sun.

    1.3

    .

    . 200 . - 20 .

    1.5.2

    ( )

    ,

    ( 1.2).

    ,

    , - .

    ,

    ,

    - . - ,

    , -.

    , ,

    , - . ,

    , , ,

    . ,

  • 1 . 5 2 9

    . - , ,

    , -,

    .

    :

    ,

    ,

    ( , )

    -

    .

    Mach (Accetta, Baron, Golub, Rashid, Tevanian

    & Young, 1986), Chorus (Rozier, Abrossimov, Armand, Boule, Gien, Guillemont,

    1.2

  • 3 0 1 :

    Herrman, Kaiser, Langlois, Leonard & Neuhauser, 1991) Amoeba (Tanenbaum,

    van Renesse, van Staveren, Sharp, Mullender, Jansen & van Rossum, 1990).

    1.4

    . ,

    (.. - ),

    .

    ;

    150 . 20

    .

    1.5.3

    , ,

    -. - . ,

    (sockets) .

    .

    , - .

    ( 1.3).

    .

    ,

    . ,

    ,

    .

  • 1 . 5 3 1

    , , -, - . ,

    (remote procedure calls)

    (remote method invocation).

    , /-, -.

    1.3

    -

    . - -, ,

    (naming services),

    , , - . - ,

    , - .

  • 3 2 1 :

    -, - ( 50/). , - , ,

    .

    1.4

    - (, ) ; - .

    ) .

    ) .

    ) .

    ) .

  • 1 . 6 3 3

    1.6

    - :

    - (utility).

    ,

    . .

    - . - , (Personal Digital Assistants

    PDAs), , ,

    , (.. )

    (.. , , ).

    (.. ).

    H Web (webcasting) - . webcasting

    (broadcasting) , -.

    , - . ,

    webcasting,

    :

    -, MPEG HDTV

  • 3 4 1 :

    , - , -

    ,

    - .

    , (cloud computing)

    (

    ).

    ,

    , - ,

    - .

    , , - , .

    , -

    .

    1.5

    - .

    250 . 25 30

    .

  • 3 5

    , - -. -,

    /. - , . - , ,

    , ,

    .. ,

    , ,

    .

    ,

    .

    -. .

  • 3 6 1 :

    ,

    :

    -

    - -, , , -

    -

    -

    -

    /

    - .

  • 3 7

    , . (2001). . . - , :

    Accetta, M., Baron, R., Golub, D., Rashid, R., Tevanian, A. & Young, M. (1986).

    Mach: A New Kernel Foundation for UNIX Development. In Proceedings of the

    Summer 1986 USENIX Conference, pp. 93-112. 2012,

    http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.91.3964

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems:

    Concepts and Design. 5th edition. Pearson Education, NJ: Addison-Wesley

    Emmerich, W. (1997). Distributed System Principles. 2012,

    http://www.cs.ucl.ac.uk/staff/ucacwxe/lectures/ds98-99/dsee3.pdf

    Flynn, M. (1972). Some Computer Organizations and their Effectiveness. IEEE

    Transactions on Computers, 21(9), pp. 948-960. Doi: 10.1109/TC.1972.5009071

    Lamport, L. (1987). Distribution email, Msg-Id:. - 2012, http://research.microsoft.com/en-us/um/people/lamport/pubs/distrib-uted-system.txt

    Rozier, M., Abrossimov, V., Armand, F., Boule, I., Gien, M., Guillemont, M.,

    Herrman, F., Kaiser, C., Langlois, S., Leonard, P. & Neuhauser, W. (1991). Overview

    of the Chorus Distributed Operating System. Computing Systems Journal, 1, pp.

    39-69. 2012, http://citeseerx.ist.psu.edu/viewdoc/

    summary?doi=10.1.1.38.6843

    Tanenbaum, A. (2007). Modern Operating Systems. 3rd edition. Upper Saddle River,

    NJ: Prentice Hall

    Tanenbaum, A., van Renesse, R., van Staveren, H., Sharp, G., Mullender, S., Jansen,

    J. & van Rossum, G. (1990). Experiences with the Amoeba Distributed Operating

    System. Communications of the ACM, 33(12), pp. 46-63. Doi: 10.1145/96267.96281

    Tanenbaum, A. & Van Steen, M. (2006). Distributed Systems: Principles and Para-digms. 2nd edition. Upper Saddle River, NJ: Prentice Hall

  • 3 8 1 :

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems: Concepts and Design. 5th edition. Pearson Education, NJ: Addi-son-Wesley.

    .

    , ,

    - .

    Tanenbaum, A. & Van Steen, M. (2006). Distributed Systems: Principles and Paradigms. 2nd edition. Upper Saddle River, NJ: Prentice Hall. . - , , ,

    , ,

    .

    , ,

    - .

  • 3 9

    1.1

    ( 1.1). , -, (.. /

    ) , , . ,

    , - , , ,

    , , ,

    .

    , ! ,

    - .

    .

    1.2

    -

    ( ). - - , .

    ,

    .

    1.1, - ()

    , , .

    . , -

    /

    . ,

    - ( -

  • 4 0 1 :

    ) , - ,

    . , (- ) ,

    .

    , ,

    .

    ,

    -.

    1.3

    /.

    , -

    .

    , .

    ,

    1.5.

  • 4 1

    1.4

    ) .

    , ,

    ( 1.3 ).

    ) .

    . ,

    .

    ) . - .

    .

    ) . , .

    ,

    - - , - .

    , ! - . ,

    1.5 .

  • 4 2 1 :

    1.1

    -:

    : Amazon, eBay, PayPal, - (online banking & trading).

    : WWW, Google

    Yahoo, Google Books, YouTube, Wikipedia, Flickr, Facebook, MySpace ..

    : (online games), - (webcasting), - (media downloading).

    : , , - - (ambient assisted living).

    : / (e-learning), ,

    , .

    logistics: ( GPS), - , , - ( MapQuest, Google Maps Google Earth).

    : (grid computing), eScience,

    folding@home, SETI@home.

    : , - ( , ).

    , -

    . ,

    . ,

    !

    Coulouris et al. (2011)

    Tanenbaum & Van Steen (2006).

  • 4 3

    1.2

    :

    1 2 3 4 5 6 7

    logistics

    (1)

    , ,

    .

    (, , ) (2)

    . - (3)

    - . (4)

    (5) .

    (6) . -, - . ,

    (7) ,

    .

    ,

    . -

  • 4 4 1 :

    , ,

    ,

    . , , - ! - ,

    .

    1.3

    ,

    . ,

    - , - :

    rcp /-:- /-:-

    - . ,

    ,

    .

    .

    ,

    - .

    . -

    . , ,

    , , - (Domain Name

    Service DNS) IP .

  • 4 5

    . - /, ! - . ,

    , , - 1.5.1.

    1.4

    .

    . , , - . , - ,

    - . , ,

    . ,

    , , , -, , . -,

    ,

    , ,

    . ,

    .

    . - ,

    ! , .

    1.5.2,

    , , -.

    1.5

    , ,

    (e-Museum),

    (.. PDA) -

  • 4 6 1 :

    . - e-Museum ,

    PDA (Uniform

    Resource Locators URLs),

    ,

    (.. ). URLs (browser)

    PDA , -. , PDA

    , - .

    URLs (bookmarks) - /

    .

    URLs , - ,

    , , , - . , , /

    .

    , - ,

    . , ,

    , ! -

    . 1.6. - 1

    - ( 51/).

    , ,

    . , ,

    , - , .

  • .

    - ,

    .

    ,

    :

    -

    -.

    -

    2

    3

    2

  • 4 8 2 :

    -

    (

    )

    . ,

    . -, , ,

    , . ,

    , ,

    ,

    . ,

    , - .

    , ,

    - . .

    - .

    :

    ;

    ;

    - ;

    -

  • 4 9

    .

    : -, , , , . -

    ,

    . , - ,

    - . -

    - - , .

  • 5 0 2 :

    2.1

    - . -

    . , ,

    . ,

    - , , ,

    . , - .

    .

    2.1

    ( 150 ), -,

    .

    2.1.1

    (transparency)

    ,

    - .

    - (Reference Model for Open Distributed Processing RM ODP)

    (International Organization for Standardization ISO)

    (Farooqui, Logrippo & de Meer, 1995):

  • 2 . 1 5 1

    (Access Transparency):

    . - ,

    ,

    / .

    - ,

    .

    (Location Transparency): - (..

    IP ). - , . ,

    (.. )

    . ,

    , .

    (Replication Transparency):

    , - .

    .

    , ,

    , - .

    (Failure Transparency):

    ,

    , - . - - ( 1.1).

    (Migration Transparency): - , , - ,

    . ,

  • 5 2 2 :

    .

    (Concurrency Transparency): - ()

    , .

    , - /

    :

    (fairness),

    -.

    ,

    (mutual exclusion), - - ,

    (liveness), - (starvation) (deadlock).

    ,

    - ( ).

    ,

    ( ).

    (Performance Transparency):

    , . - - .

    (Scalability Transparency): -

    .

    (..

    ).

  • 2 . 1 5 3

    2.1

    ( 400 )

    . 30 - .

    2.1.2

    : , . - . - ,

    .

    .

    - .

    .

    ,

    , .

    - : (omission failure),

    (byzantine failure) (timing failure).

    : - - -. ()

    .

    - .

    .

    (.. ) -

  • 5 4 2 :

    - (fail-stop failures).

    : - - .

    . ,

    - .

    :

    (.. - ).

    , , - .

    ,

    . ,

    ,

    - . , ,

    .

    , ,

    ,

    .

    , - .

    ,

    , .

    -

    , .

    (redundancy) - . , , - , -

  • 2 . 1 5 5

    . ,

    , ,

    . , ,

    .

    . (consistency

    protocol) .

    (.. -). , - , ,

    -

    . , - (voting algorithms)

    (quorum-based).

    , - N , - N 2 1+( ). , , N 2 1+ .

    , ,

    - .

    . - ,

    (.. - ) , , - .

    (consensus algorithms)

  • 5 6 2 :

    - , .

    - , (two-army problem)

    (Byzantine generals problem)

    (Lamport, Shostak & Pease, 1982).

    ,

    ,

    - .

    (checkpoints) - (backward recovery),

    -.

    , , , - . - ,

    .

    (message

    logging). , , ,

    ,

    ,

    . - , , - ,

    , , .

  • 2 . 1 5 7

    2.2

    ,

    , - . .

    ,

    ; , - .

    2.2

    k- - (k-fault tolerant),

    k (.. ),

    .

    : ) k

    ) k ; - - . - 20

    .

    2.1.3

    :

    :

    .

    - - .

    : (throughput)

    -. , ,

  • 5 8 2 :

    - .

    , , - ( ,

    ).

    :

    - ,

    . - ,

    , - (, , ).

    , ,

    -, , , - . ,

    .

    ,

    .

    2.3

    ( )

    .

    15 .

    2.1.4

    . - .

    , , .

    (..

  • 2 . 1 5 9

    ) -, - .

    - ,

    . - .

    ,

    .

    , -. - .

    (.. )

    . ,

    ,

    .

    .

    , -, .

    (scalable) - .

    . - , - ,

    . - ,

    .

    2.3

    , - .

    ,

    .

  • 6 0 2 :

    2.1.5

    - , - .

    ,

    (intruder),

    - , ,

    , .

    :

    - .

    .

    , - , - .

    (secure channel)

  • 2 . 1 6 1

    .

    (Virtual

    Private Networks VPNs), - (Secure Sockets Layer SSL).

    ,

    . ,

    (..

    ),

    .

    2.4

    ( 150 ), -,

    , .

  • 6 2 2 :

    2.2

    -

    . (physical models) - ,

    ( , , -) .

    (architectural models)

    . - - - , .

    2.2.1 -

    -

    . , , -

    ,

    .

    , , 2 (2-tier architecture).

    - .

    ,

    , - .

    , , .

    ,

    , - . , - ,

    (Domain Name Service DNS),

    . , -, :

  • 2 . 2 6 3

    - (web crawlers)

    .

    :

    (presentation layer),

    (application layer), - ,

    (data layer),

    , - .

    -

    3 (3-tier architecture),

    ,

    .

    , - ( ),

    . ,

    - (.. -, , ).

    2 , - , .

    , - .

    - N (Ntier), N - , .

    , ,

    , (

  • 6 4 2 :

    ) (

    ).

    .

    .

    , .

    , .

    2.4

    -,

    ,

    (file server): ) - ;

    . ) - 4/5 , - , 1/5 ,

    99%;

    200 . 20

    .

    2.2.2 -

    -- , - .

    :

    ()

    ( )

    .

  • 2 . 2 6 5

    -

    (.. - ) - (.. ) . - (cache)

    ,

    (..

    ). (proxy server)

    , ,

    . - ,

    . -, , - . ,

    , , , , -,

    , .

    -, ,

    , ,

    (.. HTML WAP).

    .

    Java applets, - . - ,

    . ,

    -

    ,

    .

  • 6 6 2 :

    (push model)

    , , . ,

    , ,

    -.

    (mobile agent) (- ) - - , , , - , . -

    , - ,

    - . ,

    ( )

    , - (.. ). ,

    .

    (network computers)

    , - (.. ) RAM. - ,

    , -.

    Java,

    . ,

    - .

    ,

  • 2 . 2 6 7

    , - .

    Sun Oracle .

    ()

    H (thin client) - , ,

    ,

    .

    ,

    , , - , - .

    ,

    , ,

    .

    - , - ,

    . , ,

    - (compute server).

    (mobile devices), , - PDAs, - , GSM, 3G, WiFi Bluetooth.

    --

    . , - , , -, - .

    ()

  • 6 8 2 :

    , - . ,

    , (service discovery),

    - .

    2.5

    -.

    - .

    (10-12 ) . - 35 .

    2.2.3

    (peer architecture),

    . - . - ,

    ( ).

  • 2 . 2 6 9

    (.. ),

    . ,

    ,

    .

    , .

    , ,

    ,

    . - ,

    .

    .

    2.5

    .

    - .

    .

  • 7 0 2 :

    -

    .

    : //-/////-.

    - , . , ,

    . -,

    , ,

    .

    .

    , ,

    . ,

    -

    .

  • 7 1

    ,

    :

    -

    -

    -

    2, 3 N

    -

    .

  • 7 2 2 :

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems:

    Concepts and Design. 5th edition. Pearson Education, NJ: Addison-Wesley

    Farooqui, K., Logrippo, L. & de Meer, J. (1995). The ISO Reference Model for Open

    Distributed Processing: An Introduction. Computer Networks and ISDN Systems,

    27(8), pp. 1215-1229. Doi: 10.1016/0169-7552(95)00087-N

    Kshemkalyani, A.D. & Singhal, M. (2008). Distributed Computing Principles, Algo-rithms, and Systems. New York: Cambridge University Press

    Lamport, L., Shostak, R. & Pease, M. (1982). Byzantine Generals Problem. ACM

    TOPLAS, 4(3), pp. 382-401. Doi: 10.1145/357172.357176

  • 7 3

    Kshemkalyani, A.D. & Singhal, M. (2008). Distributed Computing Prin-ciples, Algorithms, and Systems. New York: Cambridge University Press. ,

    , - .

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems: Concepts and Design. 5th edition. Pearson Education, NJ: Addi-son-Wesley. 2

    - .

  • 7 4 2 :

    2.1

    - (..

    ) (..

    ). - -,

    .

    , - , - .

    ,

    - .

    . ,

    , - ,

    .

    !

    2.1, 1.3,

    .

    2.2

    ,

    . - (checksum)

    , - . (block) -

  • 7 5

    , . ,

    , ,

    . -, . H - . ,

    .

    , ! - 2.1.2.

    , , , ,

    , .

    2.3

    , .

    ,

    2.1.4

    .

    2.4

    , -

    . , -

    -, -

  • 7 6 2 :

    . ,

    .

    .

    , ! ,

    2.1.5.

    2.5

    - .

    , -, ,

    - . -,

    ( - ) : , ,

    , , - , - (bottlenecks) ..

    , !

    2.2, . - , -,

    - .

  • 7 7

    2.1

    : -. O ,

    ,

    . ,

    - (.. Big Endian,

    Little Endian).

    : URL, http://www.eap.gr/index.php,

    ,

    .

    : , DNS, - , - -

    .

    : - (.. )

    .

    , - -. ,

    ,

    .

    : - - , (..

    ) .

    :

    , -

  • 7 8 2 :

    (s) , ,

    , .

    (- ), , ,

    .

    : (Grid

    Computer) .

    - ,

    . (load balancing).

    :

    , .

    . - , !

    , , -, . , - .

    , 2.1.1.

    2.2

    ) k - , k + 1 . k - , ,

    .

    ) k - 2k + 1 . ,

    k

    (.. ). ,

    (voting and quorum-based

  • 7 9

    algorithm), k + 1 - .

    , -

    -

    . , ! -

    .

    2.1.2, .

    2.3

    :

    -,

    - ,

    (caching),

    ,

    - -

    ,

    - .

    .

    2.1.3, - .

  • 8 0 2 :

    , ! ,

    /.

    2.4

    )

    :

    (bandwidth)

    (latency), - (-, , ..)

    (.. SOAP/Web

    Services) (NFS, CORBA).

    :

    (replication)

    (caching), -

    (lightweight) .

    ) n o .

    1 5 0 01( )

  • 8 1

    . ! , - 2.3.

    2.5

    -1: - (distributed presentation architecture)

    . H - - , ,

    , -. ,

    GUI .

    -11 Window System Unix , Virtual Network Computer

    & Labs, Remote Desktop Protocol Microsoft ..

    -2: - (remote presentation architecture). -

    .

    . - ,

    , , - .

    ,

    (ftp, telnet ..) , - .

    -3: - (distributed function architecture). - - (business/application logic) -. , - (..

    ). , ,

    .

  • 8 2 2 :

    ( )

    , Java applet.

    -4: - (remote data architecture). - (fat-client) , , /.

    .

    (DB2, Oracle, Informix ..)

    -

    - . (Network File

    Systems) , , . -

    (Decision Support System) ,

    , , - .

    -5: - (distributed data architecture).

    .

    (cache) .

    (.. NFS) - .

    -. , ,

    , 2 3, - .

    , ! ,

    ,

    --.

  • .

    .

    - .

    - / /.

    ,

    :

    .

    -

    Lamport

    3

  • 8 4 3 :

    O (clock synchronization)

    (Coulouris, Dollimore, Kindberg & Blair, 2011).

    (centralized systems)

    , .

    (system call). , ,

    , . ,

    .

    (global clock) . -

    . , - ,

    . ,

    , ,

    .

    - .

    :

    -

    - .

  • 8 5

    :

    (), -

    . ,

    .

    .

    N M,

    M (Liskov, 1991).

    ,

    (timeouts) - - (Giridhar & Kumar, 2006).

    , ,

    .

    , ,

    , , ..

    - . ,

    , - /: ) -

    ) ,

    .

  • 8 6 3 :

    3.1

    -

    , -

    .

    (timestamp)

    /. , /

    , , -

    , -

    .

    , :

    -

    , UTC (Coordinated Universal Time,

    ).

    (physical clocks).

    (.. ),

    , -

    . -

    (logical clocks).

    3.1

    ( 100 ):

    ) ;

    ) -

    ;

    ) / -

    (

    );

    ( : 15)

  • 3 . 1 8 7

    3.2

    -

    . -

    (ad hoc

    wireless sensor network), -

    -

    . ( 200 ) ,

    .

    .

    ( : 30)

  • 8 8 3 :

    3.2

    , (total

    ordering):

    (), , a

    b, a -

    b (Krzyzanowski, 2002).

    , . -

    ,

    .

    () , - (partial ordering).

    Lamport (happens before)

    : ab a

    b (Lamport, 1978). a

    b -

    , ab (

    ). :

    ab bc, ac.

    a b ,

    ab a b. a b

    (

    ), ab . -

    , a b.

    3.1

    (p1, p

    2 p

    3).

    ( ) .

    :

    f, a, a, , ,

    a. , d (-

    ) (=1) (b, -

    2).

  • 3 . 2 8 9

    3.1

    Lamport

    Lamport

    ,

    . :

    ,

    .

    -

    ( -

    -).

    , ,

    -.

    , -

    . - -

    -

    , :

    +1. , .

    ,

    Lamport (.

  • 9 0 3 :

    3.2).

    , , ,

    .

    Lamport.

    , ab, L(a) < L(b), L(x) - Lamport x.

    3.2

    Lamport

    e

    e, L(e) < L(e). , . Lamport, L(e) < L(e), ee. , Lamport

    .

    -

    (Mattern, 1989).

    . (Vi

    pi) .

    Lamport, -

  • 3 . 2 9 1

    ( ) .

    :

    1. 0 :

    Vi[j] = 0 i, j = 1, , N

    2. pi , -

    :

    Vi[i] = V

    i[i]+1

    3. pi V

    i.

    3.3

    4. pj t, -

    --,

    :

    Vj[i] = max(Vj[i], t[i]) i = 1, , N

    :

    V = V, V[j] = V[j] j = 1, , N

    V V, V[j] V[j] j = 1, , N

  • 9 2 3 :

    e e, ee, V(e) < V(e).

    Lamport. , ,

    , V(e) < V(e), ee. e e , V(e) V(e), V(e) V(e). , b f 3.3, , - .

    , -

    (Krzyzanowski,

    2002).

    3.1

    -

    p1, p

    2 p

    3:

    -

    :

    ) (Lamport)

    ) .

  • 3 . 3 9 3

    3.3

    H/Y CMOS

    . -

    / .

    sec 10 ,

    , -

    . ,

    31C sec (Krzyzanowski, 2002).

    , / ,

    , (clock drift).

    - (clock skew)

    -

    .

    (UTC) x- / y-. -

    .

    , -

    .

    .

    , ,

    . , , -

    ,

    -

    .

    -. ,

    .

    -

    (linear compensating

  • 9 4 3 :

    function) (. 3.4). , -

    /

    .

    3.4

    (Krzyzanowski, 2002)

    , , -

    . GPS (Global Positioning

    System) / ( GPS 1msec

    UTC). ,

    .

    /, -

    (time servers).

    .

    Cristian

    Cristian (Cristian, 1989)

    , (intranets) .

    Cristian ,

  • 3 . 3 9 5

    (Round-Trip Time RTT) -

    .

    Cristian P - S, UTC. :

    1. P S.

    2. S P, .

    3. P T + RTT/2.

    P , , RTT S . RTT ,

    ,

    LAN. -

    S RTT.

    Berkeley

    Berkeley (Gusella & Zatti, 1989) -

    , / -

    . Cristian, -

    .

    Berkeley, -, -

    (master), , , - (slave

    processes). :

    1. .

    2. -, -

    ,

    Cristian.

    3. RTT

    , .

  • 9 6 3 :

    4. ,

    ( ).

    5. ,

    ( )

    .

    ( RTT) .

    ,

    . Gusella Zatti -

    15 /

    20-25msec,

    Berkeley.

    3.2

    ( -

    ), -

    :

    1. / Lamport

    :

    ) .

    )

    .

    ) .

    ) .

    2. / - Lamport :

    ) .

    ) -

    .

    ) .

  • 3 . 3 9 7

    3. - ;

    ) .

    ) .

    4. Cristian Berkeley

    :

    ) .

    ) .

    ) .

    5. /

    Cristian Berkeley;

    ) Cristian

    .

    ) Cristian -

    .

    ) Cristian

    .

    ) Cristian -

    /.

    6. / - ;

    ) .

    ) / .

    ) .

  • 9 8 3 :

    - ,

    .

    - .

    . ,

    Lamport ( - /)

    Cristian Berkeley - .

  • 9 9

    ,

    :

    , -

    -

    -

    ,

    Lamport -

    Lamport

    Cristian Berkeley -

    .

  • 1 0 0 3 :

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems:

    Concepts and Design. 5th edition. Pearson Education, NJ: Addison-Wesley

    Cristian, F. (1989). Probabilistic Clock Synchronization. Distributed Computing,

    3(3), pp. 146-158. Doi: 10.1007/BF01784024

    Giridhar, A. & Kumar, P.R. (2006). Distributed Clock Synchronization over Wireless

    Networks: Algorithms and Analysis. Proceedings of the 45th IEEE Conference on

    Decision and Control (CDC2006), pp. 4915-4920. Doi: 10.1109/CDC.2006.377325

    Gusella, R. & Zatti, S. (1989). The Accuracy of the Clock Synchronization Achieved

    by TEMPO in Berkeley UNIX 4.3BSD. IEEE Transactions on Software Engineering,

    15(7), pp. 847-853. Doi:10.1109/32.29484

    Krzyzanowski, P. (2002). Clock Synchronization. Lectures on Distributed Systems.

    Lamport, L. (1978). Time, Clocks, and the Ordering of Events in a Distributed System.

    Communications of the ACM, 21(7), pp. 558-565. Doi: 10.1145/359545.359563

    Liskov, B. (1991). Practical Uses of Synchronized Clocks in Distributed Systems.

    Distributed Computing, 6(4), pp. 211-219. Doi: 10.1007/BF02242709

    Mattern, F. (1989). Virtual Time and Global States of Distributed Systems. In

    Cosnard, M., Yves, R., Patrice, Q. & Michel, R. (eds). Parallel and Distributed

    Algorithms, pp. 215-226. Elsevier Science Publishers

    Sundararaman, B., Buy, U. & Kshemkalyani, A.D. (2005). Clock Synchronization

    for Wireless Sensor Networks: A Survey. Ad Hoc Networks, 3(3), pp. 281-323. Doi:

    10.1016/j.adhoc.2005.01.002

  • 1 0 1

    Sundararaman, B., Buy, U. & Kshemkalyani, A.D. (2005). Clock Synchro-nization for Wireless Sensor Networks: A Survey. Ad Hoc Networks, 3(3),

    pp. 281-323. Doi: 10.1016/j.adhoc.2005.01.002.

    -

    , -

    , , ,

    .

    -

    -

    . ,

    .

  • 1 0 2 3 :

    3.1

    ) (Lamport):

    )

    ( mi, i = 1, ..., 6, -

    ):

    , - 3.2. , !

    , 3.2.

  • 1 0 3

    3.2

    A/A

    /

    1 )

    ,

    ( )

    ( -

    ), (

    Lamport).

    2 )

    -

    (.. a e

    3.3),

    Lamport.

    3 )

    (..

    b f 3.3).

    4 ) Cristian Berkeley RTT,

    -

    .

    5 ), )

    Cristian

    . , -

    /,

    (

    RTT Berkeley).

    6 )

    -

    (

    ),

    .

    , ! -, 3.2 ( 1, 2 3) 3.3 (- 4, 5 6).

  • 1 0 4 3 :

    3.1

    )

    -

    .

    ,

    ,

    -

    .

    (.. , -

    ).

    ) , (-

    ).

    )

    .

    ,

    . - , !

    , - 3.1, - ,

    - .

    3.2

    )

    / .

    , , -

    , ,

    .

    -

  • 1 0 5

    ( ). -

    ,

    .

    , -

    (

    ).

    ) -

    , -

    ,

    , , -

    ,

    , , (

    ). -

    .

    ,

    .

    ,

    , - . ,

    ! , - 3.1 -

    .

  • .

    (web services) - ,

    . , - ( SOAP

    REST), , - . , - .

    ,

    :

    SOAP,

    SOAP

    - REST

    WSDL

    UDDI, -

    -

    4

  • 1 0 8 4 :

    .

    -

    UDDI

    WSDL

    SOAP

    REST

    XML-RPC

    - - (Papazoglou,

    2007).

    , -

    (

    ). - ( - HTTP),

    , xHTML.

    , , (

    )

    . , - ,

    (..) - .. - (

    ) (

    ) - . - . ,

  • 1 0 9

    ,

    .

    ,

    , - .

    :

    SOAP REST. , - WSDL - . ,

    .

  • 11 0 4 :

    4.1

    :

    ,

    , ,

    ,

    , ( - ) ,

    .

    (human-centric) (application-centric) . ,

    , , -

    ( -)

    .

    - 4.1:

    / ( 1):

    ( ). , - (service

    registry), .

    ( 2-3):

    - ,

    (..

    ). , (discovery

    service) .

    ,

    - (,

    ).

  • 4 . 1 111

    / ( 4-7):

    , , -, /

    . , - (

    ).

    -, ,

    (Web Services Description

    Language WSDL).

    -

    (Simple Object Access Protocol SOAP), , ..,

    .

    - ( SOAP)

    SOAP .

    4.1

    :

    (service provider):

    .

    .

    (service registry): - . - -.

    (service consumer/requestor): - -

    XML.

  • 11 2 4 :

    4.1

    ,

    , W3C

    (Booth, Haas, McCabe, Newcomer, Champion, Ferris & Orchard, 2004):

    -

    . ,

    , (WSDL). - , - SOAP,

    HTTP XML (serialization),

    .

  • 4 . 2 11 3

    4.2

    - . - , ,

    .

    (. 4.2):

    4.2

    (transport layer):

    HTTP, SMTP FTP.

    XML : - XML,

    .

    XML-RPC, WS-Addressing SOAP.

    :

    , - WSDL.

    :

    , -

  • 11 4 4 :

    . - , (Universal Description

    Discovery and Integration UDDI) , .

  • 4 . 3 11 5

    4.3

    :

    , (SOAP) , - , REST. - .

    4.3.1 SOAP

    SOAP

    (Coulouris, Dollimore, Kindberg & Blair,

    2011). SOAP XML , , - HTTP (, ,

    , SMTP, FTP ..).

    SOAP W3C 1999,

    1.2, 2007. , SOAP

    , - WSDL UDDI.

    SOAP - . SOAP : )

    (envelope), - , ) (header),

    ) (body), - .

    SOAP ( , ,

    ) 4.3.

    . ,

    SOAP

    (pay-per-use).

    SOAP

    XML . -

  • 11 6 4 :

    . (child element)

    SOAP.

    SOAP XML-RPC, (Remote Procedure Call

    RPC), XML HTTP

    . XML-RPC, SOAP

    ( ), - , ( - ),

    (.. HTTP, SMTP, FTP).

    4.3

    SOAP

    - SOAP ( - HTTP).

    :

    GET /StockPrice HTTP/1.1

    Host: example.org

    ContentType: application/soap+xml; charset=utf8

    ContentLength: nnn

  • 4 . 3 11 7

    81100

    Monday

    :

    HTTP/1.1 200 OK

    ContentType: application/soap+xml; charset=utf8

    ContentLength: nnn

  • 11 8 4 :

    XML SOAP - . ,

    , - , - -. , CORBA

    ./DCOM , .

    -, , ,

    ,

    , WSDL.

    ( )

    , - (stub). , - , WSDL - .

    , SOAP - SOAP ( -). , - / ,

    ( WSDL

    ).

    , ,

    ( WSDL

    ) , ,

    (

    , , WSDL

    ).

  • 4 . 3 11 9

    4.4

    SOAP

    - (

    URI )

    WSDL.

    - (. 4.4):

    1. ,

    . - SOAP.

    (marshalling serialization). ,

    - bytes.

    2. SOAP - HTTP. SOAP

    .

    SOAP -, , , - (unmarshalling deserialization).

    3. SOAP ,

    ,

    .

    4.

    , SOAP.

  • 1 2 0 4 :

    5. SOAP - HTTP. - SOAP

    .

    6. , - .

    4.3.2 REST

    (Representational

    State Transfer REST) - (Fielding, 2000). REST -, (RESTful) - . RESTful

    URI. ,

    ,

    .

    . ,

    (cached) . - ,

    .

    , , RESTful

    Twitter, - (tweets) . ,

    tweets

    (. 4.5).

    HTTP GET - (URI) :

    http://twitter.com/statuses/user_timeline.xml?id=BarackObama &count=2

  • 4 . 3 1 2 1

    4.5

    tweets

    GET (.. Javascript,

    PHP JSP )

    .

    , GET SQL SELECT - . (

    HTTP) XML,

    (

    XML):

    Wed May 09 00:21:03 +0000 2012

  • 1 2 2 4 :

    200017502510657536

    Mitt Romney would "take a lot of credit" for the comeback of the auto industry. Another case of Romney vs. Reality: http://t.co/2mMQNRTA

    web

    false

    751

    813286

    Barack Obama

    BarackObama

    Washington, DC

    This account is run by #Obama2012 campaign staff.

    https://si0.twimg.com/profile_images/

    1735360254/icon_normal.jpg

    http://www.barackobama.com

    15126436

  • 4 . 3 1 2 3

    , - URI: , http://twitter.com -,

    . /statuses

    REST (

    ). Twitter, - (status) , /

    . user_timeline.

    .

    () tweets

    . .xml

    . GET -,

    (?). , (id

    count) Twitter, - (BarackObama), - tweets (2).

    , RESTful

    SOAP1, -, :

    1 (2012)

    REST: Twitter, Yahoo, Flickr, del.icio.us .. eBay Amazon

    REST SOAP.

  • 1 2 4 4 :

    XML (.

    2 4.2)

    - .

    , REST ,

    .., - .

    4.1

    SOAP REST;

    ( 300 )

    , 2

    3 Pautasso, Zimmermann & Leymann (2008).

    ( : 60)

  • 4 . 4 WSDL 1 2 5

    4.4 WSDL

    WSDL XML

    .

    WSDL ( WSDL)

    ,

    . WSDL

    WSDL 2.0 ( W3C 2007).

    H WSDL - (Application Programming Interface API), - , ,

    ,

    . ,

    , -

    WSDL - .

    WSDL

    , , - , :

    .

    WSDL 2.0 (binding)

    HTTP ( GET, POST, PUT

    DELETE GET POST,

    1.1). , RESTful

    , . ,

    WSDL 1.1

    SOAP.

  • 1 2 6 4 :

    WSDL 2.0 XML (namespace)

    http://www.w3.org/ns/wsdl. (root element)

    (description), - -

    :

    (types)

    (interface)

    (binding)

    (service).

    WSDL 2.0 :

    (Hotel Zeus)

    WSDL,

    - .

    , - (Check_Availability). ,

    /

    ,

    .

    ,

    (Booth & Liu, 2004).

  • 4 . 4 WSDL 1 2 7

    Hotel Zeus -. ,

    (message types) - .

    checkAvailability, checkAvailabilityResponse invalidDataError, - XML (elements).

  • 1 2 8 4 :

    H WSDL 2.0 - - .

    (interface) WSDL 2.0

    ,

    . - ,

    , . -, in-out ,

    ,

    ( )

    ( ):

  • 4 . 4 WSDL 1 2 9

    (binding element)

    (

    ). -,

    . Hotel Zeus,

    SOAP 1.2 HTTP - , .

    REST,

    HTTP.

    (service element) - :

  • 1 3 0 4 :

    4.2

    (web service client)

    . (- WSDL) ( - ) URL: http://wsf.cdyne.com/WeatherWS/Weather.

    asmx?WSDL

    O ( HTML) - (Zip code) (. )

    ( Fahrenheit Celsius),

    / 6

    (. ).

    ,

    .

    URL: http://zip4.usps.com/zip4/citytown.jsp.

    Java Servlet (WeatherServlet.java)

    HTML JSP (DynamicWeather.jsp).

    , NetBeans.

    tutorial

  • 4 . 4 WSDL 1 3 1

    NetBeans URL: http://netbeans.org/kb/docs/websvc/client.html

    tutorials youtube.

    ( : 90)

  • 1 3 2 4 :

    4.1

    , - .

    :

    1. ;

    )

    .

    ) .

    ) XML.

    ) .

    2. :

    ) .

    ) .

    )

    .

    ) .

    3. SOAP - ;

    ) SOAP

    - (firewalls).

    ) SOAP HTML.

    ) SOAP LANs.

    ) .

  • 4 . 4 WSDL 1 3 3

    4. ( - ) .

    ) .

    ) .

    5. SOAP REST :

    ) .

    ) SOAP - .

    ) SOAP

    .

    )

    .

  • 1 3 4 4 :

    4.5

    (discovery)

    (

    ) . - (registry)

    . - UDDI, - . UDDI

    SOAP WSDL. , UDDI

    , ( 2006

    IBM, Microsoft SAP

    UDDI ).

    - (WS-Inspection),

    Microsoft

    IBM. H WS-Inspection - .

    XML (, WS-Inspection

    ). -

    . UDDI

    WS-Inspection

    .

    (Web Services

    Dynamic Discovery WS-Discovery), - . WS-Discovery

    (multicast)

    . - SOAP- -UDP. 2009

    OASIS.

  • 4 . 6 1 3 5

    4.6

    .

    , - RMI, ./DCOM, CORBA, EDI ebXML (. 50/)

    , , . , ,

    ;

    , , HTTP, - XML .

    ( )

    . , - (RMI, .NET/DCOM, CORBA) - ,

    . -

    (Cook & Barfield, 2006):

    - , - XML. ,

    C++ - Windows, - Java Linux.

    HTTP

    (

    ). - ,

    (proxies) (firewalls)

    HTTP (

    CORBA, , , ).

    CORBA, ./DCOM EJB - (tightly-coupled), - ,

    -

  • 1 3 6 4 :

    (loosely-coupled),

    , .

    (intranet)

    , . -, - ,

    .

    , :

    : XML

    , : , -, . , ,

    , ,

    .

    : ,

    ,

    ( ) . CORBA, -,

    , (persistency), (notifications),

    , .. , - ( WS-Resource

    WS-ResourceLifetime) .

    4.3

    SOAP - , . - SOAP - ,

    WSDL, W3C - .

    ,

    , ,

    , .

  • 4 . 6 1 3 7

    - , ,

    CORBA, ./DCOM J2EE. , , ,

    , ,

    - . ;

    200 .

    ,

    Vinoski (2003).

    ( : 60)

  • 1 3 8 4 :

    4.7

    widgets2: , - , widget, - , - . widgets

    , - , ,

    , ..

    , s - widgets.

    , - ,

    .

    Amazon3, Facebook4, Tweeter

    online .

    :

    ,

    ,

    .

    - ,

    Ajax (. 4.6).

    .

    .

    2 widget

    . widget

    ( ) - ,

    .

    3 , Product Advertising API Amazon - Amazon,

    Amazon .

    4 , Profile Badge Photo Badge widgets Facebook

    , , - .

  • 4 . 7 1 3 9

    4.6

    : (web services

    composition) - ()

    . , , - ,

    (Dustdar &

    Schreiner, 2005). , ,

    online -

    - -. , ,

    .

    (coordinator web service), -

  • 1 4 0 4 :

    .

    .

    , - (Business Process Execution Language BPEL)

    . ,

    (.. NetBeans, Eclipse) BPEL.

    4.2

    , - .

    :

    1. ()

    :

    ) XML UDDI, .

    ) XML SOAP, .

    ) HTML HTTP, .

    ) HTML SOAP, .

    2.

    :

    )

    .

    ) - .

    ) -.

    ) ()

    .

    ) .

  • 4 . 7 1 4 1

    3. (

    ) ,

    ) -/ .

    ) - .

    ) () - .

    ) .

    4. ,

    ;

    ) - .

    ) .

    ) - SOAP REST.

    5. , -, , - :

    ) WSDL.

    ) REST.

    ) UDDI.

    ) BPEL.

  • 1 4 2 4 :

    ( ) - .

    / ( SOAP

    REST), XML (WSDL)

    (.. UDDI, WS-

    Discovery). - , - . , ,

    .

  • 1 4 3

    ,

    :

    -

    - SOAP REST

    WSDL

    UDDI, WS-Inspection WS-Discovery

    ( -, ) -

    widgets, - ,

    .

  • 1 4 4 4 :

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems:

    Concepts and Design. 5th edition. Pearson Education, NJ: Addison-Wesley

    Booth, D., Haas, H., McCabe, F., Newcomer, E., Champion, M., Ferris, C. & Orchard,

    D. (2004). Web Services Architecture. W3C Working Group Note. 5

    2012, http://www.w3.org/TR/ws-arch/

    Booth, D. & Liu, C.K. (2004). Web Services Description Language (WSDL) Version

    2.0. W3C Working Draft. 5 2012, http://www.w3.org/

    TR/2004/WD-wsdl20-primer-20041221/

    Cook, W.R. & Barfield, J. (2006). Web Services versus Distributed Objects: A

    Case Study of Performance and Interface Design. Proceedings of the International

    Conference on Web Services (ICWS06), pp. 419-426. Doi: 10.1109/ICWS.2006.145

    Daigneau, . (2011). Service Design Patterns: Fundamental Design Solutions for

    SOAP/WSDL and RESTful Web Services. Addison-Wesley Professional

    Dustdar, S. & Schreiner, W. (2005). A Survey on Web Services Composition.

    International Journal of Web and Grid Services, 1(1), pp. 1-30. Doi: 10.1504/

    IJWGS.2005.007545

    Fielding, R.T. (2000). Architectural Styles and the Design of Network-based Software

    Architectures, PhD Thesis, University of California, Irvine, 5

    2012, http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

    Mizouni, R., Serhani, M.A., Dssouli, R., Benharref, A. & Taleb, I. (2011).

    Performance Evaluation of Mobile Web Services. Proceedings of the 9th IEEE

    European Conference on Web Services (ECOWS2011), pp. 184-191. Doi: 10.1109/

    ECOWS.2011.12

    Papazoglou, M.P. (2007). Web Services: Principles and Technology. Pearson-

    Prentice Hall

    Pautasso, C., Zimmermann, O. & Leymann, F. (2008). Restful Web Services vs.

    Big Web Services: Making the Right Architectural Decision. Proceedings of the

    17th International Conference on World Wide Web (WWW08), pp. 805-814. Doi:

    10.1145/1367497.1367606

  • 1 4 5

    Vinoski, S. (2003). Putting the Web into Web Services: Web Services Interaction

    Models, Part 2. IEEE Internet Computing, 6(4), pp. 90-92. Doi: 10.1109/

    MIC.2002.1020331

  • 1 4 6 4 :

    Daigneau, . (2011). Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL and RESTful Web Services. Addison-Wesley Professional. - REST - SOAP/WSDL. -

    .

    , -

    .

    Mizouni, R., Serhani, M.A., Dssouli, R., Benharref, A. & Taleb, I. (2011).

    Performance Evaluation of Mobile Web Services. Proceedings of the 9th IEEE European Conference on Web Services (ECOWS2011), pp. 184-191. Doi: 10.1109/ECOWS.2011.12.

    - . -, - . ,

    (Quality of Service QoS)

    , .. , ,

    .

  • 1 4 7

    4.1

    A/A

    /

    1 )

    - - --

    ( -).

    2 )

    ,

    ,

    -.

    3 )

    SOAP - ,

    HTTP -

    .

    4 )

    M RESTful , , - URI

    , - .

    5 ), )

    SOAP

    -

    SOAP. , SOAP

    XML

    SOAP.

    , . -, 4.1 ( 1, 2), 4.3.1 ( 3),

    4.3.2 ( 4) 4.3 ( 5).

  • 1 4 8 4 :

    4.2

    A/A

    /

    1 )

    - -

    SOAP. H - XML.

    2 ), )

    - ,

    , , - (HTTP, XML). , - ,

    -.

    3 )

    -,

    - .

    4 )

    , , - - ,

    .

    5 )

    H WSDL

    , REST - BPEL

    .

    , . -, 4.3.1 ( 1), 4.6 ( 2), 4.7

    ( 3 4) 4.3.2, 4.4, 4.5, 4.7 ( 5).

  • 1 4 9

    4.1

    REST SOAP - . -, . ,

    REST --, SOAP

    .

    SOAP REST:

    ,

    SOAP HTTP,

    .

    WSDL - - ,

    (

    ). , SOAP

    WSDL - .

    REST SOAP:

    REST , -

    , . - -

    RESTful , - - . RESTful

    .

    REST URIs

    . , URIs -, REST

  • 1 5 0 4 :

    , - ( UDDI).

    . -, , - SOAP

    REST. , - 2 3 Pautasso et al. (2008)

    4.3.1 4.3.2 ,

    - SOAP REST.

    4.2

    Java processRequest Servlet

    WeatherServlet:

    protected void processRequest(HttpServletRequest request, HttpServletResponse response)

    throws ServletException, IOException {

    response.setContentType("text/html;charset=UTF-8");

    PrintWriter out = response.getWriter();

    String zipCode = request.getParameter("zip");

    WeatherReturn today = null;

    try {

    today = getCityWeatherByZIP(zipCode);

    double celsius = Math.round(((new Double(today.getTemperature())) - 32) / 1.8);

    ForecastReturn forecast = getCityForecastByZIP(zipCode);

    Object[] fc = forecast.getForecastResult().getForecast().toArray();

  • 1 5 1

    int num_of_days = fc.length;

    out.println("-

    ");

    out.println("H

    " + today.getCity() + " (zip code: " + zipCode + "):"+today.getTemperature()+"(Fahrenheit):"+celsius+"(Celsius)");

    for (int i = 1; i < num_of_days; i++) {

    Forecast f = (Forecast) fc[i];

    String theDate = f.getDate().getDay() + "-" + f.getDate().getMonth() + "-" + f.getDate().getYear();

    out.println("O"+theDate

    + " : " +

    f.getTemperatures().getMorningLow()+"

    "+f.getTemperatures().getDaytimeHigh()+"(

    Fahrenheit)");

    }

    out.println("");

    } catch (Exception ex) {

    out.println("zip

    code...");

    out.println("zipcode\""+zipCode+"\"

    !...");

    out.println("");

    }finally{

  • 1 5 2 4 :

    out.close();

    }

    }

    ,

    NetBeans

    getCityWeatherByZIP getCityForecastByZIP.

    , - . ,

    tutorial (http://

    netbeans.org/kb/docs/websvc/client.html).

    4.3

    -,

    . - - . - ,

    (SOAP, WSDL, UDDI, Web Services

    Choreography Definition Language ..) - - .

    , ,

    . - WSDL

    (bindings)

    . ,

    - ,

  • 1 5 3

    -, - , , ,

    .

    .

    , , - -. , Vinoski

    (2003), 4.3.1 4.6 - SOAP

    ( CORBA), .

  • .

    (Peer-to-Peer P2P) . -

    -, P2P -

    . -

    , P2P

    , , -

    P2P -

    .

    ,

    :

    P2P

    P2P

    P2P

    -

    P2P

    P2P

    .

    -

    5

  • 1 5 6 5 :

    P2P

    P2P

    Napster

    BitTorrent

    Gnutella

    Pastry

    P2P -

    ( )

    . , /

    . / / .

    P2P ( -

    ) (.. , -

    , , ..), -

    / (hosts).

    ,

    , -

    - (client-server),

    () () (Kwok, 2011).

    P2P -

    , , -

    ,

    / , /, -

    .

    , , ,

    ,

    . , , -

    , P2P , -

    , ,

    (Androutsellis-Theotokis & Spinellis, 2004).

    , P2P

  • 1 5 7

    -

    .

    P2P -

    , ,

    , -

    . P2P -

    , . P2P

    (Coulouris, Dollimore,

    Kindberg & Blair, 2011):

    P2P ,

    ,

    , ,

    -

    -

    -

    / ,

    ,

    , -

    /, .

    , P2P ,

    P2P -

    , (Androutsellis-Theotokis & Spinellis,

    2004):

  • 1 5 8 5 :

    P2P -

    ( , CPU, -

    ). P2P -

    , -

    , -

    .

    P2P . -

    P2P .

    P2P .

    , -

    P2P ,

    .

  • 5 . 1 1 5 9

    5.1

    P2P - , :

    (.. -, ..) .

    . , ,

    , -. , , (,

    ) P2P .

    . -, -, ,

    (persistent) .

    .

    (accountability),

    (anonymity) (censorship),

    (, , ).

    , , - . - / (chat/Instant Messaging IM),

    IRC, ICQ, Yahoo IM, MSN IM Jabber.

  • 1 6 0 5 :

    IP

    P2P IP

    (Voice over IP VoIP),

    ,

    . Skype - P2P VoIP. Skype

    P2P Kazaa,

    ( ) - . - ,

    Skype .

    ( CPU) P2P -. -

    , , ,

    . ,

    ,

    . - Seti@home ..

  • 5 . 2 P 2P 1 6 1

    5.2 P2P

    (lifecycle) P2P

    : (join), (query), (download)

    (depart). ,

    P2P .

    (

    ) , ,

    . , - . (, - IP ), - ( ). ,

    P2P .

    P2P ,

    IP

    . , P2P

    ( DNS)

    .

    , , P2P

    (application layer)

    ,

    .

    , P2P - (overlay network), ,

    . - (indexing)

    (peer discovery) P2P

    . , , ,

    IP (Lua, Crowcroft, Pias, Sharma & Lim, 2005).

    P2P , - . (links)

    . ,

    P2P ,

  • 1 6 2 5 :

    ,

    . P2P (unstructured)

    (structured),

    (Androutsellis-Theotokis & Spinellis, 2004).

    - ( ),

    ( ).

    P2P

    P2P - ( ). , - ()

    . ,

    - ,

    , .

    P2P ,

    , - (flooding),

    .

    .

    ,

    . -, , , ,

    , , . ,

    P2P , , ,

    -. , P2P - , , ,

    .

    P2P :

    (centralized) P2P ,

    -

  • 5 . 2 P 2P 1 6 3

    (bootstrapping) , - (directory)

    ( -), (.

    5.1). Napster, eDonkey

    BitTorrent.

    (pure) P2P ,

    , - ( servents: SERVers + clieENTS) (.

    5.1). , - . , -

    (infrastructure nodes). P2P - Gnutella ( v0.4)

    Freenet.

    (hybrid) P2P , - (supernodes super peers) (. - 5.1). ,

    ,

    .

    P2P .

    Kazaa,

    Gnutella ( v0.4) Gnutella2.

    P2P

    P2P , (, , )

    , , - . - ( ) - . , ,

    (.. )

    (.. ),

    ,

  • 1 6 4 5 :

    ,

    (. 5.1).

    5.1

    P2P : ) , ) , ) , ) P2P

    P2P

    (Distributed Hash Table DHT), -1 ( -) .

    DHT , DHT -

    1 (hash table hash map)

    ( - , , -) (.., )

    (.., ).

  • 5 . 2 P 2P 1 6 5

    .

    , ,

    . DHTs

    - , . - P2P Chord, CAN, Pastry

    Tapestry.

    5.1

    ( 200 ) - P2P -, , P2P

    .

    ( : 30)

    5.1

    P2P

    (); ( )

    .

    ) P2P - .

    ) ,

    P2P .

    ) P2P -.

    ) P2P ,

    ,

    .

    )

    (hops) .

    ) P2P

    P2P .

  • 1 6 6 5 :

    5.3 P2P

    H - P2P .

    Napster BitTorrent -, Gnutella

    , , Pastry - P2P .

    Napster

    1999, Napster (Napster, 2012) P2P

    . - , , - , , ,

    . P2P

    , ,

    , - . Napster - ,

    . ,

    . , ,

    (single point of failure)

    . ,

    (Recording Industry

    Association of America RIAA) - -, , , Napster.

    BitTorrent

    BitTorrent (Pouwelse, Garbacki, Epema & Sips, 2005)

    P2P 2001. - , 2009, 45-78%

    P2P (~27-55% ,

    ) (Schulze & Mochalski, 2009). - (.torrent)

  • 5 . 3 P 2P 1 6 7

    , , .

    - .torrent

    . - , , ,

    (tracker).

    ( BitTorrent)

    (swarm) /

    (seeds) (leachers).

    , ,

    .

    BitTorrent - . BitTorrent - . ,

    BitTorrent

    , , , ,

    . - BitTorrent DHT

    , -, .

    Gnutella

    Gnutella (Ripeanu, 2001) P2P , - , . - Gnutella (

    Gnutella) 2000.

    ,

    (, , ,

    ). , - ( - , v0.4 ) - ...,

    ( 7). ,

    5 ,

  • 1 6 8 5 :

    78.125 (=57) Gnutella.

    , ,

    . ,

    , - ,

    .

    (

    /),

    v0.6 , - (leave)

    (ultrapeer). . ,

    ,

    , ,

    , - -.

    ( ) - .

    Pastry

    To Pastry (Rowstron & Druschel, 2001) P2P ,

    DHT. - (keys) (data items values)

    ()

    ( ). ,

    ()

    .

    , .

    -

    . , ,

    . DHT - , (lookup

  • 5 . 3 P 2P 1 6 9

    (key)),

    . ,

    , ,

    ( SHA-1) , , lookup (key).

    ,

    , .

    , , lookup

    (key) , ,

    (Balakrishnan, Kaashoek, Karger, Morris & Stoica, 2003).

    Pastry (ID),

    . - 128-bit, 2b ( b=4,

    ). ,

    ,

    ID . n L (leaf set), L 2 ID n, L 2 ID n.

    , Pastry ,

    , - ID . log2b N

    (

    ) 2 1b - . i n ID i ID n i+1 .

    , n - .

    n ( ID - ), .

    , , , - () ID . ,

    n,

    .

    , -

  • 1 7 0 5 :

    log2b N . Pastry

    .

    Pastry (join protocol),

    - (bootstrapping node) ID

    .

    5.2

    (, ,

    (overlay routing)); -; , , - Pastry. 150 .

    ( : 20)

    5.2

    1 Pastry , -

    (ID) 9012.

    myfile.txt, (

    ) 2315. - ( 100 )

    , - .

  • 1 7 1

    P2P ,

    , -

    (

    -). -

    P2P

    -

    . ,

    P2P P2P -

    , , -

    (, ) . , -

    P2P ,

    .

  • 1 7 2 5 :

    ,

    :

    P2P ,

    - -

    P2P ,

    P2P

    (, ) P2P -

    P2P Napster,

    BitTorrent, Gnutella Pastry.

  • 1 7 3

    Androutsellis-Theotokis, S. & Spinellis, D. (2004). A Survey of Peer-to-Peer Con-tent Distribution Technologies. ACM Computing Surveys, 36(4), pp. 335-371. Doi:

    10.1145/1041680.1041681

    Balakrishnan, H., Kaashoek, M.F., Karger, D., Morris, R. & Stoica, I. (2003). Look-ing up Data in P2P Systems. Communications of the ACM, 46(2), pp. 43-48. Doi:

    10.1145/606272.606299

    Coulouris, G., Dollimore, J., Kindberg, T. & Blair, G. (2011). Distributed Systems:

    Concepts and Design. 5th edition. Pearson Education, NJ: Addison-Wesley

    Kang, C. (2011). Survey of Search and Optimization of P2P Networks. Peer-to-Peer

    Networking and Applications, 4(3), pp. 211-218. Doi: 10.1007/s12083-010-0082-2

    Kwok, Y.-K. (2011). Peer-to-Peer Computing: Applications, Architecture, Protocols

    and Challenges. 1st edition. CRC Press

    Lua, E.K., Crowcroft, J., Pias, M., Sharma, R. & Lim, S. (2005). A Survey and Com-parison of Peer-to-Peer Overlay Network Schemes. IEEE Communications Surveys

    & Tutorials, 7(2), pp. 72-93. Doi: 10.1109/COMST.2005.1610546

    Napster (2012). 15 2012, http://www.napster.

    com/

    Pouwelse, J., Garbacki, P., Epema, D. & Sips, H. (2005). The Bittorrent P2P

    File-sharing System: Measurements and Analysis. Proceedings of the 4th Inter-

    national Workshop on Peer-to-Peer Systems (IPTPS2005), pp. 205-216. Doi:

    10.1007/11558989_19

    Ripeanu, M. (2001). Peer-to-Peer Architecture Case Study: Gnutella Network. Pro-

    ceedings of the 1st International Conference on Peer-to-Peer Computing (P2P2001),

    pp. 99-100. Doi: 10.1109/P2P.2001.990433

    Rowstron, A. & Druschel, P. (2001). Pastry: Scalable, Distributed Object Location

    and Routing for Large-scale Peer-to-Peer Systems. Proceedings of the IFIP/ACM

    International Conference on Distributed Systems Platforms (Middleware01), pp.

    329-350. Doi: 10.1007/3-540-45518-3_18

  • 1 7 4 5 :

    Schulze, . & Mochalski, . (2009). Internet Study 2008/2009.

    15 2012, http://www.ipoque.com/sites/default/files/mediafiles/

    documents/internet-study-2008-2009.pdf

    Shen, X., Yu, H., Buford, J. & Akon, M. (2009). Handbook of Peer-to-Peer Network-

    ing. Springer

  • 1 7 5

    Kang, C. (2011). Survey of Search and Optimization of P2P Networks.

    Peer-to-Peer Networking and Applications, 4(3), pp. 211-218. Doi: 10.1007/s12083-010-0082-2. , ,

    P2P .

    ,

    . P2P

    - .

    Shen, X., Yu, H., Buford, J. & Akon, M. (2009). Handbook of Peer-to-Peer Networking. Springer. , , -, P2P -. -, P2P ,

    , , - (Service-Oriented Architectures SOA),

    , P2P, P2P ..

  • 1 7 6 5 :

    5.1

    ) . P2P - ( ) . - (.. )

    ,

    .

    ) . , P2P - (),

    .

    ) . -

    , , , - .

    ) .

    ,

    , - / .

    ) . - - (hops) -. , ,

    , ,

    .

    ) .

    - , - P2P -.

  • 1 7 7

    , !

    P2P . , -

    P2P -

    /

    P2P

    5.1 5.2.

    5.2

    - lookup (2315)

    1 ID:9012.

    N2=2067, N

    3=2300, N

    4=2312 N

    5=2315 ( ).

    , N2 1

    1, N

    3 2

    2 ...

    5, ,

    ,

    4.

    ,

    Pastry. , -

    5.3 , -

    Pastry, 10 -

    Coulouris et al. (2011).

  • 1 7 8 5 :

    5.1

    P2P :

    + (

    ).

    + ( - ).

    , / /

    .

    (single point of failure), - .

    P2P :

    + , -, -.

    ( - , , ).

    , -.

    P2P :

    + -.

    + ,

    , , .

    + ,

    .

    , -.

  • 1 7 9

    ,

    (, ).

    P2P :

    + , - .

    P2P ( - ).

    .

    .

    , , -

    P2P . , -

    5.2 , 3

    Androutsellis-Theotokis & Spinellis (2004).

    5.2

    /

    / .

    ,

    - . ,

    IP ,

    ()

    (.. IDs Pastry ).

    , (-)

    ( ),

    . , (hop) - Pastry /- .

  • 1 8 0 5 :

    . -

    , ! ,

    5.2 5.3 , 10

    Coulouris et al. (2011).

  • 1 8 1

    B

    Byzantine failure ( ): o - - (.. - , ,

    ).

    C

    Centralized P2P systems ( ): P2P - - .

    Clock synchronization ( ): - ,

    -, , .

    Concurrency transparency ( ): - ()

    , .

    Consistency protocol ( ):

    ,

    (.. ).

    D

    Directory service ( ):

    , - ( , ..

  • 1 8 2 :

    ), - .

    Distributed Hash Table DHT ( -):

    . (, ) -

    .

    Distributed Operating System ( ):

    - , - .

    Distributed system ( ): - , - .

    Domain Name Service DNS ( ):

    IP .

    Drift (): ,

    .

    F

    Failure transparency ( ):

    , - ,

    .

    GGlobal clock ( ): - .

  • 1 8 3

    H

    Hybrid P2P systems ( ): P2P

    , - (supernodes super peers).

    I

    Intero