Multiple Lookup Strategy
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the existing :lookup and :ip_lookup configuration and the current handling of geocoding exceptions and results. Define the fallback conditions, API-selection rules for IP and physical addresses, and configuration behavior; done means the strategy is specified clearly enough to implement and verify.
Written by the indexing model from the issue text.
Description
We need a way to effectively use multiple geocoding APIs. Situations that need to be handled:
- The primary API is unavailable and we'd like to automatically fall back to another.
- The primary API is returning bad/unexpected results (or quota is reached) and we'd like to automatically fall back to another.
- We'd like to use different APIs for different queries, depending on whether the query is an IP address or a physical address, but also if the query is for a certain part of the world where one API is significantly better than another (eg: Yandex in Russia).
Ideas for implementation:
- Set :lookup to an array of preferred APIs (descending preference).
- Set :lookup to a block which takes a query and returns a lookup name, or an array of names (as in #1).
Need to determine:
- How to "fall back" to a less-preferable API. On timeout? On any API-related exception? On any Geocoder exception? On a particular API response? On a
nilresult? And how configurable does it need to be? - How to handle IP vs. physical address lookups in the config. Currently they are configured separately (:lookup and :ip_lookup). Is there an advantage to combining them?
- Dominant language
- Ruby
- Stars
- 6.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alexreisner/geocoder
-
Difficulty 4/5 3-5 days Newbie friendliness 60/100
alexreisner/geocoder#1708 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
alexreisner/geocoder#1701 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
alexreisner/geocoder#1699 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
alexreisner/geocoder#1696 · 6 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
alexreisner/geocoder#1689 · 2 comments ·
All issues in alexreisner/geocoder
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100