So a cold day in December you are surfing the net and you get triggered by the famous SAP HANA Kinect demo: “wouldn’t it be great to use voice instead of gestures and use Siri on the iPhone to ask Business Intelligence like questions?” Imagine a scenario where a user would ask a simple question like “Give me total sales for Customer BMW” and Siri would give the answer. Imagine that…
So what happened next? I decided not to snuggle up to the cat, poor myself a glass of egg nog or finish my Christmas shopping. I decided to make it happen and so a journey full of challenges started.
I came across this fantastic piece of software called Siri Proxy. According to the authors:
Siri Proxy is a proxy server for Apple’s Siri “assistant.” The idea is to allow for the creation of custom handlers for different actions. This can allow developers to easily add functionality to Siri.
I installed Siri Proxy on a virtual Ubuntu machine and within a couple of hours I had Siri Proxy running and it was taking commands other than the ones Apple put in. I installed some community written Plugins and got really enthusiastic about the technique. I picked up a Ruby book, deep dived into the basics and started writing my own Plugin.
I decided my Plugin should be able to execute SQL statements and query any database. This would make it possible to connect to virtually any database and one would be able to use it in a broad and agnostic way.
The first test
As a Proof of concept I installed a random database (MySQL) on an Ubuntu environment. I created a simple table containing the key figure “Sales” and objects “Sales rep, Customer and Date” and loaded some random data to my table. Within two week (and some sleepless nights) the Plugin worked beautifully. It took my commands and fired off the SQL with lighting speed.
What if we can do this on HANA?
“Can I do this on HANA?”. Like my father always told me: “impossible is not a fact, it’s an opinion”. So I took up the challenge again. I contacted my colleague Rob Beeren and we drew up the architecture. Execution and the headaches started.
So what challenges can one find connecting Siri to HANA?
If you look at a solution after you build it, it always looks easy. But honestly: connecting an iPhone on 3G to a Cloud server with closed ports is not easy. Thank goodness the guys over at SAP Labs persuaded Cloudshare to open some ports. After this, we managed to VPN into the Cloud and thus have an integrated scenario. Next HANA ODBC drivers on Linux were added, the required ruby Gems for ODBC were implemented and finally we pressed the Home button on the iPhone. What happened next, you can find below:
See you at the Innojam! And ofcourse I will release full code and instructions after the event!
Stay in touch,