FAQ
How can I get AOS?
Download the latest at SourceForge
Why C++?
C++ for speed and because I enjoy writing code in it. There are lots of Java servers out there, so if portability is what you want at the cost of performance, then Apache Tomcat is a great container for servlets and JBoss is great at J2EE. I personally do not like the deployment model of servlets or J2EE as it takes away from fluidity of coding and debugging and often takes way too long to deploy, attach a debugger, etc; AOS fully re-builds in a few minutes on a low end laptop and since your are running the actual server you don't have to attach anything you are debugging everything (very convenient). If you want the ability to write fast and efficient code or want something that will natively use your existing C/C++ code then you have a choice of using Java and JNI or do it cleanly and elegantly using AOS modules.
Why Windows only?
Since I am the only one working on this in my spare time, I had to make a decision of writing a highly efficient yet mildly platform dependent server or lowest common denominator that is portable. I picked the former. The code is written in an abstracted way so that porting it to linux will be easy (and a bunch of non-OS dependent code already builds with g++). If I was doing this full time (and ideally I would love to work on this full time), I could port it to pretty much anything; however I do have a full time job which only allows me to work on this some evenings and maybe on weekend. I did set up linux and started converting some code to compile on g++ so it's coming soon.
Why AOS, aren't there enough application servers in the world?
There are way too many J2EE based application servers, but there are few C++ application servers (and this is the only one explicitly optimized for speed to cater to AJAX). Generally C++ code requires a bit more discipline but gives you a much better control over memory allocations and execution optimization. C++ compiled code runs natively unlike Java code which runs through an interpreter. Java is a great language and quite capable (I use J2EE daily), I think AJAX applications need the fastest possible response times to improve the user experience and for that reason I prefer applications written in C++.
How is AOS different than CGI with Fast-CGI?
CGI applications are monolithic and often require a bit of effort in processing input such as form data or file uploads. Fast-CGI is
a useful utility for caching these executables. freeCGI++ was built to help with CGI writing. AOS is an application server that
has built in ability to process HTTP request and allows one to write custom input processing steps; currently form input and file upload are
supported and it is easy to write XML, SOAP or similar handlers for any type of HTTP request data processing.
How is the code executed?
AOS uses a Model-View-Controller (MVC) execution pattern. Each controller contains an input processor (default will only process the request URL and query string); this is optional if you do not have POST form then no input processing is needed. Next there is a sequence of executable modules, each one works on the output XML document (model);
this is the business logic and at least 1 is required. Modules have access to global parameters, session variables, context data, request header, response header, database connection pool, output XML model document and a lot more.
Last is the output generator, also optional, default is raw XML; JSON, XSLT, Template expansion and others are available and custom output generators can be written (this allows complete isolation of business logic from presentation view). Writing input processors, modules and output generators is very simple and can be grouped into libraries that the server can load on startup (based on configuration), so you can modularize the code and allow
many different groups to work on specific functionality and plug it in as needed.
Can I rewrite URLs? Is there directory specific control?
Each directory can have a set of modules that always execute before input is processed. These modules are just like the modes that get executed after input processing. Here you can alter the request URL, insert data into the model, or pretty much change the way the code runs. You have access to the AOSContext object which is the kitchen sink of data. Wiki processor is written using this by first looking at the path/file requeste, then remapping it to the wiki command with the path info as a query string parameter. This is very flexible and can easily personalize the commands to produce output based on input or user information.
How is AOS different than JSP or servlets or beans?
There are a lot of parallels with all these technologies when applied to web applications. AOS is designed to be an XML document server and allows you to build they quickly and efficiently. AOS also has display capabilities to transform XML into some other form. XSL tranformation via Xerces/Xalan and a simple xpath template engine are povided; however in most cases XML document will be the final form (as in the case of AJAX or WML or WAP or similar).
Does AOS work with MFC or ATL or COM?
Yes, AOS is a streamlined execution engine and if your code needs to call outside functions, it can accomodate it. AOS is useful for providing an XML front-end to legacy systems that have custom C/C++ based API calls.
Is there database support?
AOS provides basic SQL query support for MySQL, ODBC and SQLite. With ODBC you can connect to any other ODBC compliant database (Oracle, Sybase, Informix, Access, etc). AOS provides code of calling SELECT and converting it into XML data for display purposes. It also allows you to execute any SQL code that you can call. You can write custom code to access the database as needed (transactions, cursors, etc); but those are not provided as they are very database specific and there are many database layer libraries available that can be used. There is a simple connection pooling, but since implementation is often database specific, only basic pooling is provided. The reason this is not very extensive is that there are a lot of databases out there and each has specific quirks to it. There are also a lot of database libraries available, so the decision was made to leave this part to the implementation and 3rd part libraries.
Is there support for scripting
It has embedded Lua which is a powerful and very fast scripting language. Lua scripts can be used as modules or part of the output page. Lua gets access to the output model and some AOS internals. It is also easy to write extensions to lua to give it access to more.
Does it have a built in rules engine?
Rules can be easily written using lua or a custom module, explicit rules engine can be implemented, but lua does such a great job why not use it.