binkley / modern-java-practices

Modern Java/JVM Build Practices
Other
931 stars 69 forks source link

Build caching #431

Closed sgammon closed 1 week ago

sgammon commented 7 months ago

See broader card, #466.

Proposal

  1. Move this card to done with "wontfix" label. The "Buildless" tool suggested in this card is commercial.
  2. Keep #466 (GitHub caching) as an active card -- it is orthogonal to this card.
  3. Add a card for Earthly caching (build container), which would interact with point 2.

Hey there @binkley,

We make a build cache tool called Buildless, with support especially for Gradle and Maven.

I was wondering if you'd be open to me filing a PR to add it to this sample.

Buildless is usable both as a cloud and entirely for free, through a local agent which accelerates Gradle's cache traffic. It does so by upgrading from HTTP/1.1 to HTTP/3.

Point is, it's a great tool, and the agent can be used for free and without an account. Is this the kind of thing that would be good to add?

Also, thanks for making this 😄 it's a pain to get started on a new Gradle project and this looks great

binkley commented 7 months ago

I'd love contributions!

I'm behind on keeping this repo refreshed. For example, I need to migrate Gradle integration tests to the newer framework native to Gradle.

My concern is including commercial products. The phrase "free during the beta" does not bode well. What are expectations for buildless? Would you provide free use for all open source projects?

Note that this project uses a Public Domain license. If there are bits helpful for you for commercial reuse, that is fine.

binkley commented 7 months ago

I see no code to review for a PR. I'd like to try myself & review. Please file a PR that includes edits to README.md on how to use buildless, and what expectations are for J. Random Developer to use. If licensing is a concern, that needs addressing.

sgammon commented 7 months ago

@binkley

I'd love contributions! I'm behind on keeping this repo refreshed

Okay! No worries. Maybe I can find some places to add value in addition to build caching. We spend a lot of time with Gradle, naturally.

My concern is including commercial products.

We need to do a better job explaining this. At the moment we're just a 3-person team, so the product sees a lot of attention, but the website, not so much. Allow me to explain

1) There are two parts to Buildless. Locally, there is the Buildless CLI + Agent, which runs as an in-memory Gradle cache on your own machine. These are free forever and will be licensed open source, probably MIT.

2) Then there is the Cloud. This is an optional component which runs on Cloudflare, primarily, backed by Dragonfly at the origin.

"All usage is free" because we're not sure what usage will cost until product features settle, so we want some breathing room to perform price discovery and set a fair price when that becomes clear. During our beta, all usage is paid by the major Cloud providers, and we want to find a way to pass that free speed on to our users.

That being said, we've already sort of decided that our price point is going to be intentionally fair, as a feature. We're looking at $5 as a starting place for individual devs. It turns out you don't need much cache space in the Cloud to see real gains.

Anyway, that's a lot of word salad for: it's free for now, later the high-power Cloud version will have a reasonable unsurprising price tag, and yes, we want to support a generous or unlimited free tier for OSS. All the tooling is free and you can easily not use the Cloud or turn it off at any time. Using the local tools doesn't require login or an account, of course.

Cloud also supports a feature called Cache Projects, which we're designing for OSS. It will let reads be anonymous for the cache so open source contributors don't have to set anything up at all to share in the lift.

I see no code to review for a PR.

I wanted to check before filing, but it sounds like there's enough interest to try it. I'll give a PR a go and provision you an API key as well. I'll send to the email at your profile. Thanks for being open to contributions and for your honest response 😄

binkley commented 4 months ago

@sgammon I need to research buildless. This is unfamiliar to me. I love that I get examples from you!

binkley commented 4 months ago

@sgammon Buildless seems commercial. The "individual/OSS" plan is described as "coming soon". Would you recommend this for a Public Domain project?

sgammon commented 4 months ago

@binkley Pricing is only for the cloud side of the cache; the local caching agent is fully free and OSS. We will be releasing a free-forever plan soon specifically designed for OSS projects. In this operating mode, it functions with Cloudflare as a cache instead of Redis, and CF has granted us unlimited bandwidth for OSS projects.

I wouldn't recommend integrating it yet until we can get our website and other materials updated, but that's the intent of the recommendation: the OSS only side can still provide significant performance gains. The paid side is mostly for people who want to upgrade to something bigger; it only differs in the scale of cached data you can store, and offers other team features (SAML) which aren't really relevant anyway to OSS projects. So people don't lose out at all by sticking to OSS.

sgammon commented 4 months ago

I should also say: public read projects are cool because it means when you compile code on this project, I can re-use the cache without even so much as an API key. No installation either. That feature is also coming soon and makes Buildless extra relevant to OSS. Public projects are read-only publicly and writable if you are a contributor.

binkley commented 4 months ago

Note: update the Performance page in the wiki in giving advice.