Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
FireData Connecting R to Google Firebase
Project Title: FireData: Connecting R to Google Firebase
short title: FireData: A Firebase API
Persistent Data Storage and transfer with R can be complicated and time consuming. While there are great packages to connect R to DBs like mySQL/sqlLite/postgreSQL those databases itself need to be hosted and maintained. To implement a DB based login system in Shiny now probably takes 2 weeks of work to get it done in a secure way, and a IoT project for data collection requires a 24/7 running server.
The Google team took that common problem (not only of R) and created Firebase. Firebase is a online database that is not only intuitive to integrate into Apps & Web applications, but can also be used to build user registration/login systems with persistent data storage (thinking about shiny) or to transfer data between IoT devices via Firebase directly to a R environment. Writing a intuitive R to Firebase connector enables R to be used in new "cross platform" realtime applications. Thats why we strongly believe the "FireData" package will improve the R open source environment.
The R universe offers with the
httr package to apply PUT/POST commands to servers (including Firebase). In combination with a JSON library like
jsonlite it is possible to send & retrieve data from Firebase.
Google Firebase on the contrary is more sophisticated than simple PUT/POST requests and allows JWT tokenizations, registrations & logins and even file uploads. Firebase brings all functionality and ease to be the to-go Database for R IoT or Shiny related projects.
Looking at other API implementations, R seems to be the only major language (C++ & JS are supported natively) that does not yet has a Firebase API implementation (here the official Google Firebase API list):
Details of your coding project
With the experience of GSOC 2016 we will start with a larger team (other open source developers signaled it would help to improve their own DB experience working with R and Shiny) to get the FireData package CRAN ready before the September deadline.
- Now - April : Adding prove of concepts of the Firebase integration into Shiny and IoT applications.
- April - June : Writing and implementing (including unit test) the various firebase connecting functions
- June - July : Adding the s4 classes/functions to the FireData package & writing Vignettes/Documentation
- July - August : Finishing up the FireData package with focus on OS compatibility testing and identifiying and possible fixing weakpoints of the package.
R is one of the strongest players in data science. The aim is to connect its strength in data analysis with the actual data. By making it easier to directly connect R to the inputs of IoT devices or other applications such as websites/shiny it will open new possibilities for open source developers around the world.
The final product, the FireData package, will connect two great environments with each other. When we succeed to make it stable & intuitive alot of projects will be build ontop of it.
Management of Coding Project
Daily submits to the github repo. The project will be started in a test-driven fashion by writing "testhat" tests for every method implemented. For the Firebase testing we will accordingly create a test database (firebase allows to upload xml database mirrors which correspond to real db environments).
Risks/Challenges & opportunities:
Implementing the 3rd party Firebase API can always bear the challenge of sudden new features or changes to its functionality. Due to the large userbase of firebase and the versioning we are pretty sure to complete the task staying at the same firebase version (firebase 2/firebase3 had breaking changes). One opportunity is that a recent change added firebase function calls which are especially interesting for our project as it allows firebase to trigger on certain data events to send data to R applications.
Knowledge of noSQL databases (Google Firebase is a noSQL database), experience with package development (roxygen2) including unit testing (testhat) and S4 Classes. In addition a general understanding of APIs & server architecture is required.
Proof of concept / Test for the student:
- A tutorial on Shiny & Google Firebase Logins written by the student https://r.codes/ItemPreview/-KaLAwn-zqMgARFUnxpo
- proof that the student can create R packages with roxygen2 and devtools: https://github.com/Kohze/Discovr
- proof that the student can create unit tests (testhat package) https://github.com/Kohze/misc/tree/master/unitTesting
Samuel Schmidt, Ph.D . (has GSOC Mentor experience). | email@example.com
Lindolfo Pedraza, MA. (Database and API specialist) | firstname.lastname@example.org
Robin Kohze | email@example.com