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

Add proxy cache on CassandraPathDB #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

yma96
Copy link
Member

@yma96 yma96 commented Jan 20, 2025

Note: getProxySitesCache is used for cache layer for db query, to avoid frequent query for each download, it could be clean for Proxy Site delete request, could check the detail on galley commit.

@yma96 yma96 requested review from ligangty, sswguo and ruhan1 January 20, 2025 01:00
@ruhan1
Copy link
Contributor

ruhan1 commented Jan 20, 2025

I believe this is not the proper place to add this code. PathDB library is only for path mapping storage. imo, anything for proxy settings should be put in content service (indy). We have something similar in Indy to operate Cassandra, like CassandraNotFoundCache. You may refer to it.

@yma96
Copy link
Member Author

yma96 commented Jan 20, 2025

@ruhan1, I'm afraid it's hard to implement from Indy, since it's the http job called from Galley, and we do need a cache layer from there, I don't think it's a good way to loop call Indy from Galley, WDYT?

@ruhan1
Copy link
Contributor

ruhan1 commented Jan 21, 2025

@ruhan1, I'm afraid it's hard to implement from Indy, since it's the http job called from Galley, and we do need a cache layer from there, I don't think it's a good way to loop call Indy from Galley, WDYT?

If Galley use it, how about implement it in Galley?

@yma96
Copy link
Member Author

yma96 commented Jan 21, 2025

@ruhan1, that means the db cache part of code could not be re-used if implement only from galley, I get your point about this, I'll try to figure out and peel these from pathmap then setup a separate keyspace to store the proxy data rather than indystorage.

@ruhan1
Copy link
Contributor

ruhan1 commented Jan 21, 2025

@ruhan1, that means the db cache part of code could not be re-used if implement only from galley, I get your point about this, I'll try to figure out and peel these from pathmap then setup a separate keyspace to store the proxy data rather than indystorage.

yeah, just copy some code or ref to the cassandra code in indy. Using a different keyspace is good. Some other services use their own keyspace too, like repo, folo.

@yma96
Copy link
Member Author

yma96 commented Jan 21, 2025

@ruhan1, yep, make sense, thanks.

@sswguo
Copy link
Member

sswguo commented Jan 21, 2025

As @ruhan1 mentioned the NotFoundCache, I think we can introduce our cache in the same way, declare the interface in gally, and implement it in indy.

Ref: https://github.com/Commonjava/galley/blob/master/api/src/main/java/org/commonjava/maven/galley/spi/nfc/NotFoundCache.java

Let's discuss it in the meeting.

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

Successfully merging this pull request may close these issues.

3 participants