Cov khoom siv tsis raug tuaj yeem raug sib tw thiab tshem tawm. Ib tug stub nyob rau hauv kev faib xam yog ib daim ntawm cov cai uas converts tsis dhau ntawm tus neeg siv thiab neeg rau zaub mov thaum lub sij hawm ib tug tej thaj chaw deb txheej txheem hu (RPC). Lub tswv yim tseem ceeb ntawm RPC yog tso cai rau lub khoos phis tawj hauv zos (tus neeg siv khoom) kom hu xov tooj rau cov txheej txheem ntawm lwm lub computer (server).
Dab tsi yog cov cim cim hauv RPC?
A stub subprogram (interface object) yog a Natural subprogram uas yog siv los txuas tus neeg siv kev hu xovtooj mus rau subprogram ntawm server. Client stub subprograms yeej tsis xav tau yog tias tsis siv neeg Natural RPC (Remote Procedure Call) raug siv nrog ib qho tshwj xeeb tshwj xeeb tau piav qhia hauv qab no.
Yuav ua li cas yog ib tug stub li cas lawv generated?
Stubs yog tsim los ntawm manually lossis tau txais. Nyob rau hauv ib tug phau ntawv tiam, ib tug tej thaj chaw deb txheej txheem hu rau implementer muab kev txhais lus, uas tus neeg siv tsim stubs. Lawv tswj cov txheej txheem parameter. Tsis siv neeg stub tiam feem ntau yog siv los tsim cov stubs.
Lub luag haujlwm ntawm stub yog dab tsi hauv kev tua RPC Yuav ua li cas stubs ua RPC kev ua tiav pob tshab?
RPC mechanism siv cov ntsiab lus ntawm stubs kom ua tiav lub hom phiaj ntawm semantic transparency. Stubs muab cov txheej txheem hauv zos hu ua abstraction los ntawm kev zais lub hauv paus RPC mechanism. Cov txheej txheem stub cais yog cuam tshuam nrog ob tus neeg siv khoom thiab cov txheej txheem server.
RPC siv li cas?
RPC yog kev thov-lus teb raws tu qauv. Ib qho RPC yog pib los ntawm tus neeg siv khoom, uas xa cov lus thov mus rau lub chaw taws teeb paub paub los ua cov txheej txheem tshwj xeeb nrog cov khoom siv. … Muaj ntau qhov kev hloov pauv thiab kev hloov pauv hauv ntau qhov kev siv, ua rau muaj ntau yam sib txawv (tsis sib haum) RPC raws tu qauv.