Requesting High Level Advice for RDMS Firebase Sharding With Ridesharing App

huangapple go评论71阅读模式
英文:

Requesting High Level Advice for RDMS Firebase Sharding With Ridesharing App

问题

我有一个实时数据库构建的顺风车应用程序。与许多应用程序一样,它会跟踪用户位置,并将其与其他用户的位置结合使用。扩展研究表明,在超过20万个连接时,使用关系型数据库管理系统(RDMS),我需要计划实施所谓的“分片”概念。

  1. 我想到的第一件事是区域,但你可能也有与我相同的想法:对于区域,边界会让附近的用户产生断开连接的感觉。

  2. 我想到的第二件事是将我们的数据操作迁移到Firestore。我读过Firestore在谷歌不推荐用于位置应用,尽管我们使用并且效果不错的Geofire已经扩展到Firestore,据说有了GeoFirestore。即使Firestore也有一个上限(尽管达到1000000,在大多数地方都允许划分区域,也许我可以在边界用户处双重划分区域)。

我目前对于像在大城市中的用户这样的问题感到困惑...我已经在Stack Overflow上搜索了一番,但迄今为止还没有找到解决这个问题的方法(在许多其他问题上它都非常有用,所以继续使用它吧,Stack Overflow的关注者们),但我内心告诉我,这个问题可能已经有人解决过了,所以我正在寻求一些比区域更优雅的解决方案的想法。

编辑:简而言之,我如何能够让每个人的半径范围包含其半径内的所有人?

非常感谢任何建议。谢谢。

英文:

I have a Ridesharing app that is built with the Realtime Database. Like many apps, it tracks user locations and uses those in conjunction with the other users' locations. Scaling research indicates that over 200k connections, with the RDMS I need to plan to implement a concept called "Sharding."

  1. I suppose the first thing I thought of was regions, but you probably had the same thought I had: with regions, the borders create a disconnect for users near them.

  2. The second thing I thought of was migrating our data operations to Firestore. I have read that Firestore is NOT recommended by Google for location apps, though Geofire (which we use and have had good results with, FYI) has been extended to Firestore supposedly with GeoFirestore. Even Firestore has a cap (though at 1,000,000 that would permit regions in most places and perhaps I could double region the border users).

I'm scratching my head at the moment for issues like folks in bigger cities... I have searched SO to no avail so far for this issue (it's been great on many others, so stick with it SO followers), but my gut tells me the wheel has already been invented for this, so I'm reaching out to you folks for some ideas for a more elegant solution than regions.

Edit: In short, how can I keep everyone with a radius around themselves encompassing everyone in their radius?

Any advice is appreciated. Thank you.

答案1

得分: 0

为了进行分片,您需要能够识别出一个单一且不可变的值,以决定某些数据属于哪个分片。如果您没有这个值,那么就无法进行分片。

英文:

In order to shard, you need to be able to identify a single, immutable value that decides to which shard some data belongs. If you don't have that, then you can't shard.

huangapple
  • 本文由 发表于 2020年4月11日 05:01:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/61148625.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定