more robust db.query with exceptions
generic backend server req/rep framwork, nanomsg is on top of that