Skip to content

Best Practices

Jon Druse edited this page Aug 28, 2019 · 2 revisions

So with a basic understanding of how the Forge Replication API works, let's walk through how to construct a consumer.

Basic Overview

Here's the basic order of operations a consumer needs to complete to properly replicate all the data available.

  1. Establish an initial value for last_event_id, which should be 0
  2. Request results by providing last_event_id
  3. Extract latest_event from the response and save it to last_event_id
  4. Process results array
  5. If remaining is greater than 0, go to step 2
  6. If remaining is 0 wait at least 1 minute and then go to step 2

Caution

  • This process is intended to be run on a single thread. Each request requires information of the request before it, so trying to parallelize this process will not be possible.

Clone this wiki locally