dongyunshan4066 2019-05-09 06:03
浏览 112

是否有任何可能的方法仅将firebase数据库用于实时消息传递并将数据存储在自己的服务器上

I am trying to build a chat app using android, firebase, php and MySQL but I can't afford to store all the messages on firebase database yet. So, I like to use it just for real time chatting while two users are interacting each other and then delete all the chat log on the firebase and store it on my own database, so that I can show the messages from the previous conversations to the users.

So the problem is that how will I be able to show the previous messages to the user. Here are the logic I can figure out

1) I will upload all the old messages to the firebase database when two users start to interact each other and show all the old and new conversation in the recyclerview android.

But this could become trouble when thousands of users start to interact each other at the same time as we need to upload bulk amount of data to the firebase.

2) Get all the old conversations from my own server and create new node on firebase database then show all of them together again in a recycler view.

But it will be very painful to show the old and new messages in a single recyclerview from two different data sources and can't do realtime sync.

Is there any possible way I could have done and I would be much appreciated if you guys started discussing about this topic.

P.S : I will use firebase pay service later when I can afford.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
    • ¥15 安装svn网络有问题怎么办