Skip to main content
When Forest has no built-in connector for your system (a proprietary database, a legacy service, a third-party REST API), you can build your own datasource. There are two strategies, and the right one depends on what your source can do and how fresh the data needs to be.

Translation vs. Replication

TranslationReplication
How it worksTranslates Forest’s query interface into your API’s query language and calls the source live on every requestMaintains a local copy (replica) of the source data in a cache controlled by the back-end, and queries that copy
Data freshnessAlways live: every request hits the sourceEventually consistent: refreshed on a schedule, by polling, or via push/webhooks
Query translationYou implement it (filters, sort, pagination, aggregation)None: filtering, sorting, search, and charts work out of the box against the cache
EffortHigh: a full-featured translation layer often exceeds 1000 linesLower: you mostly implement how data is fetched and (optionally) written back
Best forSources that already support rich querying and where data must always be liveSlow, rate-limited, or query-poor APIs where a cached copy is acceptable
AvailabilityNode.js and RubyNode.js only

Choosing a strategy

  • Reach for Translation when your source is a capable database or API that can filter, sort, and paginate efficiently, and you need every read to reflect the latest state.
  • Reach for Replication when the source API is slow, rate-limited, or hard to query, and a periodically synced copy is good enough. It is the simpler path and gives you Forest’s full feature set with no query translation.
Don’t see the datasource you need? Contact us to request a connector, or share your own through the Forest experimental repository.