Add Platform Services Abstraction Layer
---------------------------------------
Key: AXISCPP-856
URL: http://issues.apache.org/jira/browse/AXISCPP-856
Project: Axis-C++
Type: Improvement
Components: Basic Architecture
Environment: N/A
Reporter: nadir amra
Assigned to: Nadir Amra
I am creating this issue relating to something we talked about months ago in
the mailing list - you can search on "Platform abstraction layer thoughts" in
the axis-c-dev mailing list. To summarize and refine the discussion, 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 (still to be hashed out) 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/library called, for lack of a better name,
axis_platformservices. The AXIS engine will need to link to this DLL/library
and thus it will need to be created first prior to creating any other
DLLs/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 platform abstraction layer a separate library that will be statically
linked to other service programs.
The abstraction layer can also be used for to possibly simplify tracing support.
More details later.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira