Splunk Apptitude: Social Impact & Innovation

About

Foodie is a real-time easy to use web application that combines the power of Splunk, Flask, Yelp, Plaid, and Python to recommend restaurants based on crowd sourced reviews and past restaurants visits ultimately, providing users with 5 great restaurant recommendations in their US city of choice.

How it works

Upon arrival to the #Foodie web application, utilizing the Splunk SDK for Python, an index is created for that user with the title of a randomly generated string of 5 alphanumeric characters. Using flask's session functionality, the index created for that user remains their index for the life of their session that spans 5 minutes or until they click back to the home page that will then assigns them a new index. After the assignment of the index, the user will enter the city or town that they currently live it. Upon submissions of their home city, a script is triggered to query Yelp's publicly available restaurant data for the user's home city and send it to their personal temporary index in Splunk. Next, the user will sync to their most active bank by entering their mobile/online banking credentials which triggers another script that uses Plaid’s banking API to query the user's banking transaction data for the last 90 days and sends that data to the user's personal index. Finally, the user informs the app whether they are searching for restaurant recommendations in their hometown or for restaurant recommendations in other cities by selecting "yes" or "no" to the question of "Are you searching for restaurants outside of your home city?". If the answer is no, a script that contains a Splunk search query is invoked to query Splunk and provide the user with a list of the top 5 restaurant recommendations within their hometown. If the answer is yes, they will enter their destination city that again queries yelp's data and pushes the data for the user's destination city into Splunk. After that, the user will be presented with a list of the top 5 restaurant recommendations within their destination city. Each index generated for a user by #Foodie will be retained for a total of 10 minutes using a defined retention policy. A saved search is ran every 15 minutes to gather a list of empty indexes and outputs this list to a csv. All indexes listed in the csv gets deleted by a script ran on a cron schedule to delete Splunk indexes.

What's next for #Foodie

  • Support for Bank of America and Chase.
  • Incorporation of the average meal price at restaurant vs. the average price spent on a meal by the user in the splunk recommendation query.
  • Expansion of logging for better troubleshooting.
  • IOS App
  • Support for multi-factor authentication
  • Mid-August release of the Public facing version of #Foodie

Built With

Share this project:
×

Updates