twitter-archive/CocoaSPDY

Server Push

caniszczyk opened this issue · 17 comments

Server Push

It would be interesting also to implement server hint. A client could decide then whether to download the resource or not, and some optimizations could even be done by combining several resources discovered through hints by the client could later be retrieved in a single combined call for a package of resources.

We are looking forward it

Has any work been done on this yet? Alternately, are there any specs for the implementation?

We're going to be implementing this over the next couple of weeks and I'd love to make sure we deliver a merge-able patch.

As far as I know no, we definitely welcome contributions!

@goaway can comment some more potentially.

We have a functional implementation of this over at the @layerhq fork. Pull request coming later this week

We are up and running with an implementation of this. The PR against our fork is available at: https://github.com/layerhq/CocoaSPDY/pull/1

@blakewatters this is awesome - I'll take a look this coming week. We have a couple unrelated updates to make, so it would be great to get this merged in to avoid conflicts.

We are working with a pretty divergent branch on the Layer fork at this point. It would be great to circle up and figure out how much our touches we can get up stream.

Right now the full list of updates includes:

  • Server push
  • GCD concurrency changes
  • Addition of CLI automation for running the test suites (project changes to support this)

Any update on this?

The SPDY push is working like a champ for us. Would love to figure out how to get our bits merged

We at @twitter are committed to implementing server push very soon, so updates & progress on this issue will be forthcoming. Stay tuned!

@kgoodier you do realize that we’ve already implemented it, right?

Yes, sorry -- by "implement" I just meant get it working, by whatever means necessary, first in the develop branch of CocoaSPDY, then in the master branch. Hopefully we can just merge, but since the branches have diverged it needs a close inspection.

@kgoodier @goaway Clean patch against master for SPDY push available on #59

Is there any update on this? It looks like @blakewatters work was abandoned?

I just issued a pull request (#136) for server push support based on work I did at the beginning of the year, which was itself based on work done by @blakewatters et al (#59).

This is fundamentally different from the approach taken in #59 by not exposing as much to the app. This means the app does not have to be aware of SPDY sessions and does not have to implement and register a custom delegate. Instead, the app uses the standard NSURL system for hooking up to pushed streams, with an NSNotification posted whenever new pushed requests are received.

You could still use a long-lived NSURLRequest and receive multiple push requests associated with it. This new implementation should provide all the same functionality that @blakewatters needed in his implementation, but will obviously require some code changes.

#136 merged. Please open new issues to discuss future additions, changes, questions on use, etc.