at Dwango Corp. ◦ Scala Experience : 1 and half year • Person who doesn’t care about the compilation time in Scala • Other technical interests: ◦ C++11, Ruby, Elasticsearch, Java8 ◦
• (at the moment) Ruby on Rails, monolithic application • A crisis (often appeared whale!) in 2009 ◦ The twitter user soared and broke! ◦ Make an effort to change scalable system instead of Rails • System reform Ruby to Scala(Java) from 2011 ◦ https://blog.twitter.com/2011/finagle-a-protocol-agnostic-rpc-syt em ◦ http://readwrite.com/2011/07/06/twitter-java-scala ◦ Scala 2.9.x era
framework, rails ◦ Play provides a bunch of features but finagle does only a few • Network, Distributed System Framework • A wrapper of netty • Mysterious functions ◦ Stats, serversets...
‘s developers inspired from Facebook’s C++ library • Nowadays, Future is a general knowledge for Scala developers, though… ◦ Http://docs.scala-lang.org/en/overviews/core/futures.html ◦ Fairly different from twitter Future and Scala Future
[HttpRequest] (stats) val statsFilter = new StatsFilter [HttpRequest, HttpResponse] (stats) val logging = new QueryLoggingFilter () val retry = new RetryingFilter [HttpRequest, HttpResponse] (RetryPolicy.tries (3), new NullTimer) val httpServiceWithFilter: Service [HttpRequest, HttpResponse] = statsFilter andThen httpStatsFilter andThen retry andThen logging andThen mux
We can add/remove a function when we like without modifying core function ◦ Like: output logs, retry request, control amount • Now can concentrate on the core function by separating small filter