通过分析Oracle数据表实时备份系统中本地数据的生成速度和网络速度的不匹配所引发的问题,提出了一种基于内存映射文件的高速缓存方法.该方法通过与指针访问动态内存相同的方式来访问磁盘上的文件,从而实现快速高效地读写数据.并引入了一种基于二分法的探测报文速率的带宽测量技术,使系统能动态地适应网络状态.实验表明,该方法不但能使系统具有良好的实时性,而且保证了系统在不同网络状态下具有良好的稳定性和动态适应能力.
By analyzing a real-time backup system for Oracle database tables, in which the local data's generating speed was exceeding the network speed, this paper proposed a high-speed buffer method, based on memory-mapped file. This method can access files on disk with high speed, using the same way of accessing the dynamic memory by pointers. Meanwhile, this paper introduced a bandwidth measurement based on binary search algorithm, making the system adapt to the Internet dynamically. By experiments, it has showed that the system has good real-time ability, as well as stability and dynamic adaptability.