Jun 21, 2012

HTTP Server in Scala and Java 7

HTTP server written in Scala using Asynchronous Socket in Java 7. The server reads entire HTTP header in request and responds back with simple HTML. This by no means is meant to provide complete HTTP protocol implementation. The main purpose is to demonstrate the AIO in Java 7 and simplicity of Scala syntax.

And it is also quite performant. Notice the thread pool with one thread only. Using Apache HTTP server benchmarking tool it achieves easily 20kreq/s:
$ ab -c100 -n100000 "http://localhost:8000/"

Time taken for tests: 4.953 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 12200000 bytes
HTML transferred: 2000000 bytes
Requests per second: 20190.79 #/sec
Time per request: 4.953 ms
Time per request: 0.050 ms
Transfer rate: 2405.54 [Kbytes/sec] received


  1. Replies
    1. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Projects for CSE.

      Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

      Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training