Repository navigation
Add secondary HTTP storage - #676
Conversation
|
Besides the actual change which I cannot comment on, I wonder why HTTPCACHE_BACKEND is a compile time flag. Is there any significant downside to include it always? |
|
Hi @gjasny, I'll have to come back to this some time after the 4.0 release. |
44dbfc4 to
bbcd7c5
Compare
This comment has been minimized.
This comment has been minimized.
Seems to add a dependency on libcurl |
|
This sounds great but has been stale for a while. Sounds like that could be a really huge performance boost to caching in company environments (10+ people working on same codebase, but compiling locally like in the 80s). Potential improvements:
|
|
Was there any updates on this ? I updated to 4.3, and it seemed to be working still: 80d1726 I used nginx (http://localhost:8080/cache) and curl for my testing, and it was quite simple to set up. For testing purposes you can pull and push with
It also helps when you have a build farm, like when doing continuous integration...
If you want it more compatible with those, then I think you need to add CAS support. One approach if you want to share the cache with other systems, is to do it for the files only. Instead of storing the files in a path, it calculates the SHA-256 checksum (as hex) and uses that For ccache we had it in the memcached backend, but only for file fragments and not whole files. UPDATE: Moved CAS (deduplication) to a separate topic, so please ignore for this PR. It is only "needed" for Bazel compatibility, but not a requirement for using cloud storage.
|
This comment has been minimized.
This comment has been minimized.
|
At work we switched from the memcached backend to the plain http put / get storage backend and were able to replace a 300GB RAM equipped EC2 instance with a much smaller one with 40gb network interface and a 2TB local disk at 1/10th of the price. It's backed by a nginx with sendfile enabled. Performance is great and it's running without issues since December. Our ccache is still at the 3.something memcache branch with my http patches ontop. I'll try to work on this issue during my non-feature Fridays. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@gjasny : I fixed the tracing (as per "todo") in 23235c7, but also discovered that it (tracing) was broken on master... It would be nice if we could have some kind of Did you have any thoughts about how configuration could scale to having multiple backends ? Obviously having one variable for each is not great, when talking about 4 or 5 storage backends...
There was also the discussion about compile-time vs. run-time (plugins), for configuring them. Sorry for hi-jacking the original HTTP request, we could move the discussion somewhere else. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I wrote:
Sorry for taking so long to come back to this. The 4.0 release has now happened and I've made a couple of (mostly) bug fix releases, so now the storage backend stuff has bubbled higher up on my list of things to think about. Thanks for the PR – it's generous of your company to allow you to contribute code! 👍 Before summarizing my thoughts on this I have some replies to comments made by others. |
|
@AlexanderLanin wrote:
I would say that the problem with #414 is that the real discussion did not even start, not that it has been going on long enough. But see my recent comment to #414.
If you mean "just merge it": No we shouldn't.
Yes, plain HTTP GET/PUT is compatible with many servers. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@gjasny: Here is some feedback on the PR:
See also my comment to #414. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c25c4e7 to
2ecd72f
Compare
|
I'll add an URL class and tests tomorrow. |
|
Todo:
|
|
Thanks for working on this! The title says "WIP" and there are items left on the to do list, so perhaps mark the PR as a draft until ready for review? Regarding authentication: I would like that to be supported (both via URL and via username/password attributes in the Another thing that I would like to see (again: can be done later if wanted) is configurable timeouts (see #859 (comment)). |
|
Hello, I believe this PR is ready for a review. There are some follow-up tasks:
I'll start working on those during the next days. Thanks, |
aaa4039 to
f6a8d72
Compare
|
Ready for another review. |
|
Window build looks fine. But after removing my conflicting commit I cannot resolve the conversation, anymore. |
|
Thanks! |
Hello,
this is my attempt to add an HTTP backend-storage to ccache. Despite trying we did not had success enlarging memcached with extstore. While working with Bazel we had good experience with it's HTTP-based remote caching. So I thought it might be easiest to go with a simple HTTP storage backend first. There we also won't have to care about splitting the cache content into 1 MByte chunks.
The good news is also that my employer LogMeIn allowed me to contribute code as part of my regular work. Legal also signed off.
Could you please take a look at the changes and tell me where things could be improved or completely reworked?
Thanks,
Gregor
PS: I really like the new CMake and C++11 code base!