NeuroSca is a proof-of-concept HTTP server written in Scala. By no means is it even close for production use — it's merely an exploration of Scala syntax, features, actor model and performance.
The benchmarks were conducted on quad core i5 machine after warming up JVM.
Concurrent connections | Requests per second |
---|---|
1 | 7367.57 |
2 | 12089.27 |
3 | 14496.54 |
4 | 15318.63 |
5 | 17148.54 |
10 | 19702.08 |
25 | 19433.32 |
50 | 20356.65 |
500 | 20416.03 |
750 | 18552.00 |
1000 | 18610.54 |
All the things! Due to the server being totally careless when operating on sockets, it's a common issue of OS closing the application with "too many open files (ports)" message or resetting the connection. As mentioned above, this project is just an exploration of Scala.
Scala language has a fantastic feature called pattern matching. Just hit /version
or /multiply/3/9
- it's just like Django's urls.py but built in your language. Have a look at another example: a simple REPL reacting on certain commands.