Declarative programming over eventually consistent databases