节点文献
在线模拟法庭服务器的设计与实现
Design and implementation of server for moot court online
【摘要】 针对模拟法庭服务器存在大量并发客户请求问题,引入了完成端口(IOCP)多线程控制模型,建立了以主线程、监听线程、服务线程为核心的服务器架构。通过分析数据包的错序原因,提出了具体的解决方案。利用池技术思想,设计了线程池和数据库连接池,较好地解决了多线程竞争资源问题,有效避免CPU在线程调度和切换上的大量开销,充分利用了系统资源。经系统测试结果表明,该服务器能够支持海量并发连接,并具有较强的可扩展性和稳定性。
【Abstract】 Aimed at the problem of a large number of clients’ concurrent requests in moot court,IOCP multi-threads controlling model is introduced,and the server framework which is made of main thread,watcher thread and service thread is constructed.By analyzing the reason of out-of-sequence data package,an appropriate solution is presented.Thread pool and database connection pool based on pool technology are designed,which solves the problem of multi-threads competition,effectively lowers consumption of CPU in switching and regulating the work thread,completely uses system resources.Experimental results show that the server can support massive concurrent connections,and has high scalability and performance.
【Key words】 multi-thread; I/O completion port; moot court; scalability; server;
- 【文献出处】 计算机工程与设计 ,Computer Engineering and Design , 编辑部邮箱 ,2010年21期
- 【分类号】TP368.5
- 【被引频次】1
- 【下载频次】80