Skip to main content
Commonmark migration
Source Link

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?


###9/21/11 Update

9/21/11 Update

With all the talk of how Apache (the most commonly installed server for running WP on a shared host) can't really handle websockets natively, I'm wondering about an alternative. Several plugins (JetPack, for example) talk to an external service or API to generate content.

Stats requests content from Automattic. Akismet sends data back and forth from an external server. After the Deadline submits content at publish time. A few SEO tools pass things back-and-forth through external systems.

So as an alternative to housing the websocket code within a WordPress plugin, would it be feasible to host a websocket service in a central location and have a WordPress frontend interact with that instead?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?


###9/21/11 Update

With all the talk of how Apache (the most commonly installed server for running WP on a shared host) can't really handle websockets natively, I'm wondering about an alternative. Several plugins (JetPack, for example) talk to an external service or API to generate content.

Stats requests content from Automattic. Akismet sends data back and forth from an external server. After the Deadline submits content at publish time. A few SEO tools pass things back-and-forth through external systems.

So as an alternative to housing the websocket code within a WordPress plugin, would it be feasible to host a websocket service in a central location and have a WordPress frontend interact with that instead?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?


9/21/11 Update

With all the talk of how Apache (the most commonly installed server for running WP on a shared host) can't really handle websockets natively, I'm wondering about an alternative. Several plugins (JetPack, for example) talk to an external service or API to generate content.

Stats requests content from Automattic. Akismet sends data back and forth from an external server. After the Deadline submits content at publish time. A few SEO tools pass things back-and-forth through external systems.

So as an alternative to housing the websocket code within a WordPress plugin, would it be feasible to host a websocket service in a central location and have a WordPress frontend interact with that instead?

Notice removed Draw attention by EAMann
Bounty Ended with marfarma's answer chosen by EAMann
Notice added Draw attention by EAMann
Bounty Started worth 200 reputation by EAMann
Alternative solution
Source Link
EAMann
  • 32.2k
  • 9
  • 88
  • 147

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?


###9/21/11 Update

With all the talk of how Apache (the most commonly installed server for running WP on a shared host) can't really handle websockets natively, I'm wondering about an alternative. Several plugins (JetPack, for example) talk to an external service or API to generate content.

Stats requests content from Automattic. Akismet sends data back and forth from an external server. After the Deadline submits content at publish time. A few SEO tools pass things back-and-forth through external systems.

So as an alternative to housing the websocket code within a WordPress plugin, would it be feasible to host a websocket service in a central location and have a WordPress frontend interact with that instead?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?


###9/21/11 Update

With all the talk of how Apache (the most commonly installed server for running WP on a shared host) can't really handle websockets natively, I'm wondering about an alternative. Several plugins (JetPack, for example) talk to an external service or API to generate content.

Stats requests content from Automattic. Akismet sends data back and forth from an external server. After the Deadline submits content at publish time. A few SEO tools pass things back-and-forth through external systems.

So as an alternative to housing the websocket code within a WordPress plugin, would it be feasible to host a websocket service in a central location and have a WordPress frontend interact with that instead?

Tweeted twitter.com/#!/StackWordPress/status/115998623216574464
Add some external references.
Source Link
EAMann
  • 32.2k
  • 9
  • 88
  • 147

WebsocketsWebsockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technologyExisting technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push""push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can spontaneously send messages, and the server can send messages too.

Existing technology (JavaScript) requires everything to be started by the client - the server can't send anything to the client that the client hasn't requests. So scripts need to be constantly refreshing and re-requesting data that might not have changed. Websockets work more on a "push" basis and let new data come down the pipe whenever.

Unfortunately, most (all I can find, anyway) websocket implementations require a specific server application to work. People will run Apache on ports 80 and 443 (http and https) and run another system (typically Node.js) on another port (i.e. 8000 or 8080) to handle websocket requests.

This works, obviously, but it's got some drawbacks.

I have a plugin I want to build that would greatly benefit from using websockets within WordPress. But if a user needs to install a second web server (usually impossible for people with shared hosting), then it won't work as a plugin.

So, for any of you who have experience, how would you make WordPress compatible with websockets? Would you make WordPress handle the communication itself, or bundle another mini-server script into the plugin? If you've done this already, how did you accomplish it without breaking WordPress itself?

Possible resources?

added 56 characters in body
Source Link
kaiser
  • 50.8k
  • 27
  • 150
  • 244
Loading
Source Link
EAMann
  • 32.2k
  • 9
  • 88
  • 147
Loading