firebase.goOffline() to prevent connections

ぐ巨炮叔叔 提交于 2019-12-08 17:18:42

问题


I'm a teacher and our school just bought Chromebooks for every student. I wrote a typing program with the thought of having the students at my school use it, but I realized that would be 600 connections if all the teachers in the school typed at the same time.

I have a typing program where Firebase is used as a traditional database. The only time the Firebase receives a change is when users login or when they pass a typing test to update their profile as having passed the lesson.

Looking for a solution, I looked at the Firebase.goOffline method, and it seemed I should be able to have the students login, go offline, and then Firebase.goOnline() after they pass the test and then update their information to the database, and immediately go offline again. Would this be appropriate or am I missing something?

If this is a poor question, I apologize, but I wanted to ask before a few dozen students tomorrow lost all of their typing work because I changed the code on them inappropriately.

来源:https://stackoverflow.com/questions/28334223/firebase-gooffline-to-prevent-connections

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!