One of the most common questions I get from my friends from the SAP ecosystem is how MongoDB works with SAP. So I thought I will pen some initial thoughts on how I see the technologies working together.
NOTE : Please don’t look at this as an official roadmap or anything – this is just my personal view. Neither MongoDB nor SAP has agreed to do anything of this sort . This is just Vijay thinking aloud – and I am sure someone will set me straight if I am not making sense.
First, what does MongoDB not do with SAP systems ?
This is easy – MongoDB is not a database to run your ERP / business suite or BW type systems. MongoDB also doesn’t do native predictive analytics.That is what Hana (or other RDBMS systems) are for. MongoDB has no competitive position against Hana. Also SAP Hana Cloud platform has been using mongodb for some time already for content management. And MongoDB is one of the databases for SAP’s Hybris platform.
Now that we got that out of the way, lets see what can MongoDB do to complement an SAP landscape
SAP announced a technology collaboration for Lumira to work with MongoDB at SAPPHIRENOW last month. Lumira is SAP’s agile BI solution . MongoDB holds data in JSON (BSON internally ) . The existing connector uses a JDBC protocol for the integration – and more native options are planned for future.
What is the big deal ? the big deal is that MongoDB holds richer data than what you typically see in rows and columns of a table.
MongoDB holds data that has a hierarchical or nested nature – and visualizing that rich data ( for example, not only what region that customer is from – but details of what is the past history of sales in that region for customer, what other customers have bought in similar categories etc) is an amazing value add for a business user.
On top of that – given the dynamic schema, you can keep enriching the data (like campaign information at real time from a web site) and visualize the results immediately .
I could totally see in future SAP data services and Hana cloud integration for ETL/EAI use cases where MongoDB is the source or target. MongoDB is probably one of the most popular database for cloud applications already – and that trend will only increase. But those apps need data to be fed into it from somewhere, and I think data from there might need to get pumped into other systems. So an ETL/EAI type tooling from SAP around MongoDB is something I can imagine being a sensible thing assuming those sources and targets could be SAP systems.
3. As a datahub for integrating SAP and non-SAP applications
Consider a business application SAP would build on Hana for retail . The sources of information that need to pump in data to that app will typically be disparate in every sense – POS data, ERP data, IS-Retail data, Web store data, Click streams and so on.
One way to do it is to pump all this data into Hana and write code there to filterthe dataset that the app needs. This will make sense for cases where the schema is set in stone and not subject to frequent change. But that is usually not the case for retail like data – schema needs as much flexibility as possible. So a second way to design that will be to use MongoDB as a data hub to consolidate data from all the sources, and then from there provide the app on Hana with just the right data it needs to do its thing.
There is no certified connector for MongoDB with Hana today. But that probably is not such a big deal for a project based solution once the Hana SDK for AFL (app function library in C++) is available. MongoDB has a C++ driver that can be hooked on to AFL and this should solve the data exchange problem from a technology point of view.
Another option - a little bit of code on XS engine (the lightweight web server/app server in Hana) can make it work too – since XS understands JSON well. Thomas Jung probably is the best contact to help with this – but I don’t think you will need a lot of support.
And for non-Hana customers of SAP, you probably need to code in ABAP from the app server layer to make mongodb integration work. I have not opened an ABAP editor in a while – so my memory is rusty. But I think its only from 7.x that ABAP has native JSON support. So you might want to do some hack to check if Kernel supports JSON. Horst Keller might have published some standard way to do that. Or if your ABAP skills are not top notch and you would prefer to use PERL or something outside the app server that MongoDB has a driver for . I guess you can create a service via ICF and take an RFC route. Probably not the most elegant way, but it should work too. Maybe Thorsten Franz can enlighten us on the possibilities.