Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis as backend store. #9

Open
ankushs92 opened this issue May 21, 2016 · 1 comment
Open

Redis as backend store. #9

ankushs92 opened this issue May 21, 2016 · 1 comment

Comments

@ankushs92
Copy link
Owner

Currently we have the Java's TreeMap as the repository. This is the fastest possible solution,since no network IO is involved .
We can also have Redis as the backend store.
How I think we should do it :

final Jedis jedis = new Jedis(); //Blah blah,however you want to configure Jedis.
//Pass it to the constructor.Now the DbIpClient knows that Redis is the primary storage.
final DbIpClient dbIpClient = new DbIpClient(PATH_TO_DB_IP_FILE,jedis);
//Retrieves from Redis
final GeoEntity geoEntity = dbIpClient.lookup("11.22.11.11); 
@Leeforrest
Copy link

I would like to rewrite the DbIpRepository, is that possible to make the repository as a variable of ResourceImporter and GeoEntityLookupService so that users can set a self defined repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants