APY-8 : Implement X-Filter as external server

Started moving the gateways to databse.