axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Whitlock <>
Subject Fw: Platform abstraction layer thoughts
Date Thu, 19 May 2005 09:30:41 GMT

Hi Nadir,
+1 to putting all platform-specific code in the platform abstraction layer.

The disadvantage of linking the platform-specific code into a separate
library is that it stops the compiler from optimising small functions by
inlining them. I guess the platform-specific layer is likely to be full of
such small functions. The advantage of linking the platform-specific code
into a separate library is that the transport, channel and XML parser
libraries could all link with the PS library (since they are not linked
with the AxisClient library).

Which do you prefer?
Mark Whitlock

----- Forwarded by Mark Whitlock/UK/IBM on 19/05/2005 10:15 -----
             Nadir Amra                                                    
             18/05/2005 22:33            
             Please respond to                                     Subject 
              "Apache AXIS C           Platform abstraction layer thoughts 
             Developers List"                                              

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

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:


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,   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:


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

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

View raw message