摘要
为了实现小型的分布式系统内部的高效通讯,利用ZeroMQ(Zero Message Queue零消息队列)来实现分布式系统,并提出了把系统中央单元的数据传输功能分离出来,仅保留其目录服务功能,让客户机与服务器之间直接通讯的方案。中央单元manager为每一种服务创建一个消息队列来存储这种服务对应的所有服务器,并利用最近最少使用算法为每个客户机选择合适的服务器。manager与服务器、manager与客户机以及服务器与客户机之间的通讯都选用套接字对XREQ—XREP实现异步的双向通讯。由于Delphi2007能够方便地实现人机交互界面,选择其为开发平台。这个分布式系统用于轮轨检测实验中,大大提高了数据的传输效率,解决了实验中存储难的问题。
In order to achieve efficient communication within smaU-scale distributed system, ZeroMQ is used, and proposed to separate the data transmission capabilities of the central unit in the system, only remain the directory service capabilities, umt manager creates a queue used algorithm to select the and allow direct communication between client and server programs. The central for each service to store those servers providing this service, and use least recently appropriate server for each client. Socket-pair XREP_XREQ is chose for the asynchronous and two-way communication between manager and server, manager and client, server and client. Delphi2007 is easy for interactive interface, so it is chose for the platform. Using the distributed system in the wheel-rail testing , the efficiency of data transmission is greatly improved, and the difficulty in data storage is solved.
出处
《电子测试》
2012年第7期24-29,33,共7页
Electronic Test