1 - - PDF document

1
SMART_READER_LITE
LIVE PREVIEW

1 - - PDF document


slide-1
SLIDE 1

1

  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
  • ✞✟✞
  • ✡☞☛✍✌
✏✒✑✔✓✖✕✘✗ ✙✚✓✜✛✣✢✥✤✧✦★✕✩✢✪✗✬✫✖✭★✦✔✮✣✓✯✕✰✗✱✦✖✫✳✲ ✴ ✵✷✶✖✸✺✹✼✻✔✽✘✾✩✵✥✿✪❀✬✽✖✾✼✿✖❁✷✿✷❂ amount ❃✷❄✜❅✩❆❈❇✔❉✖❊✩❋✰❄✷❆✼❆✣❄❍●❏■✰❑✰❄❍❆▲❅★▼✷❄✜❉✔❄✔❅✣◆❖■✯❆✖P✔◗❍❃✥❄ ❘✣❙❍❚❱❯✯❲✼❲✰❙✷❳❩❨❭❬ ❙✔❪❏❫✖❴❛❵✩❜✷❙❛❲★❙✥❘❞❝✰❙✷❘❡❲✔❢✱❪❣❙❛❤ ✐ ❥❣❦✖❧✔♠❩♥✼♦✥❧q♣✥r✱s✬❧✔t✯♥✧✉✇✈❣s ♥✧①✖❦✯②③✈④②✣❧✯♠✰⑤✔❦✰t✖♠✰❧✜①✖②✣❦✔⑥⑦♥✩♦✷❧✜♠✰❧❍②⑨⑧★❧✷②❡⑩ ❶ ✉✒♦✔✈✖♥✘s✬①❷♥✩♦✥❧✜t✔❧✯♥✼✉❸❦✔②✰❹✚❺✔❦✯❧✯♠❷❥❣❦✖✉❸t❛✉❖♦❻s❼r ❧❛♥★♦✷❧❏s✬t★⑧✖❦✯♣✼✈✖♥✖s✱❦✰t❽s ♠✜s✬t❛⑤❍②✣❦★❺✷②✣❧✯♠★♠❩⑩ ❶ ❾✷❿✖➀➂➁ ➃❩➄★❾➅➁ ➃✘➆✯➇✣❿✰➈✷➇❞➉❍➊✚➊❡➋✷➌q➍❏➎➏➁✬➐❛➑➒➉✰➓✩➉✘➍✪➁✬➐✳➔➣→↕↔➙➍ ➛ ➜✒➝✔➞✖➟✧➟✩➠✖➠➢➡ ➤✳➥✖➦✇➧ ➤✩➟✧➟✣➠❛➨❣➠✜➩✣➥✷➫▲➠✖➟✣➥➭➧ ➯✰➲✰➠✔➳⑨➞✔➟✖➧✱➠★➯✖➤❩➵ ➸ ➺✼➻✼➼✳➽✩➾✔➚✰➪✒➶★➹ ➽★➘✷➴➬➷❍➮③➱➢✃❍❐❮❒❮❰❣➚✣Ï⑨➚Ð➱✥Ñ✧Ò✥❒➣➚★Ó⑨Ô Õ×Ö✯Ø➭ÙÚÖ✖ÛÝÜ✼Þ ß✼Ö✰à áãâ✣ä⑨å❈åçæ✖è❞é❖éêåëæ✖è❞ì❍í î ï✒ð✔ñ✖ò❡ñ✷ó✣ô✜ò✩ð✷ôÐõ÷ö✱ø✳ö ò❞ñ✔ò✰ö✱ù✰ú✖û✳ù★ü✜ó✣ô❍ø✧ù✖ò✼ô❏ö ú✖ý✰ù✯þ✼ñ✯ò✖ö✬ù✰ú❣ÿ★ñ✔ó✣ô✜ò✩ð✥ô✷ó✣ô✘ñ✔ú✁✜ñ✯ò③ñ❻õ õ✄✂

client server remote invocation

amount = 1000; account.withdraw(amount);

network

☎ ✆✞✝✠✟☛✡✌☞✁✝✎✍✑✏✓✒✌✡✕✔✞✖✗☞✘✍✙✡✓✏✛✚✢✜✤✣✠✏✕✔✌✥✦✆✞✡✘✏✕✡✘✧✓✜★✆✞✝✠✟☛✡✌☞✄✝✩✍✑✏✌✒✓✡✕✔✁✖✘☞✘✍✙✡✘✏✗✪
slide-2
SLIDE 2

2

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✎✑✏✓✒✕✔✗✖✓✘
✙✚✔✓✛✕✒✜✛✣✢✕✤✦✥✚✥✣✧✩★✪✢✓✙✬✫ ✢✮✭✯✥✯✰✣✱✲✢✳✒✴✱✵✔✓✶✑✙✷★✸✔✓✥✹✢✺✱✗✧ ✔✴✫✗✻✣✱✲✏✕★✽✼ ✾✯✿❁❀✓❂✯❃❅❄✦❆✲❇❉❈❋❊❍●❏■❉❑❍❈▼▲ ❇❋●✽◆✦▲ ❖❋❊P■❘◗❙❊❚❃❱❯❲❯P❳ ▲ ❨❲❑❍❈▼▲ ❩✵❇❲◗❭❬✬▲ ❈▼❪✲▲ ❇❫◆❴▲ ◗❵❈❋■▼▲ ❛✲❜▼❈❉❊✵❝✳❞✦❊✵❈❉❊✲■❵❩❲●✵❊P❇▼❊❍❩❍❜❍◗ ❡❣❢❋❤❍✐ ❥❙❦✵❢❲❧✴♠✲❢❋♥❘♦ ♣❏q❏rts✕✉❵✈P✇❙✈ ①✣② ③❉④❍⑤▼⑥❍② ⑦❋⑧✹⑨✯⑨❣⑨ ⑩❏❶▼❷❸❷❁❹❲❺▼❻ ❼❘❽✣❾❿❻ ❶❏❺❉➀❉➁❣➂❏➃❏➄✲➅❲❹❙❽❲➅❵➆❭➇❙➈✯➈✣➉❲➊ ➋❚➌❉➍P➎❋➌❍➏ ➐❙➑➒➐❘➓❍➔→➔✦➣❏↔➙↕➛➍✵➜➞➝❘➟✵➑t➠✯➡➞➢✗➤✯➋➥➣❏↔❙➌❍➟✲➏ ➝❵➑P➌❋➝❉➓❍↔❵➑✹➦ ➧✺➨❍➩✚➫✣➭❍➯❘➭❚➲✗➳✑➵ ➸❲➺P➻❏➼→➽❘➾P➚❙➪t➶✺➹✲➘ ➴❙➷➒➽❘➾✵➽▼➷P➬▼➸ ➮✯➱✵✃❲❐❭❒❏➱✕❮Ï❰✯➱❍➱✹Ð❭❮ÒÑ✵➱ÔÓ Õ Ð❙➱✵ÖÔ❮Ø× Ó ➱✵✃▼✃❲Ù❍Ð Ú❏ÛPÜ❏Ý✹Þ✣ß✯àâá❍ã❣ä Ü✗Þ❋å æ❁ÜPç✦è✵é❙ê✯ëâì í❋î❍ä Ý❘ïPëPï✲ð ñóò❏ô✷õ✺ò✲ö❵÷❍ø ù❍òPúÔû❲ü❏û❲òPö❘ú ýØþ❋ÿ✁✄✂✆☎✝✁✞✠✟✡✂✆✞☞☛ ✟✄✌➥þ✆☎✎✍✏☎✑✟✓✒✔✟✓✕✖☎❘þ✖✗✙✘☞✚✡✛✢✜✤✣✥✟✏✞✖✟✢✦ ✏✧☞✟✡✂✩★✪✄✂☞✫❋þ✬✘ ✭✯✮✱✰✏✲✑✳✵✴✖✶✓✷✬✲✓✸✹✷✺✮✻✰✄✲✢✮✙✼ ✰✢✽✢✾✿✮❀✰✏✲✎✳❂❁ ✼❀✸✠✸✙❁ ✰❃✼ ❄✄❅❆✷✬✲❈❇✔❉✹✸✙✼ ✷✏❄❋❊❈✷✄❄●✸✱✰✓❄●✸✱✾✺❅✎✷✬✲❍❁ ❉✄❊❈■❏✷●❅❑❉❏▲✡✰▼✸✆✸✻✰✏✲❑◆●❉✑◆✢✰✏✲❈❖ P●◗✆❘✖❙✠❚❱❯✿❲❆❳✿❨✁◗✆❘✆❩✆❬ ❭✖❯❑❪✢◗✖❘✖❙❱❫✿❘✆❙✎❴ ❵✡❛✠❜✝❝✓❛✆❞✎❡☞❢❆❣ ❤✑✐✆❥▼❦✠❥♠❧❈❦✎♥✆❥✎♦ ♣❱qr♥✖♣s❧✠♥✆❥✠t ♦ ❧❈❥✹✉❱❧✖❥♠✈✆♦ ✐✖♣❑✐✠❤❑✇❱①✆❧✖✈❆❧✔✈☞t ♦ ②☞❧✆✈✠③

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ⑤⑦⑥
  • ⑨✄⑩
❶✝❷▼❸❍⑩✻❹❻❺❽❼✔❾▼❿➀❶✝➁➃➂➅➄✿➆▼❶r❷s❸✿❾r➂➅❶✔➄✯⑨✖➇➈➇➊➉✄➋❑❸➍➌✓❸✔➁❻➂ ➎➀❺➊❹☞➏

return_amount = account.withdraw(20);

➐ ➑✹➒✩➓→➔➣➓r↔▼↔▼↕❑➙✝➓ ‘withdraw(20)’ ➛➅➜➝➜❑➞✝➟✿➠❽➠✥➡✯➡➍➢❑➤✥➞✝➥s➠➧➦r➥✿➥s➡✝➨❑➟✿➠ ➩✄➫ ➡✝➥▼➦ ➫✻➭❻➯✝➲ ➡✔➥❑➞✝➳➵➨ ➲ ➞✯➥▼➦ ➫➸➫r➩ ➛✻➺ ➯ ➞ ➲ ➦✿➠r➛➅➻s➞ ➯ ➦ ➲ ➦r➳❻➛ ➼➍➺ ➭☞➽

return_amount = withdraw(account, 20);

➾ ➚➶➪➀➹➣➘r➴✺➪✤➷➅➬❑➮▼➘✝➱✹✃r➴✿➷❐➘r➬✯❒➀➚✢➘✔➴✥➘✔➱s➘➵❮✿❰❋➪rÏ➀➷ Ð➀➬sÏÒÑ➀✃✿➮s➪Ó✃✩➷✻➹➣➪✝❰Ô✃✿➴Õ➱✹✃➀➚▼➚✡Ö❏➷➅➬sÐ ×✹Ø✩Ù✯ÚrÛ❑Ú❋Ü Ý✿ÞsßàÝrá➊Úãâ✏Ü Ý✝ä✹Ú❍Ü✻åçæ❐Û✿è▼ÝräsÚ✿×ræéÝ✝Û➈×✺Ýê×▼Ø✩Ùãë❻æ ìs×sí❑æ✱î✩ï❑×✺Ù✝ë✤äsÝ✔Û❑×✹Ù✔ð❍×✔ñ ò❀ó ô✩ó✙õ✔ö➧÷➍ø✝ò❐ù❑úÓ÷Óû▼÷❍ü➸üsý✹þÒ÷Óÿ❻ò sý✂✁❑ò☎✄✝✆❑ý✺ô✝ÿ✤ù❑þ✔ÿ❍ô➵õ✂✟✞➍þ✠✆➍üéÿ☛✡☞✆✌sý✍✄➀ô ü❀ò❀ø❑ô ö ÷➍ø➀ò➅ù❑úÓ÷ ü þ✔û▼÷❍ü❑û▼÷❍ü➸ü✻ó ✎ ✏✒✑✠✓✕✔✗✖✂✔✝✘✂✙ ✚✜✛✝✢✤✣✦✥ ✧★✣✩✛✜✪✬✫✭✥✯✮✂✮✰✪✟✱✟✪✟✲✠✳✴✪✶✵✷✪✤✣✸✚✹✪✠✪✟✲✍✢✬✳✴✪✟✲✺✣✻✱✼✢✒✽✾✥❀✿❁✪✒✫✬✢✴✲❂✫✬✢ ❃✭❄ ❅✹❆✻❇❈❄❊❉✭❋●❆■❍✒❃✬❅❑❏✗❅✹❆▲❍✴▼ ◆

