Code Monkey home page Code Monkey logo

fastcgipp's Introduction

                              fastcgi++
                           _VERSION_
                            _DATE_
                             Eddie Carle

Introduction

The fastcgi++ library started out as a C++ alternative to the official FastCGI 
developers kit. Although the official developers kit provided some degree of 
C++ interface, it was very limited. The goal of this project was to provide a 
framework that offered all the facilities that the C++ language has to offer. 
Over time the scope broadened to the point that it became more than just a 
simple protocol library, but a platform to develop web application under C++. 
To the dismay of many, this library has zero support for the old CGI protocol. 
The consensus was that if one were to be developing web applications under C++, 
efficient memory management and CPU usage would be a top priority, not CGI 
compatibility. Effective management of simultaneous requests without the need 
for multiple threads is something that fastcgi++ does best. Session data is 
organized into meaningful data types as opposed to a series of text strings. 
Internationalization and Unicode support is another top priority. The library 
is templated to allow internal wide character use for efficient text processing 
while code converting down to utf-8 upon transmission to the client.

Features

 * Support for multiple locales and characters sets including wide Unicode and 
   utf-8
 * Internally manages simultaneous requests instead of leaving that to the user
 * Establishes session data into usable data structures
 * Implements a task manager that can not only easily communicate outside the 
   library, but with separate threads
 * Provides a familiar io interface by implementing it through STL iostreams
 * Complete compliance with FastCGI protocol version 1

Overview

The fastcgi++ library is built around three classes. Fastcgipp::Manager handles 
all task and request management along with the communication inside and outside 
the library. Fastcgipp::Transceiver handles all low level socket io and 
maintains send/receive buffers. Fastcgipp::Request is designed to handle the 
individual requests themselves. The aspects of the FastCGI protocol itself are 
defined in the Fastcgipp::Protocol namespace.

The Fastcgipp::Request class is a pure virtual class. The class, as is, 
establishes and parses session data. Once complete it looks to user defined 
virtual functions for actually generating the response. A response shall be 
outputted by the user defined virtuals through an output stream. Once a request 
has control over operation it maintains it until relinquishing it. Should the 
user know a request will sit around waiting for data, it can return control to 
Fastcgipp::Manager and have a message sent back through the manager when the 
data is ready. The aspects of the session are build around the Fastcgipp::Http 
namespace.

Fastcgipp::Manager basically runs an endless loop (which can be terminated 
through POSIX signals or a function call from another thread) that passes 
control to requests that have a message queued or the transceiver. It is smart 
enough to go into a sleep mode when there are no tasks to complete or data to 
receive.

Fastcgipp::Transceiver's transmit half implements a cyclic buffer that can grow 
indefinitely to insure that operation does not halt. The send half receives 
full frames and passes them through Fastcgipp::Manager onto the requests. It 
manages all the open connections and polls them for incoming data.

Dependencies

 * Boost C++ Libraries >1.35.0
 * Posix compliant OS (socket stuff)

fastcgipp's People

Contributors

eddic avatar bertoldia avatar someonegg avatar kassak avatar bstoeger avatar melvinrook avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.