Device readings application using pure Rack and Pg gems (without any middleware)