account

withdraw(20)

slide-3
SLIDE 3

3

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

✄✆☎✆✝✟✞✠✄☛✡✌☞✎✍✑✏✑✝✓✒✕✔✗✖☛✔✠✏✘✝✙✡✛✚✕✜✢✏✤✣✥☎✦✄☛☎★✧✪✩✎✍✦✏✘✄✎☎★✄☛✡✫✄☛✍✑✔✬☞✠✩✭✒✮✏✗✔✬✯✰✣✓✄✎✚✱✝✎✲✠✝✓✒✦✳☛✡✴✩✑✖ ✵✭✶✸✷✺✹✌✻✭✼ ✽✎✾❀✿❂❁❄❃✙❅❇❆✗❈✎❆✠✽✤✶✙✹❊❉ ❋
  • ✠❍
✹✌■✎✻✦✽✘✶✓❏✴❆❑❈☛❆✠✽✤✶✙✹▲❆★▼✙✷✙❏❑✶☛◆❖✵★❈P✻✠❆✦✶✓❏◗❆❘✷★✽✫✷❙✼❚✼★✽★✾❯✹✫✶ ❋ ✷❙✼❚✼☛❏✗✶✆❆ ❍ ✻☛❏
  • ✶✆❆✌✷
  • ✦●
✶✆❆✑❆✙✾❯✵❄✼✢✶❲❱✎✹❳✷✎❨✠✷✦❩☛✶☛◆❬✵★❈ ❍ ■✆✶✓❏◗✷★✽✆✾❀❨✦❩✸❆✘❈✎❆✑✽✑✶✙✹❪❭✪✾❯❫❴✶✓❫ ❵✆❛❀❜✠❝❡❞❴❢❤❣★✐❙❛❀❜✠❥❬✐★❦♠❧✦✐☛❜✑❥✦♥✗✐✓❞ ♦ ♣ q✠r★s★t✘✉✇✈✙①❑②✥①❑③★④✦q✟⑤❴④⑥✈⑥q✙⑤❴④✦⑦❄⑧✢②⑩⑨✙①❑r✆❶★②✆q✑q✙❷✎❸✭r✎✉❹②✎❺✑②✓①❊⑤❻④✦t✤②✓①✗❼❽⑨✙①✮r☛❶✦②✆q✤q ❾✠❿☛➀✌➀➂➁★➃✓➄❴❾✑➅★➆✆➄❴❿✎➃➇➄ ➈✸➉✦❿★➈✑➈✙➄❯➊➌➋✢➍ ➎ ➏✆➐❀➑✠➒❡➓❴➔❤→★➣❙➐❀➑✠↔❬➣★↕➙↕✆➛❡➐❚➓❴➜☛➝✗➔ ➞✪➟➡➠❴➢✓➠➥➤★➦✦➧✎➨➂➩✎➫✦➭✑➢✓➯➳➲✘➵✎➲✠➭✤➢✙➨✛➢❡➟❴➭✑➸✭➢✓➯❘➯❑➫★➺✦➲❘➧✓➯ ➻❙➼✆➽✆➾⑥➚✦➼✎➪⑥➶✗➹★➚✓➘✆➚✦➼➷➴❴➚✦➪✤➽✓➶✘➬✫➽☛➻➮➴ ➱★➪✤➽✸➾✠➪✗➱★➪✤➽P✃✦➼★➾✑➾✙➴❯❐➌❒✢➽✟❮✰➽✓❰ Ï✓❰❚➘✎➚✦➼⑩✃✦➱☛➶❑➪✆➴ ➱❙❒ Ð✑Ñ✓ÒÔÓ❴Õ✎Ö❑×❲Ø✆Ù❡Õ★×✸Ú✘Û✺Ü✆×✎Ú✑Ý✇Û✓Ö✑Þ✸ß❡Ö❑×✆Ñ✭Þ❊Ù❙Û✎Ý❹Ü✬×✎Ú✑à✆á❯â ã Û✆Ü✆×✟à✠Û✎Ü✦Ú✆Ò✢ä✙Õ✠Û✙Õ✠å✌Ñ✆Ù❡Ù❄Ö❑×✆å✑å✑Ñ✙ß➌Ó✢×✟æ➂×✙æ❳Û✓Ö❽ç ã à✑Ñ❡Ó❚Ó➡Ò❴Ü✠ä✺Û✎è✑×✓Ö✘é✓×✆Ñ✆Ù❖Ò å⑥è✠×✓ÖêçëÓ Û✎Ý✕Ø★Ýì×✟Ù➌Ò✢å✠Ú✆Ò❴Ü✦ä✙Õ✭Ò å★é í î✠ï✎ï☛ðòñ✦ó◗ó⑩ó❑ô✘î✠õ✘ñ♠ö ÷❑õ✤î☛ö❡õ✤î☛ö❻ö ó ø★ù❀ú û✆ú❻ø✘üýû✠þ◗ÿ✁✄✂⑩ù ☎✝✆✞✠✟☛✡✑þ✘ù ✝☎ ☞ ✌✎✍✑✏☛✒✔✓✖✕✄✗✖✘✙✘✚✓☛✒✖✛✜✛✢✛✜✣✄✗✠✤✝✒ ✥✧✦✩★ ✪✁★✫✥✄✬✖✭☛✮✠✯✞✪✝✰✞✰✑✱✳✲✴✮✑✱✵✬✖✭☛✮✠✯✑✪✝✰✜✰✶✯✜✮✠✷✸✷✺✹✞✻✁✦✼✯☛✽✄✲✝✦✾✮✞✻✝✰

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

❁❃❂❅❄ ❆✁❇✫❈❉❄✎❊●❋✔❂✧❆✝❍✙■✁❍✙❁❃❍✙❂✖❏▲❑✧❍✚❁▼❈✔❂✧❆✄❊❅◆❖❏✝P✚❏✖❆✝❊◗❁✶❏❙❘❚■✧❍✙❯❱❊✔❏✙❲ ❳ ❨✖❩✚❬▼❭✙❪✧❫✝❴❅❵✶❛✞❜✚❛✖❫✄❴◗❬❝❛▼❞❡❵✞❴✢❢✁❩✁❫❃❛✁❣✚❞❡❵✜❴✚❤❥✐✁❜❦❞❉❧♠❧✁❪✖❛✧❴❅❵✴❛❡♥❡♦♠♣✎❴❅♣q♥✁❤r♦✾s✖s✔❴❅❵✞❴✚❢✧❫ t✠✉✧✈❅✇✴✉❦①✼②✧③✄✈❅✇✴④✔⑤✧③▼⑥⑦①✾③✠⑧⑩⑨r①✾❶✖❶✔✈❅✇✜✈✚②✁③▼②✁❷✔⑨❱✈✔✉❸④✁③❹④✙②✄❺✢❷✙②✁✈❼❻✁❷❅①✫②✧③❙①✾②❙③✁①✼❽▼✈ ❾ ❿✧➀✔➁❹➂❱➃♠➃✚➄✞➅✔➆✖➀✚➇✙➄✞➈✧➅✔➆❙➉✶➂✖➊●➂❉➃✎➋➌➂✠➊✔➆✢➍❡➅❙➂✔➈✧➈✧➅✔➆✠➆◗➎✩➍➏➃✎➅✢➁✑➀❙➂✔❿✠➊➐➎✾❿✧➁✄➅❅➄✜➂✁➈✧➁✔➎✾❿✧➑ ➅✚❿✧➁✔➎✾➁✜➊ ➒ ➆✖➀✁➓✁➁✝➋➔➂◗➄✞➅→➄✞➇✁❿✧➆❦➎✾❿❙➈✖➀✙❿✔➈✁➇✚➄✄➄✞➅✚❿✧➁❸➣◗➄✜➀✙➈✧➅✔➆✠➆✧➅✔➆❸➀✚❿↕↔➙➎✎➓✧➓✁➅❅➄✜➅✚❿✁➁ ➣◗➄✴➀✚➈✁➅✔➆✝➆✖➀❅➄✴➆❸➀✚❿↕↔➙➎✎➓✧➓✁➅❅➄✜➅✚❿✁➁▼❿✁➀✔↔❱➅✔➆❡➛❅➎✩➜✎➅❅➜q➛ ➝❹➞❅➟✎➠✁➡✫➢❡➟✾➤➥➢✁➦❅➡✫➧✖➠✠➨➐➦✔➩➭➫✧➦✙➧✖➠✖➯✑➦❉➟ ➲ ➳✔➵✠➸❼➺✧➳◗➻✜➼❃➽✙➾➚➼✄➪❅➶❙➹✑➸✚➹✖➼✝➶◗➘➴➘❹➳✄➸❦➾✠➳❉➷➮➬◗➷✼➵✔➱❉➶◗➺✁➶✚➵✔➱❱➶✚➵✧➼✙➬ ➸⑩✃❚➵✧➽✙➱❱➶✔➹❡❐ ❒✁❮✙❰✄ÏÑÐ◗Ò✠Ó✙ÔÖÕ❡×ÙØ✾❮❅ØqÕ Ú❝Û❅Ü✎Ý✔Þ✩ß❡Ü✾àáß✧â❉Þ✼ã✧Ý✄ä❥â✁åæå✁çèÞqÜ✾Û✙é✑à ê✙ë✁ì ß✔ç❡é✞Ý✁Þ✩ç❱Üíå✔ç❱Þ♠Ü✾Û✚é✝à î❡ï✑ð➥ñ✁ò✔ó✠ó✔ô✫õrö✾ð ÷ ø✔ù✔ú✔û❼ü✧ý✚þ❉ø❦ÿ✶ù✙ü✖ù✁✙ø✄✂✆☎✞✝✟✂➚ÿ❹ø◗ÿ❃ý✡✠☞☛✍✌✎✝✖û❅ø✏✠✞ø✒✑✖ý✏✠✜ø❦ü✁ý●ú✖ý✙ü✎✝✄☎✞✡✓✖ý✔✓✕✂✗✖ ☛ ✘✄✙✚✙✜✛✣✢✄✤✥✤✥✘✗✦✍✧✞✢✩★✪✢✡★✪✫✗✛☞✬✮✭✯✢✒✰✲✱✎✢✡✳✁✴✄✵✶✫✄✷✎✤✸✘✗✛✹✢✺✤✁✻✡✘✡✛✹✢✔✙✼★✸✢✡★✽✫✡✛✾✬✿✤✟✬✔✤✕✴❀✢✡★❁✤✗❂ ❃✁❄✔❅✗❆✹❇✔❈❉❈✏❅✁❊❋❅●❃✕❍✎❅✒■✎❇✄❃✗❏✄❑✎▲✄❊✸■✕▲✄▼✕❇✏❆✹❇✔❈❖◆✶❑●❊✥❄✍◆✞❃✩P✞❇✔■✎❊❀◗✔❆✹❇✏❘ ❙ ■✥❅✚P❚P❯◆✶❑✕❱✿▲✒▼✥❇✏❆✟❄✏❇✄❅✄❈✼❲❁❅✕❳✼❨✗❇✿■✎▲✒❑✎❃✔◆❩❈✚❇✏❆❬❅✡❨✍P✞❇✲❏✗◆❚❭ ❇✏❭❪❏✁■✕❅❫P❚P✒❄✔❅✁❃❴❊✟▲●❱✔▲✺▲✒◗✎❊✺◆❩❑ ❊❀❄✏❇✩❑✁❇✒❊❀❵❛▲✗❆✥❜✗❏✄❄✡❅✎❃❝❊❋▲❉❆✹❇✄❅✄■✁❄✼❆❋❇✡❲✪▲✁❊✥❇●❃✟❳✔❃✕❊❀❇✡❲●❏✁■✎▲✡❲❞❍✄❇✒❊✟❇✄❃●❵❡◆✶❊✥❄ ❢✁❣✕❤✏✐✏❥✸❥✹✐✒❦✔❧✎✐✄♠✕❣❋♠✗♥✕♦✒♣✎qr❤✔♦✁♠✺❥✹✐✒❣✕❧✄❥❋♣
slide-4
SLIDE 4

