在生产服务器上使用地理编码器 [英] Using geocoder on production server

查看:102
本文介绍了在生产服务器上使用地理编码器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于位置的应用程序。我需要一个可信的来源来获取地理定位。



现在我正在使用 geocoder 插件。



我收到这个错误: - $ / b>

 地理编码API的响应速度不够快(请参阅Geocoder :: Configuration.timeout来设置限制)。 

当我们的团队5在临时服务器上进行测试时,出现错误

我需要一个足够快的解决方案,每天约10k个请求,没有每秒限制。

PS:使用一些付费服务。

编辑



如果你想在纽约搜索某些东西。在文本框中,您将输入newyork并按Enter键。现在在服务器端,我需要为newyork获取geocode,然后在db中搜索。 (在JavaScript中),您将不会受到限制:


通过
地理编码Web服务进行服务器端地理编码每个IP每天的配额为$ b b b 2,500个请求,因此一天中所有
的请求都将计入
的配额。另外,Web服务是
利率限制的,所以请求
过快导致
阻塞。通过浏览器进行的客户端地理编码
的费率限制为每次地图会话
,因此地理编码是分布在所有用户中的
,而
则随您的用户基础而扩展。对本文中概述的
策略进行地理编码
配额和费率限制。



何时使用客户端地理编码



基本答案是几乎总是。由于
的地理编码限制是针对每个IP地址的,所以
限制您的应用程序的消费者
。这是非常罕见的,有人打算
每天输入超过2500个地址
坐在他们的电脑上。因此,运行客户端地理编码的
,您
通常不必担心您的配额


http://code.google.com/apis/maps/ articles / geocodestrat.html


I am developing a location based application. And i need a trustable source for getting geolocation.

right now i am using this geocoder plugin.

and i am getting this error:-

Geocoding API not responding fast enough (see Geocoder::Configuration.timeout to set limit).

I am getting error when our team of 5 is testing on staging servers

I need a fast enough solution with some ~10k request a day with no per second limits

PS: I am open to use some paid service.

EDIT

Think of a case you want to search something in NewYork. In textbox you will type newyork and press enter. Now on server side I need to fetch geocode for newyork and then search in db based upon that.

解决方案

You should geocode client side (in javascript) you won't be hit by the limits :

Server-side geocoding, through the Geocoding Web Service has a quota of 2,500 requests per IP per day, so all requests in one day count against the quota. In addition, the Web Service is rate-limited, so that requests that come in too quickly result in blocking. Client-side geocoding through the browser is rate limited per map session, so the geocoding is distributed across all your users and scales with your userbase. Geocoding quotas and rate limits drive the strategies outlined in this article.

When to Use Client-Side Geocoding

The basic answer is "almost always". As geocoding limits are per IP address, that limit counts against the consumer of your application. It's going to be very rare that someone is going to enter more than 2,500 addresses a day sitting at their computer. Therefore, running client-side geocoding, you generally don't have to worry about your quota.

http://code.google.com/apis/maps/articles/geocodestrat.html

这篇关于在生产服务器上使用地理编码器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