Mario Grotschar wrote:
Ah ok. I see that in M4 everything is a module to httpd server. So in M4
there is no way to run the runtime without httpd server? What was the reason
for changing to this different approach?

M3 supported HTTPD as well. Some of the limited SOAP-only samples used Axis2/C axis2_http_server, but the HTTPD integration was a more solid option.

There were (and still are) issues with the axis2_http_server integration:
- only worked for SOAP and no other bindings in the same app;
- limited support for HTTP, no HTTPS or multipart requests for example;
- caused memory leaks, and eventually crashes;
- forced to run multithreaded (problematic with some libraries).

See [1][2][3][4] for some of these issues. In [1][3] the Axis2/C folks themselves are recommending to use HTTPD instead in production.

The latest code requires HTTPD, but with a little bit of work, it should be possible to not require a server at all in client-only apps. Let me know if you're interested in working on a few runtime changes to support that (but you'll see below that HTTPD is not that big...).

The problem for the project we would like to use SCA for is a very limited
host system, offering only 25 MB of disk storage.

As far as i can see in M3 the native SCA binding uses ws and therefore the
AXIS2 server, so unless i use REST I dont need the HTTPD server. The runtime
will load the modules directly.

About the size of the binaries, here are a few numbers which I hope can help you (Ubuntu 9.10 build without debug symbols).

Subset of Tuscany-cpp for C++ components, JSON-RPC and ATOM bindings:
/tuscany-sca-cpp-bin$ du -c modules/server modules/http
24      modules/server/htdocs/js
28      modules/server/htdocs
708     modules/server
20      modules/http/conf
76      modules/http
784     total (0.8Mb)

Subset of HTTPD needed by Tuscany-cpp (see the list of modules in [5]):
/httpd-2.2.15-bin$ du -c bin lib modules
516     bin
748     lib
756     modules
2020    total (2Mb)

With the latest code you can just use the JSON-RPC binding, which is lighter than the old SOAP binding. Let's add the library used for JSON:
/tracemonkey-bin$ du -c lib/libmozjs.so
1704    lib/libmozjs.so
1704    total (1.7Mb)

That gives us a total of 784 + 2020 + 1704 = 4508Kb (4.4Mb).

That's all you need to run your SCA components, with robust support for HTTP, and JSON-RPC and ATOM/REST bindings.


If you want SOAP, you need the Tuscany-cpp Web service component:
/tuscany-sca-cpp-bin$ du -c components/webservice
656     components/webservice
656     total (0.6Mb)

and Axis2/C:
/axis2c-1.6.0-bin$ du -c axis2.xml bin lib modules
8       axis2.xml
268     bin
1864    lib
52      modules/addressing
24      modules/logging
80      modules
2220    total (2.2Mb)

That's a total of: 784 + 2020 + 1704 + 2220 = 6728Kb (6.6Mb)

Is M3 completly obsolete or is there any interest in pursuing this architure?

M3 is more than 3 years old, that's getting old :)

Here is an analysis of the M3 binaries.

Subset of Tuscany-sca-cpp-M3 for C++ components, SOAP and REST bindings:
/tuscany-sca-cpp-M3-bin $ du -c extensions lib
148     extensions/cpp
248     extensions/ws
108     extensions/sca
320     extensions/rest
828     extensions
532     lib
1360    total (1.3Mb)

I'm including the SOAP binding here as I'm assuming that you need an RPC-type binding and won't do everything with REST, and there was no JSON-RPC binding in M3.

You also needed Tuscany-sdo-M3:
/tuscany-sdo-cpp-M3-bin $ du -c lib
1192    lib
1192    total (1.2Mb)

So, including the recommended HTTPD and Axis2/C, M3 needed at minimum:
1360 + 1192 + 2020 + 2220 = 6792Kb (6.6Mb)


We can discuss the various packaging options, but if you're really constrained by disk storage, I'd suggest the latest code with JSON-RPC instead of SOAP, 4.4Mb including HTTPD.

Now, if you really want to use M3 or integrate the latest code with axis2_http_server again, that's OK too. I'll try to help as much as I can when I find some spare time.

[1] http://wso2.org/forum/thread/8779
[2] http://markmail.org/message/dfbbnnpnmlraxv2w
[3] http://markmail.org/message/kz6gnorlrj3smjjs
[4] https://issues.apache.org/jira/browse/AXIS2-4756
[5] http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/modules/http/httpd-conf

Hope this helps.
--
Jean-Sebastien

Reply via email to