4

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✁✄✂✆☎✞✝✠✟☛✡☞✁
✌✍☎✍✎✍✁✑✏✓✒✔☎✕✟✖✡✘✗✍✙✔✌✔✟✛✚✞✙✓✁✢✜✣✒✖✎✤✟✛✝✥✙✔✌✆☎✕✦✧✏✠✟☛★✩✙✪✂✍✙✬✫✪✟✖✡ ✭ ✮✰✯ ✱✲✯ ✳✵✴✷✶✹✸✰✺✻✶✽✼✾✯ ✳✵✿✵✶✽❀❂❁❃✮✽✯ ✶✹✳❅❄ ❆ ❇❉❈✕❊●❋✵❇✰❍ ❈✹■☞❏▲❑✾❍ ▼✵◆❂❏▲❖❂P✰❋▲❍ ❏✹▼✵■ ◗ ❘✓❙✬❚✤❙❱❯✍❚✔❲✤❳✔❨✔❚✍❳❩❲✤❬❩❯❭❚✞❪✥❙✬❚❫❙✠❲✽❬✛❚✔❲✰❙✪❴✍❯✬❵✬❛✠❲✹❚✕❬✖❘❜❙❩❨✪❲✽❛❩❯❝❯❱❚✞❪✓❬✛❴❩❬✪❚✕❞✷❛✓❲❝❡ ❢✖❣❩❤✍✐❦❥❝❧✧♠✠✐✧♥✤✐✥♦❂♣✪♥✹✐❩❣❩❥✕✐✖q✧❣❩❥r❥✞❢✠✐✘♥✹✐✥st❧✪❥✕✐☛✉✔❧✪q✈✐①✇✖♠✓②✔❥❭❢✠❧❩③⑤④✬❢✠❧✥②✠⑥⑦q ⑧✬⑨✓⑩✄❶✬❷❝❸✓❹✰❺✛❻✠❸❦❷✬❹✹❸❩❼✬❷❝❸✖❽❿❾➀❸✓➁ ➂✓➁✢➃✓➄✑⑩✄❶✥➅✔❸✖❽➆➄✑⑩⑦❺✞❷✕❺❩➇➉➈ ➊ ⑩✄❶✍➋✞⑨✖➌✍❼✔❷✪⑩⑦⑨✪❶✍❺➎➍t❼✞➏☛❷✤❼✠➅✍❸➐➄ ⑨❩❶✔➂✥❸✓❹✍➃✪➍✩❼✍➏☛❷❝➑✻⑩⑦❺✆❸✪➒✍➒✬❸✖➌✔❷❫⑨✖➓✖❹➔❺✤➏✖❺✍❷✕❸✥➍→➃✬❸✓➁ ➂✓➁➣➃ ❽↔⑨✛⑧✔❼✥❹✽❷✹❺❱⑨✪➒❱⑨✖➓✖❹➔❺✕➏✖❺❝❷✞❸✥➍↕❹✹❸✪➙✪➓✠⑩➛❹✤❸❦❷❩⑩➜➍❫❸①➄ ➏➝❹✽❸❩❺✬⑧✬⑨✪❶✍❺✔❸❩❺✠➃✬⑨❩❷❝➑↔❸✓❹✹➞➟⑩⑦❺✔❸①➃ ❷❝➑✓❸✔➏✻➃✔❷✍➑✓❸✥➍✩❺✔❸①➄ ➋✍❸❩❺✆➍✩❼✍➏☛❷✤❼✠➅✍❸❦❼✪➌✍❷❩⑩⑦⑨✖❶✍❺➎❾➠❸✓➁ ➂↔➁➣➃✬❷✬⑩➛➍❫❸✥➡❅⑨✖➓✔❷r⑨✪➒✆❶✬❸✪❷✞➞➢⑨✓❹✞➅ ➌✍⑨✪❶✬❶❩❸✖➌✍❷❩⑩✣⑨✪❶✍❺✠➃✥❹✹❸①➄⑦❸❩❼✔❺✥⑩✣❶✔➂→⑨✪➒❜➄ ⑨❩➌✥➅✞❺❱❸✪❷❝➌✪➁➛➇ ➊ ➌✍⑨✪❶✬➌❩➓✪❹❝❹✤❸✖❶✬➌✕➏❿❻✠❸✖➌✍⑨✖➍r❸❩❺❭❼❩❶✧⑩⑦❺✞❺✬➓✔❸❩❺✠➃✍❺✬➑✥❼✥❹✹❸✖❽➝❽✥❼❩❷✹❼✛➑✥❼✔❺❱❷✤⑨✧❻✓❸ ⑧✥❹▲⑨✪❷❝❸✖➌✍❷❝❸✖❽ ➊ ❺✍⑨✪➍➤❸❦⑨✪➒✆❷❝➑✓❸❩❺✔❸✘⑩✣❺✞❺✍➓✬❸❩❺❱❼↔➄ ❺✞⑨➎❼✪⑧✪⑧↔➄ ➏☛❷✕⑨➎❺✥⑩✣❶✔➂①➄⑦❸✛❶✔⑨✖❽↔❸❩❺❱❷✞➑✥❼✬❷✆❹✤➓✬❶ ➍r➓✓➄ ❷✬⑩➜⑧↔➄⑦❸✧⑧✥❹▲⑨✪➌✔❸❩❺✞❺✔❸❩❺✆➌✍⑨✪❶✬➌❩➓✪❹❝❹✤❸✖❶✔❷✪➄ ➏✛⑨✓❹✆⑩✣❶→⑧✔❼✖❹✽❼↔➄➣➄⑦❸①➄ ➊ ➍✆⑩✄❽✈❽☞➄⑦❸✖➞➢❼✠❹✽❸ ⑧↔➄ ❼✬❷✕➒✔⑨✠❹✹➍❫❺➤❼✪❽↔❽➥❹✤❸❩❺❝❺❱❷✞➑✓❸❩❺✔❸❿⑩ ❺✞❺✬➓✬❸❩❺❭❷✕⑨❦➋❝❼✥❹❃➏➥⑩✄❶✞➂ ❽✈❸❩➂✠❹✹❸✖❸❩❺

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

➨⑤➩✍➫✍➭❜➯ ➲→➫➝➳✰➵❩➸➻➺✤➭▲➵➼➯⑦➽✹➾✹➺✕➚✤➫✔➭❝➯ ➺✞➽❝➪ ➶✍➹✤➘➉➴▲➷➬➹➔➮ ➱❅✃❂➴✽❐✵❒✰➷▲➮ ➴✹➱❮➮ ❰☞❒➻➘✻➹✕❐❃Ï✽❒✹➱✽➮ ❰❂➘✘Ð➠➮ Ñ ➹❝Ñ✰❒ Ò✽Ó❉Ô✰Õ❅Ô✰Ö▲Ô✹× Ø✪Ù❉Ú✲Û✞Ü⑦Ü Ú✽Ý❱Ù✵Þ✽ß➟à❂Û✕Ü⑦Ü⑦á â❅ã✲Ú▲ä å❅æ✕ç➬è✽é ê✵æ✹åìë✢í✽î✷ï✰ç❉í✹ê✵æ✹ð✍ñ✰ç❉æ✽åòí✽ç✻í✽î➢ó✻æ✤ô✵õ✽í▲ð✕å❃ö ÷✰ø❂ù✤ú➥û➆ü❂ù✹ý➬þ✠÷▲ú✰ÿ☞÷✁✄✂✆☎✞✝✁✟✁✠ ✡✵û☞☛✌☛ ✝ ✍✏✎ ✑✓✒✕✔✖✎✌✗✁✘✞✒✚✙✛✍✢✜✓✣✆✤✦✥✖✘✞✒✚✙✧✔★✑✚✩✁✑✓✒✚✙✛✤✪✑✖✫ ✬✮✭✰✯✁✱✞✲✚✭✛✳✵✴✷✶✷✸✹✶✰✺✛✻ ✼ ✭✛✳✓✲✽✼ ✳✕✾✷✯☞✿✕✭❀✴❁✶✰❂★✭❀✲✷❃✆✯✁❄✢✯❀✳✵✶❅✴✕✭✛❆✚✾✷✭✧❆✆❇✧✼ ❈ ✭✛❈ ❉✁❊✌❋
  • ☞❍✓■✕❏✖❑✕●✧▲◆▼✖●✧▲
