Rumbling on HANA to the aid of Diabetics
Rumbling On
The SAP University App Rumble is reaching its final stages. The three finalists and their assigned SAP developers are now working hard to deliver on their ideas within three weeks to be able to present at Sapphire Now.
All three ideas build on the power of SAP Mobile Platform and SAP HANA:
- Advanced Diabetes Management App – Team Dan and Gary
- Your Intelligent Personal Dining Agent/Dietitian – Trojans
- Efficient Grocery Shopping – We Used to be Accounting Majors but Then We Lost Interest
The Advanced Diabetes Management App from Dan Sanchez and Gary Longoria looks to use the power of mobility to allow diabetics to track the effect food has on their glucose levels via the simplicity of a mobile interface. By providing timely feedback and warnings gives both the patient and physician real time information on the effects of food and can provide a more suitable nutrition plan. Having large amounts of data not only helps with meal tracking for an individual, patterns can also be determined where a specific food could be beneficial or harmful and appropriate notifications can take place, especially if the app user checks the menu before choosing, preventative medicine at it’s best!
Dan and Gary have personal experience of the problem they want to solve, this makes empathizing with the end user a valuable option for successful creation of the app.
Team Dan and Gary perhaps pulled the short straw and were assigned me, but they were fortunate to also get Jeff Cadow .
A plus for our team was that we have experience of SAP Mobile Platform and a smattering of HANA hands on from the SAP Code Jams. If you have not attended or organized a SAP Code Jam I can highly recommend it.
We chose to go Native iOS for the demo as that best used the skills in the team, cross platform was the initial goal but the learning curve would have taken away valuable time, so an unfortunate concession was made. Ultimately Dan and Gary want the app available to as many sufferers of Diabetes as possible so cross platform is in the future.
The competition gave us the landscape definition, developers.sap.com gave us the tools and SCN the knowledge base to move forward. Three weeks to build a demo (amidst exams) and 30 day product trials was the perfect fit for the students. Unfortunately I don’t get the free trials but can still use the AWS instances. SAP does not charge for these but you are charged by Amazon an an hourly basis for SAP Mobile Platform, HANA is available from more providers at costs as low as $0.286/hour.
Another useful tip we got was to install AWS Console on our iPhones so that we can control (limit costs) our AWS Instances. I have to say, this is a very simple and powerful app, the price is right too 🙂 .
We have the tools, we have a little knowledge, we have empathy, what next?
The plan, use HANA XS to expose our data as OData through SAP Mobile Platform. The second part we knew how to do, the HANA part would require some reading, watching the unsurmountable Thomas Jung on YouTube and “calling” a friend (Craig Cmehil ) to get the HDB username and password (because I need to learn to RTFM and not skim through it).
After a few hours watching YouTube and reading the install documents early into Monday morning we had the first entity up and running. What is an entity without data, this I found as a really useful feature for putting our demo together, uploads from csv files. HANA Studio allows the creation and/or population of tables within a schema from a csv file. We simply took and excel of existing data, exported to csv and imported into the database.
Now came the second gotcha, the first was figuring out SYSTEM/manager as the default user. The second, we think we have XS running, but we can find it in the browser. Some searching on SCN and we had the answer. AWS blocks the ports that we are using to access the XS data and they need to be opened, thank you Simon Hofmann for the detailed answer:
1.) Log in to AWS management console
2.) Navigate to the EC2 Console Dashboard
3.) On the left menu, select the correct Region and then under “NETWORK & SECURITY” (still on the left menu) select “Security Groups”
4.) Select the SAP HANA Security Group
5.) Select the “Inbound” tab
6.) Create a new rule by selecting “Custom TCP rule”, type in port 8000 (or 80xx where xx is the number of your HANA instance) and keep the default value in field “Source” (should as be the same as the IPs of the existing rules) -> Click button “Add Rule” to save the rule.
7.) You’re done and calling the XS-Engine should now be possible.
With the ports opened we now got what we really hoped for, XS Engine is up and running (Elastic IP address and port 8000):
Exposing our entities through XS was thankfully easy and well documented. Simply creating an .xsodata file for our entities “BloodSugarOdata.xsodata” and committing/activating it on the server and our service was there.
service namespace “sap.hana.apprumble.dag” {
“SYSTEM”.”DAG_FOOD_ENTRY” as “FOOD”;
}
Access to the service through the URL takes the package name and xsodata file name:
http://ourawshana:8000/psa/BloodSugarOdata.xsodata/FOOD?$format=json
Where are we now?
To be honest, we still have an awful lot to do before Sapphire, the native app needs a lot of work, we need to finalize the entities and upload our “food mountains” of data, but we have got our landscape running, and thanks to SCN and the availability of free developer tools that only took a couple of days.
The App Rumble experience is a really fun and challenging event for both students and the lucky developers that are helping them. Thanks to everyone involved in setting this up.
Wow, good luck to the teams and I'd say they were lucky to draw you on their team, John.
Thank you for sharing
Tammy
Maybe now I can have my cake and eat it too....
You are an inspiration John! Keep up the great work!
I'm amazed daily at how HANA is being used and in what way and this is one more example of just sure brilliance for a real world problem!
Sounds like a very nice initiative John. I really admire your work, first with the kids at all he demo jam and now with students for the benefit of diabetics. Your work has been very inspiring.
Just out of curiosity, have you also already made plans to run this application productively after the ramble is over?
Cheers,
Jan
Hi Jan,
The idea came from the students themselves (both at San Francisco State University). I was lucky to be one of the volounteers assigned to them to help them implement their idea. I also hope that this becomes a productive application, I assume that will depend on the students. The idea is something that can help change lives of millions of people.
Regards
JohnA
As a side comment: just today I thought how nice it would be to have an app for AWS Console. Voilà! Here it is. Now downloaded and being used 🙂 Thanks!
This is awsome great job I was looking for some thing like this.