play-co / devkit

HTML 5 game platform for browser and mobile
http://docs.gameclosure.com
622 stars 126 forks source link

Feature bare cache #267

Closed yofreke closed 8 years ago

yofreke commented 8 years ago

In progress


Rationale for using git bare repos for caching.

Devkit in general has caching, specifically js.io and the build server are built on this idea of having symlinks to the modules so that we can use a cached version to keep network overhead down.

  1. Having a bare repo and just cloning that from one folder to another solves this issue and also lets us cache every version in one go using the minimal system file space.
  2. We can reuse this so that when any of our engineers call devkit install on a project it doesn't go all the way to github to get the version they want which more importantly then bandwidth is very slow and costs us valuable time. .i.e Money.
  3. Non Unix support (i.e windows) should be a lot more viable because symlinks are a massive disaster on that platform (this is not that important but still true). Also because of relying on nodegit instead of the git cli.

Additionally we can then add an option like devkit cache update which updates all the cached bare repos and that way we can bake this into jsio container creation that updates periodically so that when users login to jsio their container always has access to the latest versions of modules.

Other options such as devkit cache list and devkit cache inspect should be added to list all the modules in the cache and to see what the head commit is and the remote and possibly date???

(credit for rationale @martell )

martell commented 8 years ago

@yofreke I assume you had to merge this for the devkit app type for jsio. How is it shaping up? Need help anywhere with the git stuff?

yofreke commented 8 years ago

Would be good to have some tests around the new module cache to make sure it works... other than that not sure