❖✆P✖◗❁❘✆❙✞❚✞❯ ❱✓❲ ❳✓❨✁❩◆❨✆❬✏❭ ❪❀❫✵❴✌❵ ❛❝❜✷❞✧❡✚❢✷❞✛❡★❣✪❤✓✐❥❡✚❞✁❤❧❦ ♠ ♥✞❞❥❤✹♦✞♣✖❣✦q✆❞☞❡sr✆t❅✉✏♠ t✞t✷❞✛❡✚❞✛♦✓✈✪❜✓❞✧❡✚❢✁♠ ✇✕❞✧❜✵①②❣s❤✓✐③♠ ❣✵④✛❦ ❞✛❣s❞❧♦✷✈✪❤✹♦✞♣✖❣❅q✆❞✧❡ ⑤✁⑥✦⑦✏⑧ ⑥✓⑥✓⑨✧⑩✚⑨☞❶✷❷★⑤☞❸✞❹❺⑨✧❻✞❷✚❼✞❽②❾ ❿ ➀➂➁☞➃➅➄➇➆➉➈✪➊➅➋✧➊➌➊➍➄ ➎➐➏✆➊✏➑✽➆✛➒✆➊ ➓ ➔✧→✁➣✛↔✛↕➍➙✛➓➛➣☞➔➉➜❧➝✖➣✛➙✖➣✛↔✛➣➟➞s➠ ➡❺➢✆➤✖➥✚➦✆➧❀➥◆➨✁➩❁➩✰➫ ➭✷➧❥➭✷➯❀➲➵➳➸➦✁➥✞➺✧➫ ➭✷➧✹➻✷➦✁➼✧➯➽➫ ➾✦➚✓➨✛➫ ➥✆➪ ➶❥➻✓➦❀➩❁➹✛➪ ➯❀➘✢➨❀➭✓➼➴➯✛➥➵➥✚➦❀➥✵➹✖➥✚➦✧➭✷➯✛➢ ➷☞➬✖➮✧➱✦✃❅❐➇❒ ❮✷❰✕Ï✖❒✌Ð✁Ñ✖❰✚Ò✧❐③Ó✷Ô❀Õ❁Ö✖Ñ✞❰✆❒ ➱✷×✰Ò✛➱✷Ø✁❒ Ï✚Ô✧➱✞Õ✪Ò✛➱✓❰✆Ù✞❰✷Ú❀Ò➽Û Ô❀Ó✕✃✆❰✖❒ Ô✧➱✷❮✵Ô✆Ü❅❰✷Ú✁Ò✹❮✷Ò✛Ï◆Ø✷Ò✛ÏsÔ☞Ð✞Ý❺Ò✛Ó✓❰➵❮ ✃✁Ï◆Ò✹Ô✁Ü✞❰✚Ò✛➱✰➱✕Ô✆❰✽Þ✖➱✷Ô✆ßà➱❁Ô❀Ï❁Ó✆Ú✆✃❀➱✷×☞❒ ➱✷×✧➬ á✆â✖ã✖ä✁å✞æ â✁ç➽å✷è✕ä✧ç✞é✷ê✆ä❀è✕ë✧ç✓ã✷ì í î✵ï✛ð✁î✧í ñ✚ð❀ï➌ò ó ô➴õ✧ö✖÷➍ø➽ù✆÷☞õ☞÷➍ù✁ù✖÷❧úûö✆ü✢ý✛þ ÿ ✂✁☎✄✆✄✆✝✟✞✠✁☛✡☞✝✌✄✍✄✏✎ ✑✆✞✓✒✔✎ ✑✖✕☞✗✠✁✙✘✛✚✢✜☎✣✤✚✥✄☞✄☞✦ ✧ ★✪✩☞✫✭✬✯✮✱✰✤✲✴✳☎✵✱✰✷✶✌✮✱✳☎✸☞✰✏✹✥✺✌✮✱✰☛✸✍✻✥✼✽✼✿✾❁❀ ✲❂✶☞✰✤✮✱✻✠✵✌❀ ❃✍✰✷✶✌✮✱✳✠❄☎✮✱✻☎✲❅✲❆❀ ❇✆❄✓✶☞✻☎✮✱✻✌✹❈❀ ❄✏✲❂❉ ❊ ❋✪●✙❍✙■❑❏✱▲✤▼✂◆✠❖P▲✙▼✂▲◗❖✆❘☎◆☎❙❯❚ ❱✆❲✆◆☎❳☞❨✟❖☎❚ ◆✏❱✿❩❬◆✛❭✟❪❁▲✛❳✆❖❅◆✏❏✟❚ ▲✤❱☞❖P▲✏❙❴❫✌❏✱◆✌❵✏❏✱❨✠▼❂▼❆❚ ❱✆❵✓❫☞❨☎❏❛❨✠❙❜❚ ❵✏▼❂❝ ❞ ❡❣❢◗❤✱✐✏❥ ❦☞❢☎❧✿♠♦♥♣❢✥qr❧✍❢✤❤P✐☎❥ ❦✆❢☎❧✿st❧✍❢✛❤❛✐✏❥ ❦✆❢✙✉✈❦☞✇☎①③②☞✇✏④✆❢✛④☞⑤✂✇✏❤✌❥ ❢✤④☞⑤✱❢✏⑥❴②✌❤✱✇✠⑦☎❤✱⑧☎①❅①❆❥ ④✆⑦✏⑨ ⑩✖❶ ❷✤❷◗❸✢❹✌❸✛❺✛❻✓❻✠❸✢❹✠❼❽❶ ❺✥❾❈❿ ❾☎➀✤➁❣➂➄➃✪➅◗❻✙❾☎➆✤❸✢❹✆➇♣❿➈❿✠➉☎➇➄❼r❸✈➊◗❾✤❺✛➊◗❸➄➋✛❻✟➉✛➌
slide-5
SLIDE 5

