How to interact with several competing REST APIs?


#1

Understandly is a Meteor app that lets people manage the translation of marketing content (such as AdWords campaigns).

Currently, people have to use “their own” translators. We’re looking to provide translations for them using one or several APIs such as Gengo and Tolq.

These translation APIs provide roughly the same service: text translation. We’ll start with one API and probably add more later.

Now we’re wondering how we should design this system.

The naive approach would be to put the API calls directly into our Meteor app. This would be the fastest to get going, but we worry that it may mean trouble down the road if we want to add more APIs.

Another possibility is to create a Node package that deals with all the APIs and install that package in our Meteor app.

A third approach we’re considering is making an abstraction layer – a separate REST API – that interacts with the translation APIs. Our Meteor app would then only interact with this abstraction layer.

What would be some potential advantages and disadvantages of each approach?