Monitoring daily glucose is a hobby for some and a necessary life skill for others. In this talk, I will give a quick tutorial on continuous glucose monitoring solutions for yourself using GCP free tier, Atlas free tier, and open source software. We'll also spend a bit of time talking about mobile solutions in this space, and alerting with Stitch.
MongoDB World 2019: DIY Glucose Monitoring with Open Source, MongoDB, and GCP
1. Rachelle Palmer, Director of Atlas Support worldwide
DIY Health Data with Open Source, Atlas free tier, and GCP
techbelle
2. Prerequisite for running a support team:
a love of helping others and fixing things that
are broken
3. The American Healthcare System
• 20% of Americans are diabetic or pre-diabetic
• They struggle not just with symptoms of this affliction, but
with medical costs, insurers, health literacy, preventative
care, and technology
• Why is the best thing I’ve done for a pre-diabetic lately is
explain how to reset a Netflix password?
4. Life with a Continuous Glucose Monitor
- Install a wearable sensor on
your skin
- It relays blood glucose levels
24/7 to a receiver
- You can see immediately which
foods cause unacceptable
spikes, and at which points you
feel unwell
- Avoid those foods
5. About Me
• 5+ years at MongoDB
• 1 son, 1 dog, 1 husband
• Multiple people in my family
have become diabetic (or
pre-diabetic) in the last 10
years
7. For the Purely Self Interested
- Contributing to open source is
intellectually rewarding and
emotionally satisfying
- Makes a resume more
impressive
- Diabetes is my likely future
8. The first step in solving a problem is admitting
knowing if you have one
9. The Goal
1. To set up a glucose monitoring solution for myself
2. In a highly secure way
3. To document it so others can do the same
4. For free
10. Phase 1
Plan of Action
1) Research & find solutions
2) Define Tech Stack
3) Read Some Docs
Where We Learn that
Rachelle is not a Solutions
Architect
11. 1. Research
I need an free application to ingest glucose data: Nightscout
I need a free cloud instance to act as my application server: GCP
I need a free database: MongoDB Atlas
I need a free mobile app that works on Android: xDrip+
I need to ensure my data is secure: SSL via Let’s Encrypt
I need a device that does CGM that works with all the above:
Dexcom G6
12. 1. Research
Cost Item
$349 a month Wearable sensors (3, good for 10 days each)
$359 Transmitter (Amazon.com)
$365 Receiver unit
$20 Specialized Adhesive Bandages
Free* Mobile app for constant monitoring
13. Step 2,3,4, etc: My Stack Has No Documentation
Item Technology Instructions?
Database MongoDB Atlas Yes
Application Nightscout No-ish. For MongoDB 3.4,
onprem.
Instance Hosting GCP No
Mobile xDrip+ Extensive & Awesome
Security NGINX? Let’s Encrypt? HA
Proxy?
No
CGM Dexcom G6 Yes
16. Phase 2
The Plan
1) Install all the applications
2) Modify configuration files
3) Turn it on
This Will Take Five Minutes
17. Where Are We Installing
Application Where?
Nightscout git clone to your laptop
Google App Engine Us-central1
xDrip+ On your mobile phone
Atlas GCP, free tier
CGM device Your body, preferably somewhere you wont rip it off
18. If your company allows you to install random
unverified apps from the internet,
good for you
19. This Will Take 5 Minutes
Download .apk from github
Install on phone
Expectation: data will show up
If you turn on bluetooth…
…and don’t typo your transmitterID
… or your base URL
… or your API secret
24. What Did I Learn?
1. Bananas are worse than ice
cream
2. Goodbye, LoseIt and MFP
3. I now have something to talk
about at parties
25. Analysis
1. Bananas are worse than ice
cream
2. Goodbye, LoseIt and MFP
3. I now have something to talk
about at parties
26. Next Steps
Things this application
needs :
• Documentation for AWS
or GCP installation
• Documentation for self-
hosted, onprem versions
• Click to deploy for Atlas,
GCP, or AWS
• Really solid anomaly
detection
• Documentation for
secure setups using
NGINX and Let’s Encrypt
• Helpful people who will
answer community
questions on facebook or
reddit
• Documentation for using
4.0+ versions of
MongoDB
Fixes to any of the
620 issues listed on
github for Nightscout
and xDrip
27. Resources
1. Dexcom G6 transmitter and Sensors
2. Nightscout Github
3. xDrip+
4. Google App Engine
5. CGM in the Cloud Facebook group