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 Jenkins+k8s部署slave节点offline
    • ¥15 微信小游戏反编译后,出现找不到分包的情况
    • ¥15 如何实现从tello无人机上获取实时传输的视频流,然后将获取的视频通过yolov5进行检测
    • ¥15 WPF使用Canvas绘制矢量图问题
    • ¥15 用三极管设计一个单管共射放大电路
    • ¥15 孟德尔随机化r语言运行问题
    • ¥15 pyinstaller编译的时候出现No module named 'imp'
    • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
    • ¥15 怎么把多于硬盘空间放到根目录下
    • ¥15 Matlab问题解答有两个问题