What happens if data changes while a SOW query is running?

AMPS guarantees that SOW queries are atomic, so even if the data changes while the SOW query is running, you get the results as of the point at which AMPS started the SOW query.

If you need to receive ongoing changes, use the sow_and_subscribe command. This command atomically runs a query and places a subscription at the point at which AMPS starts the query. After the query results arrive, AMPS sends messages on the subscription. Because the subscription started atomically at the same point in time as the query, your program is guaranteed to receive updates that arrive while the query is running.

Last updated