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 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名
    • ¥65 汇编语言除法溢出问题