Skip to content

Conversation

@yma955
Copy link
Member

@yma955 yma955 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.

@yma955 yma955 requested review from ligangty, ruhan1 and sswguo 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.

@yma955
Copy link
Member Author

yma955 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?

@yma955
Copy link
Member Author

yma955 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.

@yma955
Copy link
Member Author

yma955 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.

@yma955
Copy link
Member Author

yma955 commented Feb 7, 2025

Close this.

@yma955 yma955 closed this Feb 7, 2025
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