-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
============ | ||
Introduction | ||
============ | ||
|
||
Overview | ||
======== | ||
|
||
Orbited2's purpose is to ease the development of Websocket-based applications by normalizing the protocol and api across varying browser and server implementations. | ||
|
||
|
||
#. Choose a WebSocket server framework/library (like node.js, or eventlet.) | ||
#. Write a WebSocket application. | ||
#. Deploy Orbited2. It will put a normalized Websocket API in *all* browsers. | ||
|
||
|
||
|
||
The Problem | ||
----------- | ||
|
||
WebSocket is a far better real-time web protocol than anything we've seen so far, but it only works in a couple of the latest browsers. Additionally, the protocol is so new that it changes very quickly; a WebSocket application you write today might well stop working tomorrow. Further compounding the problem are the multitude of entrenched intermediaries, namely forward proxies, reverse proxies, firewalls, virus scanners, and more -- these obstacles will intercept and deny WebSocket connections. | ||
|
||
The Solution | ||
------------ | ||
|
||
This code works in *all* browsers, and it will always use the best communication mechanism possible. | ||
|
||
..sourcecode:: html | ||
|
||
<script src="http://example.com:8000/static/Orbited2.js"></script> | ||
|
||
|
||
.. sourcecode:: javascript | ||
|
||
Orbited2.WebSocket.install({ | ||
protocolVersion: "hixie76", | ||
}) | ||
|
||
var ws = new WebSocket('ws://example.com/app') | ||
|
||
|
||
Orbited Veterans | ||
---------------- | ||
|
||
For all of you Orbited veterans who aren't so sure about writing WebSocket servers, and you just want to keep using trusty old Orbited.TCPSocket (but with performance and usability improvments) -- don't worry! | ||
|
||
.. source:: html | ||
|
||
<script src="Orbited2.js"></script> | ||
|
||
|
||
.. sourcecode:: javascript | ||
|
||
var sock = new Orbited2.TCPSocket({ orbitedUri: "http://127.0.0.1:8000" }) | ||
sock.open("irc.freenode.org", 6667); | ||
sock.onopen = function() { | ||
sock.send('NICK mcarter\r\n'); | ||
} | ||
//etc | ||
|
||
|
||
Installation | ||
============ | ||
|
||
Orbited2 is written in python and depends on setuptools for installation. The fastest way to install hookbox is to type: | ||
|
||
.. sourcecode:: none | ||
|
||
# easy_install orbited2 | ||
|
||
|
||
If you are missing python or setuptools, please refer to the following links: | ||
|
||
* `install python <http://python.org/download>`_ | ||
* `install setuptools <http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions>`_ | ||
|
||
To confirm your installation succeeded, type: | ||
|
||
.. sourcecode:: none | ||
|
||
# orbited2 --help | ||
|
||
Github | ||
====== | ||
|
||
The development version of Orbited2 is located on github: | ||
|
||
* http://github.com/mcarter/orbited2 | ||
|
||
You can get a copy of the latest source by cloning the repository: | ||
|
||
.. sourcecode:: none | ||
|
||
# git clone git://github.com/mcarter/orbited2.git | ||
|
||
|
||
To install Orbited2 from source, ensure you have python and setuptools, then run: | ||
|
||
|
||
.. sourcecode:: none | ||
|
||
# cd orbited2/daemon | ||
# python setup.py install |