liveh2o/protobuf-activerecord — pull request #12 by liveh2o (2014-02-14 22:02:14+00:00)
Title: Replace service filters with middleware

Protobuf 3.0 no provides a middleware pattern making it much easier to extend the RPC service pipeline and not rely solely on service filters which are brittle for certain operations.

With that in mind, replace the service filter that was added to handle AR connection management with a middleware so it can't be short circuited by other filters. Also add a middleware that enables query caching so we get speed benefits that brings.

The middlewares are basically the same as in Rails, modified to work within the Protobuf middleware stack instead of Rack.

// @localshred @abrandoned @brianstien