www.antiaction.com / mayhem
About:
Mayhem started out as a small project, the initial goal was to implement a small web server in java and to learn from this process.
After a year of steady updates this resulted in a mostly compliant HTTP/1.1 web server using custom plugins to serve static files and display directory listings.
Its been running almost from the start hosting this site and doing so with increasing flexibility.
Fairly quickly after getting it to work with custom dynamic plugins the next logical step was to implement the servlet specifications from Sun and take it from there.
In my case the servlet2.3 specifications, leaving out jsp at first.
I made a minimal implementation of the POP3/SMTP services for a course at uni.
POP3 is all but complete. SMTP is missing relay. IMAP4 implementation is usable.
Other projects of interest are FTP and NNTP servers which build on the same core as the web server.
I have a working package for transmitting and (dis)assembling DNS messages which
I might soon be expanding into a small service, atleast for A, MX and a few other record types.
Services:
Server 0.50
HTTPd(Servlets/JSP) 0.87
SMTPd 0.60
POP3d 0.80
IMAPdv4 0.75
DNSd 0.10
IRCd 0.75
Files:
javadocs - no frames (updated: 04 jan. 2006).
History:
- 2001-2002: Prototype webserver handling GET and caching the whole site content at startup.
- 2002-2003: Soon came virtual host support (hardcoded), experimental cookie support. File serving was made into a custom plugin, dir listing plugin was added. POST support was added (multipart and url-encoded).
- 2003: Implemented some buffered streams. The custom plugin outlived its usefulness and work started on implementing the Servlet 2.3 specs.
- 2003-2004: Smarter ThreadPools, interfaced Object Brokering/Worker, refactored. Decided to recode most of everything central to mayhem, and make everything configurable at last. ServletContexts can be instantiated from web.xml and virtual hosts are configured externally with the rest.
- 2004-2005: Almost complete Servlet2.3 container, complete pop3 except delete, incoming smtp.
- 2005: Features missing before httpd v1.0 include; complete logging, context resources, complete http digest auth and error handling. Workable IMAP4 service.
- 2006: Partial JSP engine and generic template engine.
- 2007: Partial DNSd.
- 2008: Working IRCd.
- 2009: Work on Mayhem2 framework and services begun.
Features:
- Mayhem Framework
- Multithreaded generic service layer.
- BindSocketFactory.
- Binder.
- ObjectBroker.
- ThreadPool.
- ObjectWorker.
- ObjectPool.
- Reusable. (FTP, POP3, SMTP, NNTP, etc..)
- XML config. (Currently uses the dom4j XML parser.)
- JNDI
- DataSources.
- POP3/SMTP Service Managers.
- POP3/SMTP Storage Managers.
- SMTP Spool Managers.
- HTTP/HTTPS
- HTTPS using JSSE. (SSLv3)
- Virtual hosts.
- InputStream.
- Buffered (cyclic read-ahead).
- Mark supported (dynamic half-buffer).
- Chunked/Normal (Content-Length bound).
- OutputStream.
- Buffered.
- Content-Length set or determined by buffering complete response. (http/1.0)
- Transfer-Encoding: Chunked. (http/1.1)
- Cookies. (Session variables.)
- QueryString Processor(s):
- Standard parameter de/encoding.
- POST(Content-Type) processors:
- application/x-www-form-urlencoded.
- multipart/form-data.
- Fileupload accessor methods (POST).
- Web-App authentication:
- Basic (rfc2617)
- Digest (rfc2617).
- Servlets:
- DefaultServlet.
- FileServer processor.
- If-headers support for client-side caching (If-Modified-Since,...).
- Range/resume support (including multipart/byteranges).
- DirListing.
- Methods: GET/HEAD.
- Sorting: Name, length or last modified.
- ServerSideInclude Servlet
- Support for <SERVLET> tags.
- Support for <!-- #include virtual="..." -->.
- POP3/POP3S
- POP3S using JSSE. (SSLv3)
- JNDI
- ServiceManager (Accounts).
- StorageManager.
- Authentication.
- USER/PASS. (Cleartext)
- APOP. (MD5)
- AUTH. (SASL)
- LOGIN. (Base64)
- PLAIN. (Base64)
- DIGEST-MD5. (Base64/MD5, on hold)
- CRAM-MD5. (Base64/MD5)
- Mandatory commands supported.
- QUIT/STAT/LIST/RETR/DELE/NOOP/RSET.
- Optional commands supported.
- Extensions:
- SMTP/SMTPS
- SMTPS using JSSE. (SSLv3)
- SMTP and ESMTP support.
- JNDI
- ServiceManager (Accounts).
- SpoolManager.
- StorageManager.
- Extensions:
- IMAP/IMAPS
- IMAPS using JSSE. (SSLv3)
- Authentication.
- STARTTLS using JSSE.
- LOGIN.
- AUTHENTICATE.
- ANONYMOUS.
- PLAIN. (Base64)
- LOGIN. (Base64)
- CRAM-MD5. (Base64/MD5)
- Client Commands supported.
- Capability
- Noop
- Select
- Examine
- Create
- Delete
- Rename
- Subscribe
- Unsubscribe
- List
- Lsub
- Status
- Check
- Close
- UID (Fetch, Store, Copy)
- DNS/FTP/NNTP
- IRCd
- Single server mode implementation.
- Somewhat RFC2810-2813 compliant.
- Connection registration commands supported.
- PASS
- NICK
- USER
- OPER
- MODE (user)
- QUIT
- Channel operations supported.
- JOIN
- PART
- (MODE) (channel)
- TOPIC
- (NAMES)
- (LIST)
- INVITE
- KICK
- Sending messages supported.
- Server queries and commands supported.
- Optional features.
- Soon:
Progress / Servlet2.3 support:
- javax.servlet
- ServletInputStream. (~100%)
- ServletOutputStream. (~100%)
- ServletRequest. (~100%)
- ServletResponse. (~100%)
- ServletContext. (95%)
- getResource()
- getResourceAsStream()
- getResourcePaths()
- FilterConfig. (100%)
- Filter. (~100%)
- ServletConfig. (100%)
- Servlet. (~100%)
- RequestDispatcher. (~100%)
- FilterChain. (100%)
- ServletException. (0%)
- SingleThreadModel. (0%)
- UnavailableException. (0%)
- javax.servlet.http
- HttpServletRequest. (95%)
- HttpServletResponse. (95%)
- HttpServlet. (100%)
- Cookie. (75%)
- HttpSession. (~100%)
- HttpSessionBindingEvent. (100%)
- HttpSessionBindingListener. (~100%)
- HttpSessionAttributeListener(100%)
- HttpSessionContext (deprecated). (100%)
Todo list:
- Mayhem
- httpd/servlets
- Refactor to support Servlet2.3 specs. (~95%)
- Security constraints, transport guarantee and auth method. (~85%)
- Implement ServletContext. (~95%)
- Refactor Cookie classes. (~85%)
- FileServer: caching, Content-Encoding: gzip.
- Virtual FileSystem/Caching.
- CGIServlet.
- Test Chunked/Content-Length InputStreams.
- pop3d/smtpd
- Add permanent delete to pop3.
- Filters.
- Relaying.
Links (specs):
Hypertext Transfer Protocol -- HTTP/1.1 (rfc2616)
HTTP Authentication: Basic and Digest Access Authentication (rfc2617)
Upgrading to TLS Within HTTP/1.1 (rfc2817)
Persistent Client State HTTP Cookies (Netscape)
HTTP State Management Mechanism - Cookie (rfc2109)
HTTP State Management Mechanism - Cookie2 (rfc2965)
Robots Exclusion (robots.txt)
Free web servers (Java):
Apache Tomcat
The Nexus Web Server
jo! (pure Java and free)
Bajie Http Web Server
Jetty
vqServer
Acme java httpd
Miniature Java Web Server
Jibble Web Server
W3C's Java Server
java httpd thesis
XmlHttpServer
Commercial web servers (Java):
BEA Systems
IBM WebSphere
Trifork Enterprise Application Server
Orion Application Server (Support site)
Caucho Resin
EasyThings Web ServerŪ
Webservers (non Java):
Xitami
thttpd (old benchmark)
Boa Webserver
Misc (Java):
The JavaTM Virtual Machine Specification (Second Edition)
JavaTM Application Verification Kit (AVK) for the Enterprise 1.4 FCS
Servlet Engines
Use select for high-speed networking
Advanced Classloading in J2EE (TSS)
Rocket JSP Engine
GNUJSP
Building an Executable Launcher that Permits Running a Java 1.2 Application as an NT Service
Performance Case Study: Java Web Server
Java Performance and Scalability, Volume 1: Server-Side Programming Techniques
Java Software Site
A Simple, Multithreaded Web Server (Sun)
A Debugging Web Server in Java
(Yahoo java httpd directorty)
Servlet 2.3: New features exposed (JavaWorld)
Filter code with Servlet 2.3 model (JavaWorld)
Learning Servlet Filters (ONJava)
How Servlet Containers Work (ONJava)
Java Mail Server
JavaBeans application servers:
JBoss
JOnAS
Links (using/implementing ssl/tls):
ONJava.com: Secure Your Sockets with JSSE [May. 03, 2001]
Sample Code for TLSTrustManager.java
SSL Configuration HOW-TO
Protekt Encryption SSL (The Forge Group)
Email:
Feedback should be sent to spam@antiaction.com.