johnluetke / WeatherAPI

Abstracts online weather services into a simple API
Apache License 2.0
14 stars 4 forks source link

Add LRU cache support #9

Open alexanderdean opened 10 years ago

alexanderdean commented 10 years ago

For high-volume environments like Hadoop and Storm, performing an API lookup for every record is a non-starter.

Therefore, it would be worth adding an LRU cache into the WeatherAPI. In Scala we normally use Twitter's LruMap but we could use the Java equivalent instead.

We take this approach in https://github.com/snowplow/scala-forex

johnluetke commented 10 years ago

Go for it.

alexanderdean commented 10 years ago

Coolio

alexanderdean commented 10 years ago

Let's use this one: http://commons.apache.org/proper/commons-collections/javadocs/api-3.2.1/org/apache/commons/collections/LRUMap.html