Skip to content
No description or website provided.
Scala
Latest commit 3eae93f Jan 20, 2011 @rschildmeijer Implements methods: close, setCloseCallback, reading, writing and
closed. Prepared for handleEvents
Failed to load latest commit information.
src/io/loft
.gitignore
README.md Adds 'Disclaimer' section Jan 10, 2011

README.md

Loft

Continuation based non-blocking, asynchronous, single threaded web server. Inspired by Swirl, Tornado itself and Deft

Usage:

object ExampleHandler extends RequestHandler {

  @Asynchronous
  def get() {
    val http = AsyncHTTPClient()
    reset {
      val id = redis get("roger_schildmeijer");   //async call
      val result = http fetch("http://127.0.0.1:8080/" + id); //async call
      write(result)
      finish 
    }
  }

  val application = Application(Map("/".r -> this))

  def main(args: Array[String]) {
    val httpServer = HTTPServer(application)
    httpServer listen(8888)
    IOLoop start
  }

}

Disclaimer

Loft is far from (production) ready. The example above (ExampleHandler) is the proposed syntax for doing asynchronous calls. The initial plan for Loft is to adopt as much as possible from the facebook/tornado master branch.

Requirements

Java >= 1.5
Scala >= 2.8.0 (for loft developers: enable Scala continuation plugin (-P:continuations:enable))

Something went wrong with that request. Please try again.