There’s a dashboard in one of our applications that shows data from various external services. The more data we were adding to this dashboard, the worse its performance and user experience was getting until the site eventually became unusable. It got to the point where its user had to wait 10 seconds or even more for the content to show up. Unfortunately, caching didn’t help much.
Here’s the story of what we did to reduce the load time.
Goal
Recently released Play 2.0 framework brings new way of creating web services
to Java community. It’s nice and fun, but I dislike few components. One of them is the router with its custom routes definitions file, separate compiler and weird logic.
As a Ruby developer I started wondering if it could be implemented in Scala as simple DSL.
The requirements were quite simple:
- statically compiled
- statically typed
- easy to use
- extensible
- it should provide (again, statically typed) reverse router
- use type inference as much as possible
- do not use much parentheses