5,399 karma · joined April 2, 2007
[ my public key: https://keybase.io/igrigorik; my proof: https://keybase.io/igrigorik/sigs/eMcFb-lAFqkBGZKfdzJcQrC5a2dTBj_8cTAQqsXUhaE ]
That said, as a reference, a Bitcoin transaction today is anywhere between ~160~1000 bytes, and the full block chain is on the order of tens of GBs. Is that a problem? It can be. To address this, Bitcoin uses Merkle trees and "Simple Payment Verification" (SPV) -- worth looking into, if you're interested.. long discussion on its own. I'll just note that SPV changes what you can say about integrity/security of the transaction.
As for "lottery", I believe the answer is yes and no. The basic point is to raise the cost of "faking" a confirmation, and how you do that is completely up to you - e.g. captchas are a great example! That said, the random part of the non-deterministic process provides a lot of really nice properties for a distributed system - fairness claims, etc. That said, this is a deep topic (with lots of caveats) in its own right.
If you want to define own load behavior: use the upcoming Font Load Events API.
http://www.igvita.com/2014/01/31/optimizing-web-font-renderi...
Jetty guys had a couple of nice demos they showed off at various conferences. Here's one: http://www.youtube.com/watch?v=4Ai_rrhM8gA
a) Page A currently inlines half dozen small assets on every page. These inlined resources inflate every page and are delivered at same priority as HTML. By contrast, a "dumb push" server delivers these same assets as individual resources via push. Net benefit? Basically same performance since inlining is a form of application-layer push. However, a smart server can at least prioritize and multiplex push bytes in a smarter way... Now, let's make the server just a tiny bit smarter. If it's the same TCP connection and the server has already pushed the resource, don't push it on next request. Now we're also saving bytes... <insert own smarter strategy here>.
b) Page B has two CSS and one JS file in the critical rendering path. Without push you either inline all three (ouch), or, you roundtrip to the client and get it to parse the HTML to discover these resources and come back to the server... With push, the server can avoid the extra RTT and push those assets directly to the client -- this is a huge performance win. How does the server know? Well, either you made it smart.. or you use some adaptive strategy like looking at past referrers and building a map of "when client requests X, they also come back for Y and Z" - this is already available in Jetty.
The fears of extra bytes are also somewhat exaggerated (they're valid, but exaggerated). The client, if they desire, can disable push. The client can also use flow-control to throttle how much data can be transferred in first push window (both FF and Chrome do this already). Lastly, the client can always decline and/or RST a push resource.
Some additional resources: - http://chimera.labs.oreilly.com/books/1230000000545/ch12.htm... - http://www.igvita.com/2013/06/12/innovating-with-http-2.0-se...
a) QUIC makes headway on its own, delivers significant perf win, moves to IETF and becomes a standalone protocol in the long run. b) TCP and TLS leverage techniques & lessons learned from QUIC.
Either way, the users will win. It's too early to tell which of these paths it'll take.. But I do know that both TLS and TCP groups are paying close attention to QUIC and there are already discussions on how to improve performance based on some of the ideas being prototyped in QUIC.
What I wish GitHub would do is allow us to specify our own GA profile in project settings and just add an extra two lines of JavaScript in their pages to beacon the right metrics directly to GA. They're already using GA on their pages, so adding an additional profile is trivial. [1]
A proper GA integration would eliminate the need to proxy requests, and give us (repo owners) more metrics: I'm most interested in referral information - aka, how are people finding my repo. Also, it would enable analytics on all pages (e.g. source files, etc).
If anyone from GH is reading this... Please? :-)
[1] https://developers.google.com/analytics/devguides/collection...
For more, head to: http://bit.ly/quic-group
Some details on Chrome implementation here: http://www.igvita.com/posa/high-performance-networking-in-go...