解决基于位置的应用程序数据问题
我正在尝试构建一个非常简单的基于位置的应用程序,并且我可以使用所有这些服务(Foursquare API、SimpleGeo、Google Places 等)。所有这些似乎都为我提供了给定经纬度附近的场所列表(酒吧、咖啡馆、商店等)。这很棒,但是一旦用户看到场地,他们将能够撰写有关每个场地的评论(例如)。现在,我该如何处理这些数据?
- 用户 ID(我的应用程序的用户)
- 地点名称(从 Foursquare API 检索)
- 经度、纬度
- Foursquare 地点 ID
- 检查
我是否将其存储在我的数据库中?如果 Foursquare 服务器上的场地名称发生更改,会发生什么情况?如果我不将其存储在数据库中,则每次我想要返回该区域的评论列表时,都必须进行查找以检索场地名称和详细信息。有人可以提供一些关于如何从概念上设计基于场地的定位应用程序的建议吗?谢谢。
I'm trying to build a very simple location-based app and I have all of these services at my disposal (Foursquare API, SimpleGeo, Google Places, etc). All seem to provide me a list of venues (bars, coffee shops, stores, etc) near a given longitude latitude. This is great but once the users see the venues, they will be able to write reviews about each venue (for example). Now, what do I do with this data?
- User ID (users for my app)
- Venue Name (retrieved from Foursquare API)
- Longitude, Latitude
- Foursquare Venue ID
- Review
Do I store this in my database? What happens if the venue name changes on the Foursquare servers? If I don't store this in my database, I'd have to do a lookup to retrieve the venue name and details every single time I want to return a list of reviews in the area. Can someone offer some advice on how to conceptually design a venue-based location app. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将重要的第三方信息存储在数据库中,但将其视为缓存。有一个后台任务,根据可能性和情况,每隔几分钟、几天或几周检查一次更新。变化的严重程度。在更新之间,用户可能会得到过时的数据,但是嘿,这就是生活......至少他们很快就得到了它。在进行更新时,不要一次更新所有内容,否则您将很快遇到 API 限制。
Store the essential 3rd party info in your database but treat it as a cache. Have a background task that checks for updates every few minutes, days, or weeks depending on the likelyhood & severity of changes. In between updates the user may get stale data but hey, that's life... at least they got it fast. In doing your updates, don't update everything at once or you'll run quickly into API throttling limits.