My thoughts on the platform abstractions layer is as follows. Note that I will initially focus on the client-side of things, but I hope to also eventually get to the server side to see what needs to be abstracted.
Just to level-set, the goal is to attempt to concentrate as much as possible any platform differences in one area - code will be located in the platforms/ directory. There occasionally will be times when this cannot be done, but hopefully those occasions will be few and any platform-specific code changes required outside of platforms/ directory will be minimal. I have initially identified several areas that need to be abstracted: DLL loading, mutex, socket, and obtaining OS errors. There may be more (such as event log for FFDC kinds of stuff - on Unix maybe syslog() will be used, on windows to the event log), but that will be identified and done later. The idea is to have classes for the various platform-specific stuff. The header files and default implementation would be in platforms/ directory as follows: platforms/AxisPsLibraryLoader.hpp platforms/AxisPsLibraryLoader.cpp platforms/AxisPsMutex.hpp platforms/AxisPsMutex.cpp platforms/AxisPsSocket.hpp platforms/AxisPsSocket.cpp platforms/AxisPsOSError.hpp platforms/AxisPsOSError.cpp The default implementation of these classes will be patterned after Unix and packaged in a DLL/share library called, for lack of a better name, axis_platformservices.so. The AXIS engine will need to link to this DLL/shared library and thus it will need to be created first prior to creating any other DLLs/shared libraries. The implementation code for other platforms will be in each platform directory. For example, OS/400 will need to have its own AxisPsLibraryLoader.cpp file so one will be located as follows: platforms/os400/AxisPsLibraryLoader.cpp When building the axis_platformservices DLL/shared library, which files are build is dependent on the platform. For example, OS/400 would build everything in platforms/os400/ and would also build platforms/AxisPsMutex.cpp, platforms/AxisPsSocket.cpp and platforms/AxisPsOSError.cpp. The creation of the classes and implementation will be done as part of stage one. I will also attempt to modify the ant build scripts to build the DLL/shared library. However, I have no expertise with makefiles so someone would need to do that. Stage one would just be putting the stuff in CVS and for all of you to look at and comment on. Everything should still build as it does now. Stage two would be to change the Axis engine to use the above classes and link to the service program. Again, someone would need to volunteer to update makefiles. At this point in time the ant build would work but the make would fail unless someone updates the makefile. For stage three, if we still want to go to APR, the default implementation can be changed to use the APR APIs, and if a platform wants to go that way they can, otherwise, a platform can still have its own implementation of the classes. This will protect platforms that may not have all the APR APIs, or do not have APR at all. So what do you think? Nadir K. Amra
