Simple web server using the actor design pattern (scala, JDK7)
Scala
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
README.md
SimpleServer.iml

README.md

SimpleServer

Weekend coffee shop code sample I wrote in 2012 to play with Scala.

Simple web server using the actor design pattern (scala, JDK7) and asynchronous channels.

  • Serves HTML files from ~/www
  • By Default, logs are written to /tmp

The first parameter is the port number, which defaults to 8181

Design pattern

HttpRequest object tracks state and chain of actors

SimpleServer
 |---> AcceptHandler
        |---> ReadActor <------------\
               |---> ParseActor -----/
                      |---> HandleActor
                             |---> ResponseActor

ParseActor will message ReadActor if there are more bytes to read