AndreWS' Design Overview

This page describes AndreWS' design solutions.



Flexible object oriented architecture is a main feature that distinct AndreWS' from other embedded servers.  It alows you to easily extend and tune this server for your needs.



I developed AndreWS' for being platform independed but by now it supports only Win32.  Platform independence is going to be achived by the following means:

  1. Boost library threads, regexpr, filesystem, etc. 
  2. Network portability layer  -  object oriented wrapper over sockets api. 

Layered architecture

The program can be splitted on architectural layers by the following way:

  1. Servlets
  2. WebServer
  3. Protocol
  4. Connector
  5. Network (portability layer)
  6. Sockets API. 


Servlets in AndreWS' are most like Java Servlets. They are responsible for handling incoming HTTP request and produce responses.


WebServler stores collection of servlets. Each servlet is bound to some query pattern. WebServer is also a facade that assembles all other components of the software. It includes: configuration object, connector, protocol factory and other components.



Protocol is an abstract component that responsible for interpreting data received from a connection and preparing a response.  Protocol is represented as abstract class and can be subclassed to implement different protocols, SMTP for example. WebServer uses HTTP11Protocol subclass that implements very limited subset of HTTP/1.1. HTTP11Protocol performs request parsing, response serializatin, memory management, and other tasks.



Connector is a core component of the architecture. It's manages  server socket, selector, threads pool, keeps collection of active connections and e.t.c. Connector is low level component it konws nothing about how to deal with a data transfered through network connection, it delegates data processing to Protocol.  Connector communicates with Protocol by means of events and Buffers.


Network (portability layer)

Network portability layer is thin object oriented wrapper over operation system depended sockets API.


Sockets API