
Like a chameleon, which can change its look to blend into its environment, our APIs can adapt to specific environments, too. Most computer interfaces tend to be rigid, due to the fact that machines are capable of executing only those instructions for which they have been programmed. As the number of web-based services multiplies exponentially, it becomes increasingly important to connect not only to one type of system, but to a variety of systems. However, incorporating a finite list of supported systems doesn't scale because new systems are coming online all the time. We decided that the Twistage APIs needed to be combined with a flexible chameleon-like layer, allowing Twistage to blend into its environment.
Each API call to Twistage consists of data being sent to Twistage and a response being returned to the caller. As the data flows into our system, it can be modified by a series of one or more transformers. The sole purpose of each transformer is to convert data from one specific format to another. Although Twistage comes with several built-in transformers, it is also designed such that you can create your own custom transformers. Once a transformer has been created using the management console, it can then be applied on an ad-hoc basis or can be automatically applied to all subsequent requests. Transformers can be chained together for additional flexibility.
The chameleon layer is bi-directional and can be applied both to data being sent to Twistage as well as data returned by Twistage.
Content syndication is one area naturally suited to data transformation. Sites and services that syndicate content almost universally do so with feeds. Despite the promise built into the term RSS (Really Simple Syndication), issues around ordering, naming conventions, and more create increasing interoperability problems. Therefore, each of your partners probably expects data to be formatted in a specific way, adhering to a pre-defined schema. Twistage can be configured to make data feeds available in any number of formats (i.e. schema), matching the format expected by your syndication partner. Although the format of each data feed might be precise, it's still possible to populate the feeds with dynamic data by customizing the feed with parameters. The transformer's job is solely to translate the format of the data, not interfere with the data itself.