ѧ
JOURNAL OF SOFTWARE
1999ꡡ109ڡVol.10No.91999



ֶ֧̬õķֲʽģ*
ӱµлܽũ
ժҪֲʽϵͳĶ̬˸оߵĹ㷺ע.ĶͼṹķֲʽģGOM(graph-oriented model)͸Ľ,ֶ֧̬õĳģExGOM(extended graph-oriented model).ExGOMṩ˶ֻͼṹò.ûļϵͳṹĶ̬仯,Ҳڳòж̬.һʹϵͳֲ֧ԤƵĶ̬.»ԶAgentʵExGOMϵͳṹ.
ؼʡֲʽ,̬/,ݴ.
ͼšTP311
A Hierarchical Distributed Programming Model Supporting Dynamic Configuration
LIU Ying,CHEN Dao-xu,XIE Li,CAO
(State Key Laboratory for Novel Software Technology Nanjing University Nanjing 210093)
Jian-nong
(Department of Computing Hong Kong Polytechnic University Hong Kong)
AbstractIn the recent years, the importance of supporting dynamic configuration in distributed systems has been widely recognized by many researchers. A new model ExGOM(extended graph-oriented model) supporting dynamic configuration by improving and extending GOM (graph-oriented model) is proposed in this paper. ExGOM supplies abundant configuration functions based on graph constructs. The user can define dynamic changes of the system architecture in the configuration file, or by using the configuration functions in the programs. This is a significant attribute so that the model can support unpredicted(non pre-planned) dynamic configuration. Also in this paper, the system architecture of the model implemented by a multi-agent mechanism is presented.
Key wordsDistributed programming, dynamic configuration/reconfiguration, fault tolerance.
ף1,һͼṹķֲʽģGOM(graph-oriented model).GOMͼṹԲ,ʹûķֲʽԹһ߼ͼṹ֮,ûͼĸͨԭ(SendToParent,SendToChildren,RecvFrmParent,RecvFrmChildren)Լԭ(ͼɡͼ),Ӷ̲ϵͳά.SUNվϲPVM2ṩײ֧֣ͨΪGOMʵһϵͳ,CԵķʽṩһ.GOMе߼ͼ庯ԼһЩĳ̶ֳṩ˶Զ̬õ֧,ûһ˼.GOM,ûȶһ߼ͼṹ,ȻֱLP(local process)ͼϽӳԼ㵽ӳ,ͨStartExecute()нִ.ЩһΪس򡱵ĳбд.س൱һļ.,ļֻ˾̬õ.ĳ̶̬ɸӽʱ,һڸýȥ.һʼ,Ͳٸ.,GOMûⶨ߼ͼṹ,ӳ̼ϵ.
ڵĹGOM,ʹֶܹ֧̬.,ҲϣͨGOMĸĽ,ʹʺĳһķֲʽӦ(ΪλķֲʽӦá).
1 ̬
ֲʽϵͳеĶ̬3.
(1) ϵͳйͼĶ̬չ(,ͼָӳ˽̼ڿƹϵ߼ͼ).˵,ִָй,ĳܻᶯ̬ز,ʹϵͳͬѩһչĳִ,ͼɾȥ,ʹϵͳ.źвȷ.
(2) ϵͳйе.Ҳ˵,ͼĳһֱ߰汾滻ĳһ¹ģ.һͨҪ˵ĸԤ,Ҫͣϵͳ,ٻָ.
(3) ϵͳйϻԭ(縺ءЧʵ),ӳ䵽.
Կ,ǰĶ̬仯,һϵͳĶ̬仯.ϵͳĸıĶ̬漰ݴ㡢ǨƵ.ĿGOM,Ľԭеϵͳṹ,ֶ֧̬,ʹϵͳý߼ͼĽṹ,ͨͼϵĲ,ܵƷ.
2 ֶ֧̬õĳģ
2.1 λķֲʽӦ
ֲܶʽӦ,ȻĽǶȥ,ǶвλĽṹ,,ϵͳԤƱϵͳԼclient/serverģʽӦõ.,һ,ǽһֲʽӦñʾһöεġ.áҲGOMе߼ͼṹ.,߼ͼṹʹûԿͼϵĸͨԭи߲ͨ,Ϊ̬ṩһĿ.,ĽνṹĲλֲʽӦµֶ֧̬õĳģͽϸ,ģµϵͳṹ.
2.2 ģ
ǽģͳΪExGOM(extended graph-oriented model),ԱʾǶGOM.ûǶȿ,ExGOMLP(local process)ļ(configuration file).
(1) û(LP)
ͨŲÿLPһĹ.ȫ˳һرд.LPͨŲûͼĸͨԭ.ʹúͨԭｫݳʼ.ǵνṹΪ߼ͼṹ,ÿLPParent,Child/Children,Brother/Brothersͨ,Խͨ.ĿǼǿϵͳ,̬ʱ,ٵӰϵͳֵ.,ExGOM,һְͨŵķʽ,SendToChildren(type,...),һɸѡ͵Ľ.
òGOMͬ,Ϊֶ֧̬,LPж,ЩLPһʹ,֮ͬǣǱıʱ,ûʽصϵͳreconfig(var).reconfig()֪ͨϵͳļе˸ı.ϵͳ鶯̬õǷ,,ִļеĶ.ͨreconfig()еĶ̬һԤȰ(pre-planned)ȴȷطĶ̬.ûͨıļвԤ(non pre-planned)Ķ̬.
LPҲʹϵͳṩĻͼṹú,AddNode,DeleteNode,ReplaceNode.,ûѡʹļж̬ûڳֱӽпԤȰŵĶ̬,ϵͳ.ΪпĳЩֲʽӦõĶ̬ܼ򵥣йж̬õ,ļԱı.,LPʹϵͳúԲȷؼµĹģҲ.µLPɱҪĳʼͨAddNodeԼҽӵνṹĳ,Ϳ޷Ƕϵͳ.½ļ뽫Ӱ丸,ֻҪϵLPȫûͼṹͨԭ.
ģԣ ÿӦõ߼ͼӦһͼʶ,ײϵͳӦõ߼ͼṹ,ͼṹĲͼΪһ,ϵͳֻʱżǷȷ,ӦóԭеLP¼LPɶ.
(2) ļ
ļһд.ĳֳдļΪ˵ϵͳк,ǿͨ޸ļӰ͸ıϵͳ.ԲλķֲʽӦ,ļҲòλĽṹ.ÿļɿ,ÿȲ2.Щװγһ.
ļExGOMĹؼ.ÿļʼòֺͶ̬ò.ʼòGOMسĹһ,߼ṹ,ҶLPнӳԼ㵽ӳ.̬ò(),ʲô·ʲôò.дCԵдһ,ȻļһCԴ.öԺʽд,(Add)ɾ(Delete)(Upgrade)(Degrade)滻(Replace)һ(Node)(Tree),Լ(Clone)һ(Node)(Tree).ƪ,йؾļιڴ˲.
2.3 ϵͳṹ
ͼ1ֶ֧̬õķֲʽϵͳĽṹ.ͼLPָǾ̬Ĺģ,Ƕ̬еĽ.ļЩLPʵʱ.