5

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✂✁
✆✞✝✠✟☛✡☞✆✍✌✎✌✑✏✓✒✞✔✕✔✗✖✘✌✙✒✚✝✜✛✞✖✣✢✥✤✦✆✦✝✜✧✞✌★✒✗✩✪✆✬✫✭✧✚✮✰✯✍✱✲✛✳✒✎✏✥✴✵✧✍✝✶✛✕✷☛✒✸✝✞✒✍✛✳✹✺✧✻✏✕✼ ✽ ✾✞✿✕❀✸✿✞❁✞❂❄❃✎❅✎❆❈❇✜❉✶✿✞❅✍❊✳❋✺❇✻❆✕●✲❅✚❍■✾✚❏✍❏✎❑▼▲❖◆✭✾✜❊✞▲❖❇✍✿✭P ◗❙❘✕❚❱❯✓❲✜❳✠❨✚❳✶❩✞❘✞❬✞❭❪❳✲❨✍❫★❩❵❴✜❩✞❘✍❬✜❭❜❛✣❝✸❛❞❫✙❩✚❳✲❡✍❛✣❢✻❛❞❩✚❫ ❣ ❚✗❘ ❤✲✐✻❥✓❦ ❧✍♠✲♥✠♦✻♣✎q✲r✞♣✎s t✙s✉r✞✈✜✇☛q②①❄③★④❜⑤✲✇☛q⑦⑥☛①⑧①✭✈ ①✭q⑩⑨✞⑤✲⑤✻❶❞❷✠♣✍①✥❷✍s ❸❺❹❼❻✲❽❿❾✕❸✓❽➀❸➂➁②➁✜❽➀❸❼❹ ➃ ➄✞➅✬➆➈➇☛➉❄➄✞➊★➊➌➋⑧➍✞➎✥➎☛➏✞➐✜➑✎➋②➒✰➅✞➓✞➔❄→☛➍✎➋✥➣➈↔↕➐✲➄✎➙❿➋❈➒✥➛✙➓✭➎✸➙❖➊★➍✚➅✜➒✜➙✣➜✎➙❖➍✞➎❄➄✬➅✞➍✍➒✳➝✺➑✻➋✭➞✭➍✚➊ ➟✍➠✍➠✙➡▼➢❖➤✕➟✞➥✜➢❖➦✍➧✦➨✜➧☛➢✣➩✚➨✜➫❵➡ ➭ ➯ ➟ ➲✥➳✞➵✍➸✜➺✚➻ ➼ ➽☞➾✞➚✠➪✻➶✞➹✎➘❺➾✞➴✜➼❖➚✲➷✬➽✳➬✚➽✭➴✳➹✻➮➱➽✲➹✎➘②✃✚➼❖❐✲➹✗➴✕❒✚➾✞➴⑦➾✙❮❰❮ ➪✍ÏÐ➽ ➾✍➶✍➶✙❮▼➼❖❐✕➾✞➴✜➼❖➪✍➚✲➽☞➴✳➪✶➽✲➹✚➚✲ÑÒ➾✞➚✞Ñ❜➘✓➹✚❐✲➹★➼✣✃✭➹■➮⑦➹✞➽✕➽✕➾✲➷✚➹✞➽❄➪✍✃✭➹✎➘❙➾✶➚✞➹✍➴✥ÏÓ➪☛➘✕Ô Õ ➾✠➽✭➪✍❐✻Ô✭➹✍➴✬➼ ➽❄➾✸➘②➾✲➴✭❒✎➹✎➘✠❮ ➪✍Ï×Ö⑧❮✣➹✍✃✕➹❵❮✭➾☛Ø✚➽✭➴✭➘⑩➾✞❐✲➴✜➼❞➪✞➚ Õ ➮❙➾✞➚✕➬❪➶✻➘②➪✲➷✙➘⑩➾✍➮✰➮✶➼❖➚✲➷❱❮ ➾✞➚✲➷✚Ù✭➾✲➷✚➹✞➽✬➶✚➘②➪✍✃✍➼❞Ñ✙➹❱❮▼➼▼Ø★➘⑩➾✻➘✭➼❞➹✞➽☞➴⑧➪✸Ù✕➽✲➹✦➽✕➪✍❐✻Ô✭➹✍➴✓➽ Ú ➪✎➘❈➚✞➹✍➴✳ÏÓ➪✎➘✥Ô✶➶✻➘⑩➪✞➷✎➘⑩➾✍➮✰➮✶➼❞➚✕➷ Õ ÏÛ➼❖➴✕❒■✃✥➾✍➚☛➼✉❮❰❮ ➾✶➽✕➪✚❐✚Ô✭➹✍➴⑧➽✸➼✣➴✬➼❖➽☞ÑÜ➼ Ú✭Ú ➼❖❐✞Ù☛❮ ➴✰➴⑧➪✶➾✍❐✜❒✑➼❞➹✍✃✕➹✦➴✕❒✎➹✦➴✲➘⑩➾✞➚✲➽✜➶✭➾☛➘✓➹✚➚✜❐✥➬ ➪ Ú ➮⑦➾☛Ô✚➼❞➚✲➷✬➾✬Ñ✵➼ ➽✭➴✲➘✭➼▼Ø✎Ù✭➴✥➹✚ÑÝ❐✕➾✙❮❰❮✙❮▼➼▼Ô✲➹✶➾Ý❮ ➪✍❐✕➾✙❮✞❐✕➾✙❮❰❮✞ÖÞ➪✍➚✶➴✕❒☛➹✗➪✞➴✥❒✎➹✎➘ ❒✚➾✍➚✜ÑÒ➴✥❒✑➼✣➽✠➮⑦➾✕➬✸➚✜➪✜➴✶Ø✻➹✸Ñ★➹✞➽✻➼❿➘⑩➾✻Ø✑❮✣➹✬➾✞➴⑦➾✙❮▼❮✍ßà➽✲➹✚➹✸Ñ✵➼ Ú✭Ú ➹✎➘✓➹✚➚✞❐✲➹ Ø✻Ï á â✲ã✚ä✜å✭æ⑩ç★è▼é✘ê✞ã✚ë■ç✞ä✞ëÒëÜé✣ì✕å✜æ✕é❿í✙î✭å✕ã✚ë ì✳ï✚å✥ã✻ð❙ì ñ

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ò
  • ó
  • ô
  • õ
  • Descriptor = socket(AEINET,

SOCK_STREAM, 0) Descriptor=socket(AEINET, sock_stream,0) Connect(descriptor, Receiving Address) Bind(descriptor, receiving Address Write(descriptor, “data”, Datalength) Listen(descriptor, maxQueue(onm) newDescriptor=accept(descriptor, Sending Address); BytesReceived=reform(descriptor, Buffer, dataSize); “data”

ö✍÷✕ø✳ù✥ú❺÷

Client Procedure Server Procedure parameters results

ûýü✲þ✥ÿ✁
slide-6
SLIDE 6

6

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

☛✌☞✎✍✑✏✓✒✕✔✗✖✓✍✑✖✙✘✛✚ ✜✣✢✑✤✦✥✛✧✦★✙✩✪✜✫✥✓✢ ✬✮✭✰✯✲✱✎✳✵✴✑✶✙✭✪✯✲✳✛✷✸✯✹✶✙✺✵✻✼✳✮✽✾✶✛✯✲✳❀✿❁✭✪❂✦✶✙✴❄❃✪✯✙✿❁✶✛✭✎❅✪✯✲✱✸✳✵✴✕❆❇✿❈✳✓✭✑✯✹✳✛✷❉✳✓✴✪❊✑✯✪✿❁✶✛✭ ❋❄●✗❍✓■✑❋❑❏✙▲❄●✲▼✎◆P❖❈◗✪❘✲❍✎❙✓❖❈◗✑❚✰❏❯◆✼▼✮❱❲❍✙●❳▼❨❱❲▼✛●❄❩✕❍✙❬❪❭✙❫❴❩✕▼❯▼✛❵❉▼✓❛✪❜✑●✪❖✫❍✓◗ ❝✼❞✙❡✪❢✪❣❲❞✙❡P❤✪✐✑❥❳❞✎❝❑❝❦❞✓❧✪❞♥♠❁♦✛♠❈♣✑qr❝✼❞✙❡✪❢✕s ❥✗❡P✐✓❝✉t✮❣✈❥✦✇✕❞r❝✗❞✮❣✾t✛❥❳❞①t✕②✑③✗❞✓❧❄❥✗❡✛④ ⑤ ⑥⑧⑦✗⑨✎⑩✪❶✛❷✎❸❳❹✙⑩✪❹✙❺✙⑦ ❻ ♣✑♦✲t✓❧✦❤✙❥✪♠✫t✓♣ ❼❾❽❇❿❈➀✓➁✑➂✹➀✛➃❉➀✓➄✪➅✑➂✪❿❁➆✛➁✰➄✑➆✙➁✪➂✪❿✣➁✙➅✪➀✙➇✵❿❁➂✗➇P➀✛➃❉➀✓➄✙➅❄➂✙❿❁➆✛➁✰➈⑧❿❁➂✦➉✕➆✓➅✑➂➊➈➌➋✎❿✫➂✛❿❁➁❄➍✵➎❄➆✎➏ ➂✦➉✕➀➐➏✼➀✙➇✪➅✕❽ ➂✗➇✛➑✙➒✌➉✎➀①➄✎❽❇❿❈➀✓➁✪➂✹➀✛➃❉➀✓➄✪➅✑➂✪❿✫➆✓➁P➍✮➀✛➂✼➇P➂❄➉✕➀r➏❦➀✙➇✪➅✎❽ ➂✗➇➓➀♥❿✫➂❄➉✎➀✎➏→➔✛❿✫➋ ➣ ➆✸❽↔❽❇❿✣➁❄➍①➆✕➏P❿❁➁✪➂✦➀✎➏✲➏✼➅ ➣ ➂✪❿❈➆✙➁➐❽ ➋✙➂❳➀✎➏➓❿❁➁↕➂✦➉✕➀❯➀✛➃❉➀✓➄✪➅✑➂✪❿✫➆✓➁✮➑
slide-7
SLIDE 7

7

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✁✄✂✆☎✞✝✠✟☛✡✌☞✆✍✎✝✏✍✒✑✓✂

Polling Object A Object B Interrupt invoke continue result

Signal result ready

Process result

Object A Object B invoke result

Do I have the result ? Do I have the result ? Do I have the result ?

Process result

continue Object A Object B

invoke result

blocks (e.g., sleeps)

Process result

✔✖✕✞✗✠✘✌✙☛✚✆✛✎✗✠✛✓✜✓✢

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✧✩★✏✪✬✫✮✭✰✯✒✪✲✱✴✳✞✵✎✭✰✶✎✷✞✯✸✱✴✭✰✳✹✫✺✪✻✶✸✼✻✷✰✳✽✱
✾✞✫✿✭✰❀☛✯✒✪✻✳❁✱✴✳✌✵✎✭❃❂ ✵☛✪✸✾❄✯☛✼❅✪❆❀✞✭❇❂❈❂ ✭✻❉❊✱❋✳☛● ❍☛■✒❏✬❑✌❍✬▲ ▼❖◆❅P❘◗☛◆❅P ▼❚❙❱❯❇◆❃❲ ❳ ❨❬❩✌❭☛❪ ❫✌❴❵❫✒❛✓❜❞❝✠❡✺❝✓❢❊❣✏❩✞❴✐❤✠❩✌❴❥❝✒❦✒❩✌❴❵❫✒❛✓❜✴❝✠❡✠❣☛❧ ♠ ♥☛♦❥♣✻q r☛♦❥r☛s✓t✐✉✒t✠✈✴✇✓s✮✇✠①③②✠r✌④✐⑤✏r✌④❥✇✒♣✎r✌④❵✉✎t✓✈ ✇✓s✓②✒⑥ ⑦ ⑧✓⑨✎⑩❅❶❱❷❞❸❺❹✒❻✓❷❞❼✓❽✮❼✠❾❿❻❺➀✞➁➃➂❺➁✒❾✒➁☛➂✆➁✎❽☛❸✏➁➄❼✏❾➅❻✏➀☛➁➄➂✆➁✌➆❥❼✓❻❺➁❿➇✠➁✌➂✐➈✌❷❞❸✠➁✸➉ ➊ ➋❿➌☛➍✐➎✸➏ ➐➃➑✌➒❱➏❞➓✎➐✒➍→➔✎➏✴➣✰➓✮➔❘➍❘↔☛➌☛↕✓➙✎➛❺➜✏➝✞➞❄➑✏➜✒➣✸➓➃➟✠➜✎➛ ➠❖➡☛➢✐➤✓➥✎➡✰➦❱➧❞➨✓➩ ➫ ➭✰➯☛➲ ➳➸➵✎➺✐➻✓➼✎➵✬➽✴➾ ➚✓➪➃➶➘➹❘➚☛➳❖➵☛➺✐➻✒➼✒➵✻➽✴➾❞➚✠➪✞➴ ➷ ➬❿➮☛➱✐✃✸❐ ❒✮➱❘❮✌❰➄Ï✆❰✞Ð→Ñ✓➱❺❰➃Ñ✌➮✏Ò✆❰✌Ó❘➱❊Ï✆❰✎Ô✓❰✌Ï✆❰✎❒✎Ó✏❰✮✃✒❒✒ÕÖ❐ ❒✠×✠Ñ✞Ø✏❰ÚÙ❱❐ÛØ✏❰ Ü✆Ý Þ✒ß❺à✰Ý❱á â☛ã Þ✠ä ã à✌å➸æ
slide-8
SLIDE 8

8

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • stub

Skeleton

Calling Procedure Client Called Procedure Sever results parameter parameters results marshaling unmarshaling marshaling unmarshaling Reply Message Reply Message Request message Request message

Net work

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

slide-9
SLIDE 9

9

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

✄✆☎✆✝✟✞✡✠☞☛✍✌✏✎✑✞✓✒✔✞✕☛✏✖✗☎✡✖ ✝✘✖ ✙✘☎ ✚✡✛✔✜✡✢✤✣✥✢✏✦★✧✘✢✩✦✪✣✕✫✭✬✮✢✰✯✕✢✩✢✏✬✏✣✲✱✍✳✰✴✩✦✟✳✥✧✕✫✭✬✮✢✵✬✮✢✆✶✡✫ ✯✡✫ ✱✘✫✭✳✥✯✥✣ ✳✘✶✷✫ ✱★✣✤✳✘✴✕✢✩✦☞✸✘✱✘✫✭✳✑✯✘✣✹✶✘✳✆✦✪✱✺✜✡✢✵✻✩✼✽✫✭✢✕✯✘✱✾✣✏✫ ✬✿✢❀✱✍✳❁✫ ✯✘✧✥✳✡❂✺✢✮❃✆✛❄✜✏✢✵✬✡✢✕✶✏✫✗✯✡✫ ✱✘✫✭✳✑✯✘✣❅✸✩✦✍✢ ❆✘❇✑❈✍❉✕❊✰❋❄●✥❍✗❈✟❈✟❉✩❊❀■✺❏✕❍✗❊✘❑▼▲✕❊❁❍ ❊✘❈✺❉✩●☞❇✑▲✕◆✥❉✷❖✿❉✕❇✩❍ ❊✮❍ ❈✘❍✗❆✘❊✓P ▲✆❊✘❑✏■✍▲✘❑✩❉✮◗ ❘ ❙❀❚✏❯★❱✘❲✕❚✿❳✽❨✗❩✥❬ ❭✡❪❴❫✩❵✟❛✆❜✥❝✆❞✺❞✲❡✺❢✆❣✕❡❤❡✺❵✐❣✆❥✘❞✺❦✥❛✕❵✍❧✾❞▼❢♥♠ ♦✩❢q♣ ❝✆r✑❝♥♣✘s✩❣✕❡★❣▼❞✑❡✺❵✍t✘❜✺❡✺t✘❵✍❝✘❞ ✉ ✈✆✇✍①▼②✥③✘④✏⑤✑③✩✈✆⑥✥③✆②▼①✥⑦✷⑧✘⑨✩✇✍③✆②✷✉ ✈✰①✕⑩✟❶✿③✏⑩✪✇✍①▼✇✑⑩✐❷✘✈✘②✘❸✹✉✗✇✪✇✺❹✡③✏❸❺①✥❻✥③✩⑩✪✇✑❹✩③ ✈✕③✕✇✟❼✔①✕⑩✥❽✆❾ ❿ ➀✔➁✩➂➄➃✕➅☞➆✥➇✕➃♥➈✭➉ ➁✘➊ ➋✡➌❄➍✏➎❁➏✟➎✆➐✑➎✏➏★➑✥➎✷➒✕➏✍➓✆➔✥➎✆➑✍➑▼➓✘→✤➣➄↔✩➏★➑✘➍✆↔♥↕✽➙ ➛✘➜✮➝✆➞♥➎✡➔✑➓✘➛✥➑✑➟✺➏✍➠✥➔✑➟✘➙✗➓✥➛ ➓✘→✤➍♥➙ ➜✡➍➡↕ ➎✆➐✘➎♥↕✥➢✏↔✆➟✐↔✰➑✑➟✺➏✍➠✘➔✺➟✺➠✘➏✟➎✆➑✹→✘➏✟➓✕➣➤➟✺➍✏➎❁➏✟➎✏➔✑➎✮➙ ➐✑➎✩➢➡➥✆➦✩➟✍➎✰➑✑➎✆➧✏➠✑➎✩➛✆➔✥➎✆➑ ➟✑➍✕➟ ➔✑➓✆➣❤➎➨➙ ➛❀➓✑➐✑➎✡➏✪➟✍➍✡➎❀➛✕➎✕➟✟➩❄➓✆➏✥➫✍➑✕➝ ➭ ➯❅→✥➟✟➎✩➛✰➲ ➠✑➛ ➳➸➵➻➺➽➼✩➾★➚✆➪✆➼➹➶✭➘✗➴✘➷✤➼✿➶ ➚✥➬▼➚✥➮✕➱✕➚✘➮✘➺❤✃✘➚▼❐✥➼✩❒✕❮✕➘ ➴✘➷▼➼✕➴✕❰Ï➮✺➴✕❐✥➼✕❒✩❮✕➘ ➴✥➷➹Ð✘➴✕➬✥Ñ Ò ➮✍➚✑Ñ❤Ñ✺➪✡✃✷✃✆➴✩❒✑➬✆❰Ó➘ ➴✘➷✰➚✑Ñ✍✃✩❐❀ÔÕ✃✮Ö ➷✡Ö×Ð✆➪♥➘ ➷✏➪✡✃✏➾✟➳✍➶ ✃✆Ø✑✃♥➶✘❰✩➼✕Ñ★➼✤➚✺Ñ✺➾✍➮✆❒✍Ñ✺➮✆➾✟✃✆➚✲Ù✏➘✭➾★➚✺Ñ✹➪✆➼✘Ø✘✃ Ñ✍➬✷➱✏✃✷❐✥➼✏❒✆❮✑✃✏❰Ú➱✏✃✕Ù✘➬✕➾✟✃❀Ñ✺➪✏✃✥Û❁❒✍➼✘➴❁➱✡✃✷✃✆➴✩❒✑➬✆❰✿✃✕❰✓Ù✥➬✕➾❤❰✿✃♥➶✽➘ Ø✥✃✡➾➸Û✷➬✥Ø✥✃✩➾✾➼ ➴✕✃✕Ñ✟Ü✔➬✕➾✥❮✥➵ Ý✓Þ✏ßáàâß✥ã✘äqàÕÞ♥ä✑å✆ä✤Þçæ èâÞ♥ä✑ã✩éëêìäáíëä✏ê✏î✕ßáàïß✹åÓàðã✆ñ✥ò➹àóñ✟ã✘ä✑å❀ô

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • õ
  • ö
  • ÷
øâù✺ú✕û ü✩ýÿþ✁✄✂✆☎✞✝✠✟✆✄✡☛✂✌☞✎✍✏✡✑✂✒✝✔✓✏✕✏✝✖✟✞✂✘✗✚✙✎✂✞✟✛✕✏✟✜✝✔✓✘✂✌✢✣✗✤✍✎✥✧✦★✍✎✩✪✝✔✓✘✂★✗✤✂✧✫✖✍✞✝✬✂ ✭✎✮✣✯✱✰✆✲✴✳✔✮✆✭✆✵✞✶✏✷✜✳✹✸✎✺✏✷✚✻☛✲ ✺✞✭✽✼✾✻✣✯✚✭✞✿✆✻✑❀✴✲✁✺✹❁❂✻✏✺✆❃ ❄✹❅✣❆❈❇✆❉✚❊✞❋✆❇❍●✄■ ❅✞❏ ❑▼▲✎◆✆❖✣P✆◗ ❘✞❙✽◆✏❘✆❚ ❯✔❱✆❲✎❳✣❨✆❩✆❬ ❱✞❭✣❪❫❨✹❴✏❵✑❛✌❜❝❴✞❞✹❡✬❛✆❱✌❢✤❛✆❞✞❛✘❢✬❢✤❛✣❵❣❡✬❴✛❳✏❤✪❲✣❢✤❴✹✐✘❥☛❪❧❦ ♠ ♥♣♦✹qsr q✆t✬✉✞✈ ✇✧①③②✎④✘⑤✚⑥✎④✣⑤⑦②✔⑧✔⑨✆⑩✣②✞❶❸❷✣⑤✤❹✎⑥✣❺✁❻☛④✆②✒❺ ❼✏⑧✬④✣⑤✤❽✔❾✆❿✎④✏②➀⑧✬❹✪④✏❾✣❿✞➁★❹✞❷✆④✘⑤➂❾✆⑧✞❺ ❹✞❼✒❹✞⑤ ➃✎➄✣➅✱➆✆➇✴➈✔➄★➄✏➉❍➊✆➋✞➅✤➌✬➄✆➍➏➎✏➐✌➌✬➑✧➄❂➃✎➄✣➅✚➆✞➄✘➅✹➒✣➓→➔✆➣✠➄✽➔✞➃✽➈✘↔✴➇✁➄✆↕✏➌✖➃✔➌✔➙✣➎✆➃✘➛✧➇ ➌✜➈✎➋✎↕✞➌✚➔☛➇✁↕✎➃ ➣❈➔✆➅✚➃✞➑✆➔❍↔✄➇ ↕✞➜✪➔✆↕✏➍ ➙✎↕✆➣❈➔✣➅✚➃✎➑✆➔❍↔✄➇ ↕✞➜ ➈✎➋✏➍✑➄s➛✞➊✹➔✘➈✆➝✏➇✁↕✞➜✽➔✏↕✏➍➞➙✹↕✏➊✎➔✘➈✆➝✏➇✁↕✹➜❍➛✹➔✞↕✆➍ ➙✹➊✣➈✬➔✑↔➟↔✴➇ ↕✎➜ ➠➢➡➥➤ ➦✹➧✎➨✏➩✔➫✞➭s➤ ➯✞➲✣➳❫➫✔➵✏➡✑➸✽➨✞➦✜➺♣➸❍➻➟➻✞➠❝➵✎➼✹➩✬➸✆➯✌➽✤➸✆➼✞➸✘➽✬➽✤➸✣➡❣➩✬➵➀➨✞➦✛➦✹➩✔➾✆➚➪➵✞➽ ➧✣➽✤➵✎➶✘➹✧➳➴➘ ➷ ➬ ➩✔➾✆➚✣➦✠➨✏➯✆➡➪➦✆➮✹➸❍➻ ➸✆➩✬➵✹➯✞➦✛➨✣➽✬➸✒➵✞➼✹➩✬➸✆➯✪➨✘➾✔➩✬➵✆➱✾➨✏➩✞➤✄➫✤➨❍➻✃➻ ➹✒➲✆➸✣➯✏➸✧➽➂➨✞➩✬➸✣➡❣➼✞➽✬➵✏➱❐➩✔➭✘➸ ➤ ➯✏➩✬➸✘➽✱➼✔➨✣➫✎➸✌➡✑➸✏➼✘➤ ➯☛➤ ➩✞➤✄➵✎➯❂➵✞➼✪➩✬➭✧➸❂➦✎➸✣➽✚❒✞➸✘➽✹➘ ➷ ❮❫❰✧Ï Ð✔Ñ✔Ò✏Ó✧ÔÖÕ✹×✆Ø✠Ù☛ÚÜÛ Ý✘Þ ß✣Ý✆à✆Ý✘Þ➂á✞Ñ✬Ý✏Ð✪Ñ✬â✧Ý✏Ð✹Ý❂Ð✎Ñ✬Ò✆Ó✣Ð✠á✆à✏ã➪Ð✆ä✹Ý❍Û Ý✆Ñ✬×✎à✎Ð✪å✞Þ✤×✆ØæÑ✬â✧Ý Ú à✏Ñ✬Ý✘Þ✱å✔á✣Õ✎Ý✌ã✑Ý✏å✘Ú à☛Ú Ñ✞Ú✄×✎à✎Ð✣ç
slide-10
SLIDE 10

10

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✌✍✌
  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
✜✣✢✥✤✧✦✩★✪✤✫✜✭✬✮✬✰✯✲✱✳★✵✴ ✜✭✱✳★✷✶✳✜✸★✥✹✻✺✽✼✥✺✿✾❀✹✷✬❁✾✿❂✥✜❃✾❄✬❅✜✭✱✳✜✩★✭✹❃✺❆✯❇✾✧✺✻✬❈✹✷✬❉✦❊✤❋✼❍●✭✼ ■❇❏▲❑✸▼❖◆ P◗■❘❑✰❙✿❚❯◆❱◆❘▼✥❲❨❳✭❚✷❩❀❬✥❚✸❳✥▼◗❙✸❭✪◆❱◆❘▼✥❙✸❏✽▼✥❲✍❪❴❫✮▼✷❫❉❭❵❩❜❛◗❏❀❝❵❚✸❏✣■❘❑❡❞✩❭❢◆ ❭✥❞✿❳✷▼❊❩ ❣✿❤✸✐✥❥❧❦ ❤✰❥✪✐✷♠♦♥❊♣❱♣ q✥r✿♥✩s❀✐✥❥✪t✈✉✇♥✸①❀♥❍❦ ❤❡②✩♥❵③❀④✭♥✩②✷✐✣r✳q❖♣❱♣❘✐✥r✿s✿✐✥❥❢⑤⑥❤✳q❍❦❘❤⑧⑦✪❦❘❤✩⑨✷⑩❷❶❃❸ ❹❃❺❃❻❍❼✪❽✿❽✮❹❵❾▲❿✣❺✩➀✩➁❈➂✭❹❵❾✽➃✥❹✩➂✭❿❆➄✳➀❯➅❱➅❘❿✥➄✳➁❀❿✥❻✵➆➇❿❊➈ ➂❊➈➊➉❃➋✳➌✸❿❊❾❈➍✷❹✸➌❡➁▲➀✻➎✷❾✧❿✥❿✷➏ ➐❈➑✷➐❈➒❵➓❋➔❨➑✭→✈➣✪↔➙↕➜➛✥↕❇➝✭↔ ➔✪➞
➡✧➢✭➤✩➢❊➡✫➥❄➦✽➧✻➨✻➩✳➧✥➫➭➫❈➧❃➯✪➲ ➳◗➨❃➩✩➩✳➢✷➵✩➦✿➢✥➸➻➺➼➨✿➳◗➧✭➤⑧➸❊➢❃➥✷➽❇➾✭➯❊➽➜➯✸➾✻➨✰➥✳➧✩➤✩➦✽➺➼➨✷➡✧➢ ➥✽➳✭➥✿➦✿➢✷➫⑧➚✩➧✭➤✳➦✽➢✥➯⑧➨✩➦❈➦✳➪❵➢❢➽✲➫✮➵✪➲❘➢✷➫✮➢✥➯✸➦✽➨✩➦❃➽❘➧✭➯➶➲❘➢✭➹✳➢❖➲✭➘♦➽➷➴❘➢❊➴➊➚✳➨❃➦✮➦✿➪❵➢❆➩✳➧✭➸➬➽➜➯✿➾ ➲❘➢✭➹✳➢❖➲✲➮✃➱❖➢✭❐✪➨✥➫➭➵✪➲❘➢❃➥➭➨❵➡❒➢◗➦✿➪❵➢◗➧✷❮✥➥✸➢❊➡❒➹✳➢❊➡❈➵✸➨❃➦▲➦❀➢❊➡▲➯❵➚❃➦✿➪❵➢◗➤✿➨❃➩✸➦▲➧❵➡❜➳ ➵✸➨✩➦✽➦✽➢❊➡▲➯❊➚✩➦✿➪❊➢✣➤✿➨✭➩✳➦✽➧✷➡❜➳❨➵✸➨❃➦▲➦❀➢❊➡▲➯
Ï❃Ð❨Ñ✲Ò➭Ó❊Ô❘Õ✷Ò➭Õ✥Ð✳Ö✽Ï✩Ö❃Ñ❘×✥Ð❡Ï✷Ø✥Ù✳Ö✸Ú❒Ï✩Û✳Ö✭Ñ❘×✭Ð✳Ù✰Ü✳×❊Ú❅Û✭Ú▲Õ❃Ï✩Ö❃Ñ❇Ð✸Ý✻Ï✭Ð➶Ñ❇Ð✳Ù✳Ö▲Ï❃Ð❃Û✸Õ❆ÞßÏ✩Ð à✷á✩â▲ã✥ä✿å✩æçà❃è❄é✰ê❖ë❘ì✳ã✥í✻ä❊î é✳ï✿ï❵ð✸à❊ñ❅ä✥ñ▲ã❃é✸å✭ë❇í✳ê✣é✣í❃ò✩ó❡á❵ã❊ñ❅à❃è❨ë➜í✳ï✿å✽é❃í✩ä✸ã❃ï å❀ô✷é✩å⑧á✷ã❖î à✥í✸ê✣å✽à✸ê✷ã✭å✿ô❵ã❊ñ
slide-11
SLIDE 11

11

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

✄✆☎✞✝✠✟☛✡☞✟✍✌✏✎✑✡✒✌✏✓✔✟✍✕✒✖✗✄✘✕✙✕✘✚✛✄✢✜☞✣☛✤ ✄✢✕✥✟✢✣✍✦✞✟✏✕★✧✩✟☛✟☛✜✪✄✍✫✬☎✏✭☛✦✮✤✯✝ ✣✘✖✰✟☛✓✲✱ ✳✏✴✏✴✶✵✯✷✹✸✥✳✢✺✘✷✹✻✏✼✆✴✗✽✾✻☞✿✶✽✛✳✏❀❁❀✑✷✹✼☞✿❂✷❃✼✘✺★❄✰✽✾❅✥✳✏✸☞❄❇❆❉❈❋❊✒●✶❍■✳✏✼✘❏❑✳✢✼✑▲◆▼✘✼✢✴✏▼☛❖■✵✯✷◗P✘❘✞❄☛❏✔❙ ❏❚✷◗❅☞❅☞❄✰✽❯❄☛✼✘✺❱❈❲❊☞●✮❳✘❄✰❨ ✿✰❨❩❳ ❬ ❭✥❪❴❫☞❵❜❛❞❝✒❡❯❢❞❣✐❤❞❝✞❥ ❭✥❢★❦ ❫★❪❜❭✏❥❜❧❚❤◆❭✒♠✥♠♥❝☞❤♦❫★♣❲❭❁❤❞❝✗❥ ❭♥❢♥❦ ❫★❪❯❭☛❥★q☞❭♥❢✬❭✘❵✥❭★r❯❝ s t✈✉✰t★✇❞t✙①❚②◆t✒③♥③✥④☞②♦⑤★⑥❲t✍⑦ ④★⑧♥t✒⑨❶⑩❸❷❺❹★❻✈⑤★⑥❲t❽❼✞❾✙❿☛❾❲➀❽➁❞⑩✥➁❯➂✛④☞➃ ➄ ➅✙➆➈➇✬➅✥➉✥➉✥➊☞➇✩➋✾➌♥➅♥➋✩➅✏➍➎➍ ➏★➆✮➐♦➅✈➉✒➇❞➏❜➑☞➇◆➅✒➒➓➋✛➏➔➐★→♥➣✘➒➔↔ ➋✩↕✒→❜➊☞➇❜↔◗➊♥➐➙➋✛➏❋➅❴➐❜➊♥➅✥➇✛➛★➌ ➜✥➝★➞✏➟ ➝♥➜✒➠✗➜♥➡☛➢✛➤◆➥☞➦✛➢✩➧❯➢✛➨✥➦♥➩❲➫✒➭★➨❯➢✛➜♥➧➔➯❜➨✥➤➲➥❽➳➈➜✢➵✈➧✥➟◗➢❞➜❁➜♥➢❯➦★➸ ➺ ➻♥➼■➽◗➾➚➽◗➾❁➪✏➶✍➹✏➘✶➪✏➴✈➷✶➬◗➹✍➮✏➱✪➪✍✃✔➹✢➾✗➽ ❐☛➶✍➷☞➪✢➻❜➻✥➹✰❒❽❮❲❰❋❒✛➪✏➷✏➷✢➹✰❒➔➮✰❒❴➻☞❒✛➪✢➶☞➾✞➬ ➪✘➻★➮✗❒ ➷☞➪✘➻★➻★➹✰❒❜➶

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • Ï
  • ÐÒÑ✶Ó✍Ô☞Õ✔Ö❩Ö
Õ✏×➙Ø✹Ù☞Ú✍Û✞Ö✯Ø❃Ü✶Ó✢Û✑Ý✢Þ❱ß★Õ✍à❞á❋â✥ß✏Ø◗ã♥ä✘ß✢Ø✹Õ✏Ù❑Ø✹Ù✍åæä☞ã♥ä☛ç✛è✏Ñ☛ä✢ã✒Ó é✞ê☛ê☛ë❱ì✏í✗ì☛î✘ï★ê☛í❑ð✗ñ✾ò☛óõô✞ö✯÷❃í✶ê✢ô✆é✢ø ù✏ú✏û✍üþý✰ÿ✁❜ý☛û✄✂✆☎✒ú✞✝✠✟ ✡☞☛✍✌✎✌✎✏✒✑✠✓✔✌✖✕✘✗✚✙✜✛✆✑✒✢✤✣✦✥✧☛★✌✪✩✫☛✍✬✭✓✔✢✤✌✎✮✒✢✰✯✎☛★✌✆✱✲✥✳✏✆✗✵✴✶✛✎✷✹✸✳✛✞✏✳✌✎✏✳✢ ✺✦✻✎✼✳✽✿✾✒❀✖❁ ❀✳❂✖❃❄✻✆❅✠❆✳❇❉❈❋❊✠●❉❍■❆✠❈❑❏✧▲✄✾✳✻✒❏✶▼
slide-12
SLIDE 12

12

  • ✔✖✕
  • ✬✮✭
slide-13
SLIDE 13

13

  • ☎✆☎
  • ✟☞☎

Remote

Remote

  • package soccer;

interface Team extends Remote { public: String name() throws RemoteException; Trainer[] coached_by() throws RemoteException; Club belongs_to() throws RemoteException; Players[] players() throws RemoteException; void bookGoalies(Date d) throws RemoteException; void print() throws RemoteException; }; Remote operations Interface name Declare it as remote Package name

slide-14
SLIDE 14

14

  • ✁✆✁
  • interface Club extends Organization, Remote {

public: int noOfMembers() throws RemoteException; Address location() throws RemoteException; Team[] teams() throws RemoteException; Trainer[] trainers() throws RemoteException; ... }; Attribute get operations

  • interface Organization {

private: String name() RemoteException; }; class Address { public: String street; String postcode; String city; }; interface Club extends Organization, Remote { public: int noOfMembers() throws RemoteException; Address location() throws RemoteException; Team[] teams() throws RemoteException; Trainer[] trainers() throws RemoteException; void transfer(Player p) throws RemoteException; }; Club makes name() remotely accessible Club can return an address object

slide-15
SLIDE 15

15

  • class Address {

public: String street; String postcode; String city; }; interface Club extends Organization, Remote { public: Address location() throws RemoteException; ... }; returns a copy of the address!

RemoteException

  • class PlayerBooked extends Exception {};

interface Team extends Remote { public: ... void bookGoalies(Date d) throws RemoteException, PlayerBooked; ... }; Type-specific Exception Operation declares that it may raise it

slide-16
SLIDE 16

16

  • Server

Client Stub Registry Interfaces Skeleton Activation Interfaces RMI Runtime (rmid,rmiregistry)

  • Client Host

Stub

Faulting Reference Live ref Host www.bvb.de Activa- tion ID

Activator

Activation Descriptors: ActGroup ClassName URL Init AG1 Team www.bvb.de/… AG2 Player www.bvb.de/… AG2 Player www.bvb.de/… AG2 Player www.bvb.de/… Java VM1 Java VM2 AG1 AG2 1: activate 2: create object in VM 3: pass

  • bject ref

4: update live ref

slide-17
SLIDE 17

17

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

✂☎✄✝✆✞✆✠✟☛✡✌☞✎✍✏✟✒✑✝✓✔✓✖✕✘✗✚✙✛✑✎✍✜✗✚☞✔✢✣✗ ✤☎✑✒✙✛✑✥✕✦✙✎✄✖✕ ✑✎✍✧☞★✆✎✩✎✪✬✫✭✗✮✙✜✫✣✓☛✆✠☞✎✯✝✗✚✰✱✟✜✤ ✑✜✢✲✑✔✰✥✰✳☞✝✓✜✟✖✆✴✑✎✍✜✗✦☞✝✢✵✍✛✫✝✑✜✍✲✆✶✟✔✍✏✄✝✆✠✢✛✤✲✍✷✫✖✟✸✆✶✟✜✤✹✄✖✕ ✍✌☞✔✺✵✍✏✫✖✟✻✤✎✄✜✡✼☞✜✺ ✍✧✪✽☞✾✢✔✄✎✡✲✿☛✟✖✆✴✤✔❀ ✁ ❁❃❂❅❄❇❆✔❈✥❂❊❉✎❋✏●✖❂✒❍✝■✔■✖❉✘❏✚❑✛❍✎❋✜❏✚❆✔▲✾▼✷◆✝❏✮▲✹❖✾❋✷●★❂❅❑★❉ ❍✹◆✷◆✵❈P❏✦❍✹❖✖◗✴❍✔❄❙❘★❂❊❉ ❆✝❚

+Add(in leftOp : int, in rightOp : int) : int Calculator

▲✎❆✔▲✔❱✴◗❲❂☛❄❇❆✜❋✏❂❳❏✚▲✹❨✷❆✔❑✷❍✜❋✎❏✚❆✔▲ ❋✷●✝❍✜❋ ❏✮❄✞■✥❉✦❂☛❄❇❂✝▲✹◆ ❋✷●✥❂✻❍★❘✝❆✔❨✷❂❅❑★❉ ❍✹◆✷◆ ❏❩▲✻❬❭❍✎❨✏❍ ❪ ❫✜❫★❴✷❵☎❛✹❵✵❜✛❫✱❪❝❪ ❫✔❞❡❵

Calculator c = new Calculator(); // creates a calculator object c.Add(1,2; // calls add on the object

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✐✬❥✏❦✖❧♥♠❭♦q♣★r✛❥✏❦✖s✠t✜✉✝✈✎❦♥✇①❦✝t✖②✮r☛②✚❥✜②✚③✝r

public interface Calculator extends java.rmi.Remote{ public int add (int number1, int number2) throws java.rmi.RemoteException }

④✬⑤✏⑥✖⑦⑨⑧✽⑩❷❶✔❸✶❹✜❺✝❻✚❼✱⑥⑨❽✏⑥✖❸✶❺✷⑥✖❸❾❽✜❻✮❼✥⑥❿❻❩➀✞⑦★➁✚⑥✖➀❷⑥✖➂✛⑤✷➃✔⑤✜❻✮❹✜➂

public class CalculatorImpl extends java.rmi.server.UnicastRemoteObject implements Calculator { public int add (int number1, int number2) throws java.rmi.RemoteException { return number1 + number2; } }

slide-18
SLIDE 18

18

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ☎✝✆✟✞
✠☛✡✝☞✍✌ ✎✑✏✓✒✕✔ ✖✘✗✚✙ ✔✜✛✘✙ ✗✣✢✥✤✦✎✥✧★✏✪✩✫✙ ✬✮✭✰✯✓✱✳✲✵✴ ✶✣✷✹✸★✶✣✺✦✶★✻✽✼✣✾✑✶✳✿❁❀

Geometric Tool Calculator_Stub.class Geometric Tool Calculator_Skel.class

❂✚❃✦❄❅❄❇❆✦❈☛❉❋❊✳●✥❃✦❄❅❊☛❍
  • Calculator c = new CalculatorImpl();

Naming.rebind(“rmi://localhost:1099/Calculator”, c);

  • P
  • Calculator c = (Calculator)

Naming.lookup(“rmi://localhost/Calculator”); c.add(1,2);

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

slide-19
SLIDE 19

19

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✒✔✓
  • ✕✗✖
  • ✤✦✥
  • ✩✫✪
  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
slide-20
SLIDE 20

20

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

✟✡✠☞☛✍✌✏✎✒✑✓✎✕✔✕✖✡✗✕✘✚✙✜✛✣✢✤✖☞☛✥☛✕✎✦☛✧✌✍✙✡✗✜★✩✛✪✗✡✙✚✙✚✫✬★✭✠✯✮✣✙✓✰✱✟✡✫✣✖✜★✭✙✡✫
  • ✴✸✴
✺✚✻✡✼✡✻✣✽✿✾✜❀❁✻❃❂ ❄✕❀✩❅❆❄✱❇❆✼✜✻✡❀✒❈❉❄✡✽✱❊✪❀❁✽✿✾✜❇✱❇✚❋✧●✚❍✜❄✕✼✕✻■✽✒❄✜❏✤✼✡❑▲❀✭✽✱❋✧▼◆▼✡✻✣✽❖❇✣❋✍✻P❂ ❑ ◗ ✼✡❄✱❀❘✽✒✻✕❅✚❋❙❂✍❋✧✻✡✼✕❀❚❀✒❄❆✼✡✻✡❀✒❈❉❄✜✽✕❊❚❇❁✾▲❋❙❂ ❏✕✽✒✻
✻✣✽✭✽✒❄✡✽❩❅❬●✒✾✜✼❭❄✱✼❪❂ ❫❵❴✦✻◆❅✡❋ ✺✡✼✤✾❪❂ ✻✣❑■❀✭❄❬❀❁❛✣✻■❏✭❅✱✻✚✽❜✾✡❀❝❀❁❛✣✻✯✻✚✼✜❑
❦✒❧✜♠✚♥✚♦✧❦✒❧✡♣❝q◆r❁❦✭♥❁♣✤r✭❧✚s❵❧✡t✕✉✡♦✧❦✒✈✱t✚✇❝❧✡t✕r❜q✡t✡s✬r✭①✦❧❬q✦②③♦⑤④✏♦✍r⑦⑥✯r✭✈◆s▲✈✱⑧⑨t❪④ ✈✤q✜s❃⑩✤✈✜s☞❧

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ➄➊➄
  • ➆➌➆
  • client

server

has policy changed ? if yes download new policy else use old policy

network

➎➐➏➒➑ ➓ ➔➣→❪➏↕↔➛➙❙➜➒➔➞➝ ➟➡➠➣➢➐➠➣➤☞➥✣➦➧➤➩➨➧➢➡➫➐➭ ➯➐➲
slide-21
SLIDE 21

21

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ☛✍✌
  • ✒✓✒
  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
✖✘✗✚✙✜✛✣✢✤✗✦✥★✧✩✢✪✗✫✖✭✬✪✮✰✯✩✗✱✮✣✲✳✮✫✥✵✴ ✮✚✶✷✴✸✗✹✢✤✛✺✯✻✴✼✥✽✗✾✧✿✢❁❀❂✥❄❃✸✗✫❃❆❅✣❇❈✗✹❉✪✮✪❊❋❉●✗✫✖✘✲✰✥✽✯✩✗✣❉❍✛✫✖ ■✜❏✰❑●▲✚▼✰◆✫❖❁▼✰P●P✩❏✫◗❘❏✾◆❚❙✿❯✺❖✩❏✫◗✘❱✪❏✫◗✪❲❨❳

import java.rmi.*; public interface ExpenseServer extends Remote { Policy getPolicy() throws RemoteException; void submitReport(ExpenseReport report) throws RemoteException, InvalidReportException

❩ ❬ ❭ ❪❴❫ ❵✳❛❝❜✚❫★❞❢❡✳❵✰❫★❣★❛❴❤✱❣✸✐✳❥❝❦●❧♥♠♥❜✪❛❘❦✾♦✿❣✸♣q❡✾❫ ❦●♣q❦✪✐✳❥♥❦●r✹s✳❤t❵✩s✘✉❝❦✩❛✭❥❴✈✇❵✤✐①❥✭②✩❦③❛✩❫★❣★❦✪✐✤❥④♣⑤❜●❛❘②✾❣✸✐✪❦✰♦ ⑥✽⑦ ⑧✣⑦⑩⑨✿⑥ ❶t❷✿❸★⑥✸⑧✪❶✳❹❴❺ ❻①❼✫❽

public interface Policy { void checkValid(ExpenseEntry entry) throws PolicyViolationException; }

server

❾➀❿➂➁ ➃ ➄✵➅✾❿➇➆➉➈❆➊❨➄➌➋ ➍➀➎❆➏➐➎➒➑✰➓✩➔→➑↔➣→➏➀↕➀➙ ➛➐➜

client

slide-22
SLIDE 22

22

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • Policy curPolicy = server.getPolicy();

start a new expense report show the GUI to the user while (user keeps adding entries) { try { curPolicy.checkValid(entry); // throws exception if not OK add the entry to the expense report } catch (PolicyViolationException e) { show the error to the user } } server.submitReport(report);

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • import java.rmi.*;

import java.rmi.server.*; class ExpenseServerImpl extends UnicastRemoteObject implements ExpenseServer { ExpenseServerImpl() throws RemoteException { // ...set up server state... } public Policy getPolicy(){ return new TodaysPolicy(); } public void submitReport(ExpenseReport report) { // ...write the report into the db... } }

slide-23
SLIDE 23

23

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • public class TodaysPolicy implements Policy {

public void checkValid(ExpenseEntry entry) throws PolicyViolationException { if (entry.dollars() < 20) { return; // no receipt required } else if (entry.haveReceipt() == false) { throw new PolicyViolationException; } } }

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • public class TomorrowsPolicy implements Policy {

public void checkValid(ExpenseEntry entry) throws PolicyViolationException { if (entry.isMeal() && entry.dollars() < 20) { return; // no receipt required } else if (entry.haveReceipt() == false) { throw new PolicyViolationException; } } }

slide-24
SLIDE 24

24

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✆✝✆✟✞
  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
slide-25
SLIDE 25

25

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✄✆☎
  • ✝✞✝
  • public interface Task { Object run(); }
  • import java.rmi.*;

public interface ComputeServer extends Remote { Object compute(Task task) throws RemoteException; }

  • ✡☞☛
  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
  • import java.rmi.*; import java.rmi.server.*;

public class ComputeServerImpl extends UnicastRemoteObject implements ComputeServer { public ComputeServerImpl() throws RemoteException { } public Object compute(Task task) { return task.run(); } public static void main(String[] args) throws Exception{ // use the default, restrictive security manager System.setSecurityManager(new RMISecurityManager()); ComputeServerImpl server = new ComputeServerImpl(); Naming.rebind("ComputeServer", server); System.out.println("Ready to receive tasks"); return; } }

slide-26
SLIDE 26

26

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • (c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f
  • import java.rmi.*;

import java.sql.SQLException; import java.util.Vector; public interface OrderServer extends Remote { Vector getUnpaid() throws RemoteException, SQLException; void shutDown() throws RemoteException; // ... other methods (getOrderNumber, // getShipped, …) }

slide-27
SLIDE 27

27

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • import java.rmi.*; import java.rmi.server.*;

import java.sql.*; import java.util.Vector;

public class OrderServerImpl extends UnicastRemoteObject implements OrderServer { Connection db; // connection to the db PreparedStatement unpaidQuery; // unpaid order query OrderServerImpl() throws RemoteException, SQLException { db = DriverManager.getConnection("jdbc:odbc:orders"); unpaidQuery = db.prepareStatement("..."); } public Vector getUnpaid() throws SQLException { ResultSet results = unpaidQuery.executeQuery(); Vector list = new Vector(); while (results.next()) list.addElement(new Order(results)); return list; } public native void shutDown(); }

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✞✟✞
  • JNIEXPORT void JNICALL

Java_OrderServerImpl_shutDown(JNIEnv *env, jobject this){ jclass cls; jfieldID fid; DataSet *ds; cls = (*env)->GetObjectClass(env, this); fid = (*env)->GetFieldID(env, cls, "dataSet", "J"); ds = (DataSet *) (*env)->GetObjectField(env, this, fid); /* With a DataSet pointer we can use the original API */ DSshutDown(ds); }

slide-28
SLIDE 28

28

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • ✄✆☎✞✝✠✟☛✡✌☞✍✟✏✎✒✑✓☞✔✡✖✕✗✕
✡✌✘✚✙✜✛✆✢✓✣✤✕✥✙✧✦★✑✌✣✩✡✪✛✬✫✮✭✍✯✱✰✳✲✵✴✌✎✞☎✷✶✆✑✹✸✞✑✪✑✪✛ ✺✼✻★✺✌✽✷✾✏✿✪✻❁❀✼❂✠❃✪❄❆❅✤❇✥❈✜✻✖✿✌❅❊❉✌❋
  • ✼❍✼■✬❏▲❑✤▼✠◆✏❑✌■✒❖✌P✆❍✼◗★❘✔❏❙▼❯❚✪❚✪■✔❱✤❲✧❚✳❘❨❳
❩❭❬✌❪✆❫❵❴❭❛✤❜✠❝❁❞❡❜❣❢✐❤✜❫✏❝✪❥✆❫❵❦✼❜❯❝✌❧♠❛✌♥✌♦❁♣✖❬✼qsr✷❬✌♥✌❝✪♥✔❫♠t✉❝✪❥✷❢★♥✷❬✖✈ ❬✷✇✳❤✜❝✌❧✤① ②④③❭⑤✤⑥④⑦✓⑧✤③⑩⑨✞❶✒❷✌❸✔⑨✒❹

slide-29
SLIDE 29

29

  • ✝✟✞
  • ✆✡✆☞☛
  • Application

Objects CORBA facilities CORBAservices Domain Interfaces

Object Request Broker

slide-30
SLIDE 30

30

slide-31
SLIDE 31

31

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

  • Server

Process Obj1 Obj2 Client Client Client Clients hold references to objects

✡☞☛✍✌✏✎✒✑✒✓✕✔✗✖✙✘✚✎✛✘✕✜✣✢✥✤✦✎★✧
  • ✪✯✪
✱✳✲✵✴✣✶✸✷✺✹✵✻✙✼✣✽✙✾❀✿✵✴✣✻✵❁✏❁✥❂✚✾❃✲✵✹❄❁✣✽❄✲✦✾❀✻✙✹✣✴❆❅
❁❄❂❋✿✦✾●✻✙❍■✲✵✹✵❍❏✾❀✻✕❂❄✾✚✷❑✻✕▲❄✻✙❍◆▼✙✾❃✿✕✱❖❍P✷ ❁✙◗
slide-32
SLIDE 32

32

  • typedef struct _Address {

string street; string postcode; string city; } Address; typedef sequence<Address> AddressList; interface Customer { ... };

Atomic types Object type Constructed types

  • module MyOrg {

typedef struct _Address { string street; string postcode; string city; } Address; }; module People { typedef struct _Address { string flat_number; string street; string postcode; string city; string country; } Address; };

Modules MyOrg::Address People::Address

slide-33
SLIDE 33

33

  • interface Customer;

typedef sequence<Customer> CustList; interface Supplier; typedef sequence<Supplier> SuppList; interface E-Org { readonly attribute string name; attribute CustList customers; attribute SuppList suppliers; ... };

Attribute type Attribute name changeable Clients cannot change value

  • interface Org {

... void getStockPrice(in Date d); string printDetails(); };

Parameter list Parameter kind Parameter type Parameter name Operation name used in requests Return types

slide-34
SLIDE 34

34

  • Org myOrgObj;
  • //Initialize myOrgObj to refer to a remote //Org
  • bject - more later
  • myOrgObj->printDetails();

(c) 2002 Hans-Arno Jacobsen (jacobsen@eecg.toronto.edu) MIE491f

✢✤✣✦✥★✧✩✣✫✪✬✣✭✧✩✣✯✮✱✰✱✣✳✲✵✴✦✥★✧✩✣✷✶✸✴✫✲✹✣✺✴✭✻✬✼✩✣✯✰✽✲✾✥✬✿❀✥✳❁✬✥✷✧❂✥✫✶✾✣✫✲✹✣✭✧ ❃ ✮❄✣✯✣✯❅❆✲✵✴❇✶✸✥✫✮❄❈❉✥❋❊●❊ ❍★❅❋✣✯✰✽✴✯✮✬✿❉✲✬✧■❈✱✰✽✲❏✥❄✮✱❅❑✰✽✴✫✮✽✿✽✲✬✧■❈✬✰✬✲❏✥❄✮▲✴✭✻✬✼✩✣✯✰✬✲ ▼❄◆★❖❋P✫◗❙❘❯❚✭❘❱❚✬❲✺❳▲❨✽❩✽❬■❭✱❪✽❩✾❩✵❫❇❴❙❫❛❵❜❖❆❩✹❴✭P❇❫✷▼✱❝■P✯❪❉❩❉❞ ❨▲❖❙❳✱❩■❳
slide-35
SLIDE 35

35

  • exception OutOfStock{sequence<Date> since;};

interface Org { ... short order(in Date d, in Stock s) raises(OutOfStock); }; Exception data Operations declare exceptions they raise Exception name

  • interface Organization {

readonly attribute string name; }; interface OpUnit : Organization { exception NotEnoughCash{}; readonly attribute short noOfStaff; readonly attribute Address location; void transfer(in Cash p) raises NotEnoughCash; }; Inherited by OpUnit Supertype Implicit supertype: Object

slide-36
SLIDE 36

36 One standardised interface One interface per object operation ORB-dependent interface One interface per object adapter

Dynamic Invocation Client Stubs ORB Interface Implementation Skeletons

Client Object Implementation ORB Core

Object Adapter

  • ✂✁