1,562 karma · joined July 20, 2008
http://developer.github.com/v3/repos/hooks/#pubsubhubbub
We also have a regular JSON endpoint for our hooks resource (which is essentially a subscription API).
(using ruby 1.9.3p194)
Calculating -------------------------------------
without dci 68507 i/100ms
with dci 24409 i/100ms
with delegator 46945 i/100ms
-------------------------------------------------
without dci 2240202.4 (±3.2%) i/s - 11235148 in 5.020463s
with dci 412445.3 (±3.7%) i/s - 2074765 in 5.037113s
with delegator 1018928.4 (±1.6%) i/s - 5117005 in 5.023310s
RUBY: require 'rubygems'
require 'benchmark/ips'
require 'delegate'
class ExampleClass
def foo; 42; end
end
module ExampleMixin
def foo; 43; end
end
class ExampleProvisioner < SimpleDelegator
def foo; 44; end
Benchmark.ips do |bm|
bm.report("without dci") { ExampleClass.new.foo }
bm.report("with dci") do
obj = ExampleClass.new
obj.extend(ExampleMixin)
obj.foo
end
bm.report("with delegator") do
ExampleProvisioner.new(ExampleClass.new).foo
end
endBased on its support of tags/searching, I'd imagine Gitrep is being responsible here though.
We're not opposed to bots or services. We encourage it, and use one ourselves. The key is making it opt-in so it doesn't bother people that don't want it.
Travis CI is a popular addon, but they don't have a bot that runs tests and tries to get you to setup their service. They just focus on providing a bad ass service that you _want_ to setup.
Edit: You 'opt' in to a bot one of two ways:
1. You add their GitHub Service to your repository (see the Service Hooks tab of your Repository Settings). This is how Travis CI started out.
2. You setup an OAuth token with the service. Travis does this now, and provides a single button to enable CI builds for one of my repositories.
HN cred is amazing, but so is GitHub cred :)
https://help.github.com/articles/responsible-disclosure-of-s...
This has never been Rails' focus. Let Rails keep doing what it kicks ass at. Sinatra works great for API endpoints. There's probably an opportunity for an API-focused extension to Sinatra. Of course, Grape works too (https://github.com/intridea/grape).
The nice thing is that all of these are built on Rack now. GitHub.com runs as a Unicorn rack app that mounts over 30 Sinatra apps and a massive Rails app together. I'm not saying this is an optimal solution, it's just where the app is at in its current evolution. But it is very possible :)
MongoDB Counters: http://railstips.org/blog/archives/2011/06/28/counters-every... http://railstips.org/blog/archives/2011/07/31/counters-every...
Kestrel: http://railstips.org/blog/archives/2012/03/05/misleading-tit...
Gets some decent traffic and works well.
Maybe you should've built them a client too? https://www.braintreepayments.com/braintrust/when-rest-isnt-...
I've heard great things from people updating their API clients to use our new hypermedia stuff. So we're pushing forward with our hypermedia experiments at GitHub. People are still free to optimize for speed (reduce the number of HTTP calls in environments where it really matters) or even development speed (hardcoding a few API calls instead of dropping in a full client library) if they like.
We're experimenting with more :)