The Reactor works in synchronous mode and the Proactor works in asynchronous mode. High-performance servers must work in asynchronous mode. Therefore, ACE has the Proactor class group. ACE features cross-platform and blocking of technical details. Proactor should write a piece of code that can run on Linux, Windows, and other operating systems. In actual development, we found that the service program compiled by Proactor works very normally in Windows and does not work normally in Linux with kernel 2.6.X. For example, the customer's Connect operation cannot be returned. After check, the write and read operations must appear in pairs to work normally. That is to say, if a server is registered with the management server, the Management Server occasionally sends control commands to sub-servers, which cannot be implemented. This is fatal.
After research, it is found that the Proactor in ACE is an Asynchronous Operation implemented using the Posix standard on Unix. There is an AIO in Posix, And the Proactor uses AIO for asynchronous transmission. However, Linux does not support AIO in versions earlier than 2.6, while later versions support AIO. As this part supports, the Posix subclass cannot work normally.
After investigation, ACE developers knew the situation, but they did not take any measures. Think about it for yourself. The Unix platform has more than one Linux, and Linux supports Posix standards. This solution is idealistic. Linux will also support Posix sooner or later. In this case, ACE developers propose a solution, namely TProactor, which is developed by another person. This solution re-implements the Posix classes in ACE and simulates asynchronous operations using threads and select statements. This solution is also good, but ACE does not include this solution. I personally think this is an ideal and perfect choice for ACE developers.
After trying to install TProactor, I tried Posix_AIO again, which is a solution for simulating AIO. Using this solution, the classes in ACE will not be replaced, you only need to add libPosix_AIO.a To The Makefile of ACE.
Finally, I solved this problem. I think there will be a lot of Proactor using ACE that will encounter this problem. Now, my system is implemented with ACE + TProactor and Posix-AIO.
From: http://blog.newsfan.net/leelin/archive/2007/01/14/7248.aspx