APIs, XML & MongoDb
September 3rd, 2014
MongoDb is an open source document database. There are plenty of MongoDb use cases: from Big Data to Mobile Apps.
What if you want to do API Data Analytics, and persist information about API calls in MongoDb?
REST APIs and MongoDb
MongoDb is being used by innovators in the API world (Open Bank Project, Nexmo, …). REST APIs mostly use JSON, and MongoDb works great with JSON. You can do things like store tweets from twitters streaming API, or log all payments API calls made from your webstore.
But there are a lot of XML-based SOAP APIs out there. Some companies, like PayPal, support REST and SOAP. Some companies, like TripAdvisor, only support SOAP. And some companies, like Nexmo (SMS/texting API), support both JSON and XML in the returns from their REST APIs.
Ideally you will want to insert the XML as BSON (Binary JSON) collections into MongoDb.
Inserting XML to MongoDb as BSON is not as straightforward as inserting JSON – at least if you want to maintain the fidelity of the XML type information. The type information will likely be useful for the data analytics stage.
RuleX Flavor for MongoDb
Nomos provides a flavor of its RuleX product that makes it easy to insert XML data into MongoDb collections, while preserving type information. Read about it here.
Comments are closed.