Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More post content.

  • Loading branch information...
commit 9f3a464befc17b37a5728a022119196912e4584d 1 parent 8624593
Remy Sharp remy authored
Showing with 15 additions and 3 deletions.
  1. +15 −3 docs/post.md
18 docs/post.md
View
@@ -10,9 +10,9 @@ As someone who runs workshops and speaks at conferences, I've always wanted a to
## What's new?
-In both [version 2](http://2.jsbin.com) and version 3 of JS Bin (here's [version 1](http://1.jsbin.com) for reference), the UX has been a big part of the update. [Danny Hope]() volunteered his UX experience to this open source project and collaborated very closely with me allowing us to instantly try out UX ideas, see them in action and decide whether they worked or not.
+In both [version 2](http://2.jsbin.com) and version 3 of JS Bin (here's [version 1](http://1.jsbin.com) for reference), the UX has been a big part of the update. [Danny Hope](http://twitter.com/yandle) volunteered his UX experience to this open source project and collaborated very closely with me allowing us to instantly try out UX ideas, see them in action and decide whether they worked or not.
-Again in the spirit of open source collaboration, the project needed to be upgraded from entirely PHP (and not great PHP code!) to Node.js. [Aron Carroll]() worked for the last few months in his spare time converting the existing JS Bin logic entirely to JavaScript - so as of today, JS Bin is 100% JavaScript.
+Again in the spirit of open source collaboration, the project needed to be upgraded from entirely PHP (and not great PHP code!) to Node.js. [Aron Carroll](http://twitter.com/ac94) worked for the last few months in his spare time converting the existing JS Bin logic entirely to JavaScript - so as of today, JS Bin is 100% JavaScript.
This move to Node allows us to introduce two new super cool features:
@@ -39,7 +39,19 @@ The URL structure even has a shortcut if you're [registered](http://jsbin.com/#r
Along with live remote rendering, I've been working with the Adobe Shadow team and they've gone ahead and built in compatability with JS Bin directly in to Shadow. This mean simply when you visit jsbin.com on your desktop, Shadow will automatically show you the rendered output ([here's a demo with their beta software]()).
-### Other important features
+### How the live stuff works
+
+It's pretty simple really. In fact, there's a very *very* early version of JS Bin 1, I tried out a [comet](http://en.wikipedia.org/wiki/Comet_(programming)) PHP based version of CodeCasting which was way, way more complicated. It worked, but releasing wasn't possible as my server couldn't take more than just a few concurrent sessions. The move to Node some 4 years later fixes that.
+
+As you type, we send an Ajax save request (after an idle time of 200ms). On the server side, this triggers an event that says "the bin with *this* url has just changed".
+
+When viewing the CodeCasting URL or the live remote rendering, each user is connected to our Spike program. This listens for the event that says a bin has changed, and when that happens, it just finds all the users watching a particular url, and sends them the updated panel (so we only send the CSS panel if the CSS panel changed).
+
+An [EventSource](http://html5doctor.com/server-sent-events/) maintains a persistent connection with the server and is listening for those events in the browser. When the event is recieved, depending on the content type, it'll either inject the content live, or refresh the page giving you the latest code.
+
+
+
+## Other important features
Some of these features were always part of JS Bin, but hidden inside of the "beta" access - which required a clunkly console command. Now JS Bin 3 adds the much needed UI to do simple things like login to remember your history of bins.
Please sign in to comment.
Something went wrong with that request. Please try again.