Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:21:32+00:00 2026-06-10T04:21:32+00:00

First off – I understand SPDY and Websockets aren’t the same thing, and that

  • 0

First off – I understand SPDY and Websockets aren’t the same thing, and that you can run Websockets over SPDY like you can with HTTP, etc.

However – I am wondering if SPDY would be a viable replacement for websockets if I am trying to provide a REST (like) API that also supports server push (bi-directional calls over the same connection).

My current prototype uses websockets (node+socket.io), and works fine. However, my issue with websockets is I am having to dream up my own JSON protocol for routing requests both to and from the server. I’d much rather use REST-style URIs and Headers in requests, which fits better in a REST-based architecture. SPDY seems like it would support this better.

Also, because of the lack of headers, I’m concerned websockets won’t fit well in our deployment network, and thinking SPDY would be a better fit again.

However, I’ve not seen many examples of bidirectional SPDY requests, apart from pushing files to the browser. I would like to push events and data to the browsers, such as:

Content-Type: application/json
{
   "id": "ca823f3e233233",
   "name": "Greg Brady"
}

but it’s not clear to me how the browser/Javascript might “listen” and react to these, as I would with the WebSocket and socket.io APIs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:21:34+00:00Added an answer on June 10, 2026 at 4:21 am

    Let’s start from the beginning: why would you want to run WebSockets over SPDY, as opposed to doing an HTTP upgrade? If you upgrade an HTTP connection to WS, then nothing else can use that TCP stream – the WS connection can be idle, but the connection is blocked nonetheless. With SPDY, you can mux multiple requests/responses, and a websocket connection (or even multiple) over the same underlying TCP stream. On a practical note, as of July 2012, WS over SPDY is still a work in progress, so you will have to wait to use SPDY for WebSockets – hopefully not too long though!

    But let’s assume the support is there… The reason why it’s not clear how to listen for “SPDY Push” from JavaScript is because there is no way to do that! A pushed resource goes into your browsers cache – nothing more, nothing less. If you need to stream data to your javascript callbacks, then WebSockets, or Server-Sent Events (SSE) is the answer.

    So, putting it all together:

    • HTTP adds a lot of overhead for individual small requests (headers, etc)
    • WebSockets gives you a low overhead channel, but requires you implement own routing
    • SPDY will significantly reduce the overhead and cost of small HTTP requests (win)
    • SSE is a good, simple alternative to pushing data to the client (which works today, over SPDY)

    You could use SPDY+SSE to meet your goals, and all of that communication can run over the same TCP channel. SPDY requests to the server, SSE push from the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, I would like to make clear, that I am SUPER NEW TO
First off, I would like to say that I am just starting with PHP
First off id like to note that this works when there is 1 row
First off, I noticed that you can place the <map> tags anywhere in the
First off, kudos to the amazing apache cordova team for making a platform-independent native-like
First off, I'm using XCode 4.0.2. Okay, here is my issue. I can build
First off I'm horrible with regex, hoping I can get some help here cause
First off I have an app that provides the user information about the amount
First off, i like to tell you my directory structure - /var/www |- /social_network/
First off, I need to give a disclaimer: DO NOT RUN THIS JAVASCRIPT It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.