ͼ1ֶ֧̬õķֲʽϵͳĽṹ
ÿļӦһô(configuration agency),ϵͳԶ.ÿô3AgentɣʼAgent(Iagent)̬Agent(Dagent)ԼݴAgent(Fagent).ЩAgentļ,ΪҪýЭ,õɺ͸ı.ʼAgentȡļʼֵ,ֱ.LPreconfig()ʱ,õĶ̬AgentյϢ,鶯̬,ȡӦĲ.ϵͳ,Ǽݴ.,ĳһ,ϵĽ̶ʧ,ʱһ䷢Żȴش,õʧܵϢ,ʱתӦôݴAgent,ݴAgentʵĲʹûӦþӰ.ݴĿϣڷӲʱ,ϵͳ̱,ͣԱָ,δļûݴµĶ̬,ȫϵͳ.
״̬(state)ԱӦôϢ,ӳ(mapping)Ϣ.
޸Agent(Eagent)ûṩ޸ļĹ.ļϵͳڼҪôʹ,ͨ޸Agent޸ļ,һά.ǲöռʹ÷ʽļ,ÿʱֻһ޸AgentAgentʹļ.
LPͨǻͼṹҲϵͳýṹͨ,ͨȽͨŹAgent(Cagent)бҪ,תײϵͳȥʵ.
ExGOMGOMϵͳͬӦõ߼ͼԼԵAgent.
3 عд
ֲʽϵͳĶ̬˸оߵĹ㷺ע.оݰֲʽĶ̬ԡֶ֧̬õķֲʽԼײϵͳԶ̬õֻ֧Ƶ.ķֲʽϵͳAda3ݣCSP4ݵṩԽṹ,ϵͳƽϵúܽ,ֲ֧ԤƵĶ̬.Argus5Ȼṩ˺̶ܴȵĶ̬ù,ȻδƷ뿪,ǶʹøıĺԵõ֤.һЩֲʽϵͳ(configuration language),ϵͳƷ.һϵͳCONIC6ݣDurra7ݣDarwin8ݵ.CONICȻ֧ߵ,ҪߵĸԤ,Ҳݴʵ.DurraһʵʱֲʽĽṹ,ʱʽԤȰŵ.ȱǲ,Ҳֲ֧ԤƵ.DarwinǶCONIC.DarwinӲĽṹ,ҿЩṹĶ̬仯.
ExGOMϵͳĲ֮ͬڣϵͳòͼṹ֮ϣļ,ûѡڳֱӼòļмöεļļеCԵ,ָӵֲ֧ԤƵĶ̬ã֧3ֲͬĶ̬.
Ҫֶ֧̬õķֲʽϵͳĳģ,ϵͳĽṹ,дд.Եľȷ壻Ըֲ̬ͬĴ㷨̬Ӧóһ(consistency)(integrity)άͼṹĶ̬õĹ,ڲöAgent(multi-agent)˼Agent֮Э̡.Щ⽫ڽо𲽼Խ.
ͨѶϵˣӱ,Ͼ 210093,Ͼѧѧ뼼ϵ
߼飺ӱ,Ů,1973ʿ,ҪоΪֲʽϵͳ,м,ݴ.
µ,1947,ҪоΪֲʽϵͳ,м,.
л,1942,ʿʦ,ҪоΪмֲʽ.
ܽũ,1960ʿ,,ҪоΪֲʽϵͳ,ݴ.
ߵλӱµлϾѧ¼صʵ Ͼ 210093
ܽũѧϵ ۣ
οף
1ӱ,л,ܽũ.ͼṹķֲʽģGOM.ѧ,1998,21(1):1825 (Liu Ying, Xie Li, Cao Jian-nong. GOM:a graph-oriented model for distributed programming. Chinese Journal of Computers, 1998,21(1):1825)
2Geist Al, Beguelin Adam, Dongarra Jack et al. PVM: Parallel Virtual Machine: A User's Guide and Tutorial for Networked Parallel Computing. Cambridge: MIT Press, 994
3Referenced Manual for the Ada Programming Language. U.S.A, Department of Defense, Proposed Standard Document, 1980
4Hoare C A R. Communicating sequential processes. Communications ACM, 1978,21(8):666677
5Bloom T, Day M. Reconfiguration and module replacement in Argus: theory and practice. Software Engineering Journal, 1993,8(2):102108
6Magee J, Kramer J, Sloman M. Constructing distributed system in Conic. IEEE Transactions on Software Engineering, 1989,15(6):663675
7Barbacci M R et al. Durra: a structure description language for developing distributed applications. Software Engineering Journal, 1993,8(2):8394
8Magee J, Dulay N, Kramer J. Structuring parallel and distributed programs. Software Engineering Journal, 1993,8(2):7382
ոڣ1998-06-08޸ڣ1998-09-14
