!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ! ! ! !
Labo%1:%Implémentation%d’un%algorithme%distribué%
de%base%en%utilisant%les%sockets%
"#$%#&'(#!)*+,!
!
-./'0#1%23!4#!1#!%(56527!$(5%289#!#:%!4#!$(/;(5&&#(!7.9<!4#:!895%(#!57;/(2%=&#:!:9265<%:!>!
+? @(/5415:%!56#1!65;9#!!
)? @(/5415:%!56#1!65;9#!56#1!ABC!!
D? B/<:%(91%2/<!4E9<!5('(#!4#!(#1/96(#&#<%!#<!75(;#9(!4E5'/(4!!
F? B/<:%(91%2/<!4E9<!5('(#!4#!(#1/96(#&#<%!#<!$(/3/<4#9(!4E5'/(4!!
-#:!&#::5;#:!:/<%!%(5<:&2:!#<%(#!7#:!<G94:!49!(H:#59!625!7#:!:/1I#%:?!
B=589#!<G94!#:%!:#(6#9(!#%!172#<%!#<!&J&#!%#&$:?!K7!#:%!2&$7H&#<%H!:9(!9<#!&51=2<#!4233H(#<%#!4#!1#77#:!577/9H#:!59L!
59%(#:!<G94:?!
M<!<G94!#:%!(#$(H:#<%H!$5(!>!
- 9<!<9&H(/!4#!$/(%N!
- 7.#<:#&'7#!4#:!6/2:2<:!49!<G94!#<!89#:%2/<!
B#:!2<3/(&5%2/<:!:/<%!:%/1IH#:!45<:!9<!321=2#(!?%L%!O%#L%#P!5Q5<%!1/&&#!</&!>!voisin&x.txt?!x!H%5<%!7#!<9&H(/!49!<G94!#<!
89#:%2/<?!
RL#&$7#!>!
S/&!49!321=2#(!>!6/2:2<T*+?%L%?!B#!321=2#(!(#$(H:#<%#!7#!<G94!+!
B/<%#<9!49!321=2#(!>!
D! ! ! UU!</&'(#!4#!6/2:2<:!49!<G94!+!
+)V?+VF?+WF?+*+!UU!24#<%2325<%!49!+#(!6/2:2<!
+)V?+VF?+WF?++*!UU!24#<%2325<%!49!)X&#!6/2:2<!
+)V?+VF?+WF?+++!UU!24#<%2325<%!49!DX&#!6/2:2<!
-#!$(/;(5&&#!distributed_alg!Y!H1(2(#!4/2%!J%(#!5$$#7H!1/&&#!:92%!>!
distributed_alg3num_port3voisin&x.txt33INIT3
/9!
distributed_alg3num_port3voisin&x.txt33WAIT3
INIT!>!:2;<232#!89#!7#!<G94!#<!89#:%2/<!1/&&#<1#!7.#LH19%2/<!:5<:!5%%#<4(#!75!(H1#$%2/<!49!$(#&2#(!&#::5;#?!
WAIT!>!:2;<232#!89#!7#!<G94! #<!89#:%2/<! 5%%#<4!75!(H1#$%2/<!49!$(#&2#(!&#::5;#!565<%!4#!1/&&#<1#(!Y!#<6/Q#(!4#:!
&#::5;#:?!
voisin&x.txt!#:%!7#!321=2#(!892!4/2%!J%(#!79!$5(!7#!<G94!1/<1#(<H?!
Z<!6/9:!4#&5<4#!4.H1(2(#!7#!$(/;(5&&#!distributed_alg3O892!(#$(H:#<%#!7.9<!4#:!895%(#!57;/(2%=&#:!12%H:!#<!=59%P!#%!4#!
7#!4H$7/Q#(!:9(!9<!(H:#59!4./(42<5%#9(:!#<!9%272:5<%!9<!:1(2$%?!
-#!4H6#7/$$#&#<%!4#!1#!$(/;(5&&#!4/2%!:#!352(#!#<!BN!$Q%=/<!/9![565?!
!
! !