This is a real multithreaded application server 100% coded in PHP 7.
It uses the pthreads PECL extension, in CLI mode.
It integrates the Xamboo CMS Framework and is build on top of the DomCore PHP Fundation Classes.
In this example it is compiled and installed into an alternative directory. It may be the default executable PHP in your OS too.
./configure --prefix=/usr/local/php7 --exec-prefix=/usr/local/php7 \
--enable-sockets --enable-pcntl --enable-maintainer-zts \
--enable-shmop --enable-sysvsem --enable-sysvshm
# you may add anything you need, for example:
# --with-pgsql=/usr/pgsql-9.2/ --with-mysqli --with-xmlrpc --with-curl
make
make install
ln -s /usr/local/php7/bin/php /usr/local/bin/php7
/usr/local/php7/bin/pecl install pthreads
cd /home/sites
wget http://webability.info/download/wawas/wawas.tar.gz
tar zxvf wawas.tar.gz
cd wawas
vi conf/server.conf
vi conf/http11/vhosts.conf
cd /home/sites/wawas
php7 runner.php
Configure in server.conf 1... to run in daemon mode, or the wawasctl will wait for any CTRL-C to finish
./wawasctl start
- Hooks on modules (working on them)
- implement maxs on #threads, #clients, #hits, sizes, headers etc
- heap corrupted when an error occurs (no vhost, 501, etc)
Analize, read, implement ?
- Authentication
- Chunks
- SSL/HTTPS in house
- Hooks
- gzip/compressed
- etags
- portable vhost names (full named host) to detect variants on resolution
- check anything against RFC to be 100% compliant
- Support big files for sending and streaming (and not saturate the memory) (see mod_static, eventually mod_streaming ?)
- mod_static => check mimes types and errors
- mod_file => DO ! view files in a directory (FTP type)
- mod_admin => generate the full admin site, hooks, realtile stats/JSON (Comet?) based on Xamboo
- mod_log => log on vhosts and others
- mod_php => use sandbox ? capture output, errors control, namespaces, overload classes ?
- mod_xamboo => integrates SERVER-APP variables (ej. REMOTE_HOST, REMOTE_ADDR, etc)
- mod_redirect => DO ! rediret engine
- mod_session => DO ! manage sessions
- Implement PSP (PHP Server Pages)
- servlets
- netbeans ?
- Comet module
- WSDL module
- Direct Socket
- a game, twit app, prives polling, realtime graph, edit document, etc
- terminate the chat
- Implement admin console fully realtime
- Implementation of phpunit tests for travis
- CTRL-C Gracefully ends the application, it does not hang anymore
- shutdown function has been removed
- tls parameter added in the listener definition
- Socket protocol added
- Comet Module added
- TLS on stream working, SSL supported
- TLSEngine created and implemented into the client, still working on structures
- ThreadedServer created for blocking streams on extra thread
- Listener is now volatile for ThreadedServer
- wawasctl included to start as a daemon
- buffer output catch on protocol to send notice/warning/errors to client
- ModuleAdmin is now a subset of Xamboo application server
- /include/admin added for administration application
- siteadmin added for administration root directory, JS and CSS added
- HTTP11 protocol timeouts and max petitions implemented
- Added context->petitions to know number of petitions of the thread, available on admin too
- listener bufferlenght implemented
- enhancement of SHM, mutex, semaphore and concurrency to make sure SHM is not corrupted under heavy load
- Added config parameter keepalive in vhost configuration
- Enhanced sockets control to ignore warnings on unexpected disconnection
- Error control on HTTP11Protocol->process has been improved for bad formed headers
- Definition of configuration files have been moved to include/configdef so it's easy to upgrade without moving the actual configuration
- Sockets timeouts adjusted so the execution is extremely light on CPU load
- Added box load into the admin system
- The engine has been totally rewritten for PHP7, namespaces, pthreads v3, and is now really multithreaded.
- The Xamboo has been integrated with the server as a module. This is the application server.
- The server is stable and can server static files and applications, however it is far to be fully implemented (protocols, modules, etc)
- wawasctl adjusted to work with wawas.php
- creation of WAWASBase.lib
- HTTP11: Implementation of LWS in headers parser (RFC 2068 p15, headers can be multilines)
- HTTP11: Multiple same keyword headers are now set into an array
- HTTP11: Implementation of anchor into request parser
- ModuleBox: Integration of Box pattern and module
This is the first alpha version. WAWAS is not still fully funcional and is under heavy developement. This is an alpha version, and may suffer any type of modifications anytime. This version "works" more or less, and may have lots of bugs. This is not a stable version or an official release. Do not use it for production sites.