Access the Master repo via an API #1592

Closed
fabiopelosin opened this Issue Nov 13, 2013 · 6 comments

Projects

None yet

4 participants

@fabiopelosin
Member

The current strategy of fetching and updating the specs repo is not scalable and given its size is not performant anymore. The master repo should be accessed via a dedicated API.

@swizzlr
Contributor
swizzlr commented Nov 13, 2013

Theoretically, we could prune all specs that:

  • are not the latest version
  • are not a dependency in any way

I wonder how much that would save though, and I guess it isn't the core issue. Git remains remarkably fast, though, and a full clone takes very little time. It would require an investment in non-free server infrastructure, unless heroku were generous enough to offer an instance.

@Kapin
Member
Kapin commented Nov 13, 2013

@irrationalfab 👍

@alloy
Member
alloy commented Nov 14, 2013

I’m not sure I see the problem with the current git repo strategy. It makes it very easy for us to make changes, it makes it very easy for people to have private repos, and finally we don’t have to keep a web service running that most of the users will deal with on a daily basis.

GitHub has much more money and motivation for this than me ;)

@fabiopelosin
Member

I’m not sure I see the problem with the current git repo strategy.

Some problems which I see are:

  • Requires pod setup after the installation of CocoaPods, which downloads the whole history of the repo (which is not used by CocoaPods). This can be very inconvenient when installing CocoaPods with low bandwidth connections.
  • Every installation pulls the master repo and given its activity it is a matter of time before the performance hit starts to get noticeable. The API would already be much faster.
  • Less possibility of failures in the user machine (i.e. people modifying the master repo and it then refusing to pull).

it makes it very easy for people to have private repos

I'm not proposing to drop the current implementation. I'm proposing to add an alternative one where you can specify the url of the API and the name of the source. In detail this issue is about implementing an alternative strategy for the [Pod::Source](https://github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/source.rb) class and move the git specific part of that implementation to [Pod::Source::GitSource].

[...] and finally we don’t have to keep a web service running that most of the users will deal with on a daily basis.
GitHub has much more money and motivation for this than me ;)

Fair point! Note thought that this web service could be really simple (a stripped down version of the feeds.cocoapods.org app). And that the fallback strategy would always available.

@fabiopelosin
Member

An example of possible complications: https://scalenpm.org. However is important to keep in mind that we don't distribute packages (likely that would not be possible with GitHub anyway).

@fabiopelosin
Member

Moving this to CocoaPods/Core#43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment