Announcing Orbited 0.6.0

9 views
Skip to first unread message

Michael Carter

unread,
Aug 13, 2008, 1:20:01 PM8/13/08
to orbite...@googlegroups.com
I'm pleased to announce the release of Orbited 0.6.0. With this release, Orbited has officially moved from alpha status to beta. At this point Orbited is stable enough to be used in production environments. While we will be adding new features, we have no plans to change the core functionality or APIs. Note that Orbited 0.6.0 does not support the deprecated Orbit dispatch protocol. Orbited 0.6.0 can be downloaded from the Cheeseshop (http://pypi.python.org/pypi/orbited), or with easy_install -U orbited

Thanks to everyone who contributed to this release:

Mario Balibrera
Michael Carter
Marcus Cavanaugh
Petar Dobrev
Jonathan Ellis
Paul Jones
Rui Lopes
Jacob Rus
Frank Salim
Adrian Weisberg
And more...

Note some of the changes:

New API:
   - Include /static/Orbited.js which provides Orbited.TCPSocket
   - The TCPSocket constructor takes no arguments. TCPSocket.open takes hostname and port. (and optional isBinary)
   - Binary mode no longer returns integer Arrays -- it returns strings. These strings contain all of the binary data that the arrays used to.

Correct handling of close and onclose
   - When the remote connection closes, you will get an onclose callback
   - When contact with Orbited is interrupted, after a configurable timeout, onclose will be called
   - A call to  TCPSocket.close, will immediately close the remote connection
   - A call to TCPSocket.reset will immediately clean up the browser connection, and attempt to immediately close the connection between the remote server
   (reset should be used in conjunction with ununload)
   
Far more stable browser code:
    - Opera now works cross-subdomain
    - Transport-level auto reconnect with incremental backoff
    - Configurable timeout (increase for use over intermittent networks)
    - Eliminated javascript instability due to page navigations and memory overuse
  
New transports
    Polling and Long Polling added
    These can optionally be used in cases where reverse proxies buffer streaming requests

And more...


-Michael Carter

Roy H. Han

unread,
Aug 15, 2008, 11:06:43 AM8/15/08
to orbite...@googlegroups.com
Awesome news.

yskhoo

unread,
Aug 15, 2008, 8:24:23 PM8/15/08
to Orbited Discussion
Will there be a RoR tutorial to go with the new version of Orbited
anytime soon?

Michael Carter

unread,
Aug 17, 2008, 8:32:34 PM8/17/08
to orbite...@googlegroups.com
We aren't targeting framework integration at the moment, but over the next couple of releases I'm sure we'll have some tutorials again. If you are interested in building an application with RoR and Orbited, and writing a tutorial, feel free to talk with us in #orbited on freenode -- we'll answer whatever questions you have.

-Michael Carter

yskhoo

unread,
Aug 19, 2008, 12:44:43 AM8/19/08
to Orbited Discussion
Oh that would actually be awesome!
How do I find #orbited on freenode?

Rui Lopes

unread,
Aug 19, 2008, 5:30:01 AM8/19/08
to orbite...@googlegroups.com
yskhoo wrote:
> Oh that would actually be awesome!
> How do I find #orbited on freenode?
>
#orbited is our channel name on the freenode IRC network, you can see
how to access it at:

http://freenode.net/using_the_network.shtml

Best regards,
Rui Lopes

Ben Weiner

unread,
Aug 20, 2008, 8:02:39 AM8/20/08
to orbite...@googlegroups.com
Hi there,

Count me in as a big fan of the project, but although Michael says on
the Orbited blog that 0.6.0 is about reliability rather than new
features, it looks as though it has been necessary to change it to the
extent that it breaks the documentation and examples on
http://www.orbited.org/. Right now, as an Orbited user rather than an
Orbited developer, that's making the transition a bit tricky. From what
I can tell:

- I cannot instantiate TCPSocket directly, and I cannot supply
Orbited.TCPSocket with arguments like host and port.
- there's a new syntax for the [access] section of the config file
- when I figure which way's up and which way is down in 0.6, I should be
able to open and close TCP connections at will (which I could not get
right in the 0.5 version I was using). But that's not documented at all,
I think.

Are my allegations correct? I'm happy to be wrong :)

Cheers,
Ben

Ben Weiner

unread,
Aug 20, 2008, 8:16:54 AM8/20/08
to orbite...@googlegroups.com
Hi again,

Ben Weiner wrote:
> features, it looks as though it has been necessary to change it to the
> extent that it breaks the documentation and examples on
> http://www.orbited.org/.

Just to give an example:
http://www.orbited.org/wiki/TCPSocket has a section: "Using TCPSocket in
Orbited 0.5". This is all now incorrect as adding

<script src="http://yourdomain:8000/static/TCPSocket.js"></script>

to a page will result in a 404.

:(

Ben


Rui Lopes

unread,
Aug 20, 2008, 9:33:55 AM8/20/08
to orbite...@googlegroups.com
Hi Ben,

Indeed, the wiki needs to be updated.

As Michael described in the announce email, a few incompatible changes
were introduced:

"""
New API:
- Include /static/Orbited.js which provides Orbited.TCPSocket
- The TCPSocket constructor takes no arguments. TCPSocket.open takes
hostname and port. (and optional isBinary)
- Binary mode no longer returns integer Arrays -- it returns strings.
These strings contain all of the binary data that the arrays used to.
"""

To see how this works, have a look at the bundled demos; eg, see the
telnet demo at:

http://js.io/trac/browser/trunk/protocols/telnet/telnet.js
http://js.io/trac/browser/trunk/demos/telnet/index.html
http://js.io/trac/browser/trunk/demos/telnet/telnet-gui.js

Best regards,
Rui Lopes

Ben Weiner

unread,
Aug 20, 2008, 9:59:17 AM8/20/08
to orbite...@googlegroups.com
Hi Rui,

Rui Lopes wrote:
> As Michael described in the announce email, a few incompatible changes
> were introduced:
>
> """
> New API:
> - Include /static/Orbited.js which provides Orbited.TCPSocket
> - The TCPSocket constructor takes no arguments. TCPSocket.open takes
> hostname and port. (and optional isBinary)
>

OK. Yes. So I can open and close the socket whenever I want.

<snipped>

OK, thank you.

I have to say, I do need my hand holding on configuration as I have not
read the python source code. I have, of necessity, read a lot of the
Orbited.js file...

Thanks,
Ben


Rui Lopes

unread,
Aug 20, 2008, 10:54:14 AM8/20/08
to orbite...@googlegroups.com
Hello Ben,

Ben Weiner wrote:
[...]


>> To see how this works, have a look at the bundled demos; eg, see the
>> telnet demo at:
>>
>> http://js.io/trac/browser/trunk/protocols/telnet/telnet.js
>> http://js.io/trac/browser/trunk/demos/telnet/index.html
>> http://js.io/trac/browser/trunk/demos/telnet/telnet-gui.js
>>
>>
> OK, thank you.
>
> I have to say, I do need my hand holding on configuration as I have not
> read the python source code. I have, of necessity, read a lot of the
> Orbited.js file...
>

The configuration is described at:

http://orbited.org/wiki/Configuration

But there were a few changes with 0.6, one of them was the syntax on the
"[access]" zone; for making the telnet example work, you'll need to
change orbited.cfg by adding "* -> www.google.com:80" into the
"[access]" zone, eg:

[access]
* -> www.google.com:80

This reads as, let any client connect to www.google.com at port 80.

You can see orbited.cfg at:

http://orbited.org/browser/trunk/daemon/orbited.cfg


Best regards,
Rui Lopes

Ben Weiner

unread,
Aug 20, 2008, 11:12:50 AM8/20/08
to orbite...@googlegroups.com
Hi Rui,

Rui Lopes wrote:
> The configuration is described at:
>> http://orbited.org/wiki/Configuration
>>
>> But there were a few changes with 0.6, one of them was the syntax on the
>> "[access]" zone; for making the telnet example work, you'll need to
>> change orbited.cfg by adding "* -> www.google.com:80" into the
>> "[access]" zone, eg:
>>
>> [access]
>> * -> www.google.com:80
>>
>> This reads as, let any client connect to www.google.com at port 80.
>>

Thanks: I'd just about started to approach a similar understanding by
reading the changesets ;-\

So, can I do:

host1:8000 -> google.com:80
host1:8000 -> google.com:81

Or is that illegal?

And (changing the subject ;-) can I do

conn = new Orbited.TCPSocket();

and then
conn.open('host1','8000');

if I want to make straight TCP connections rather than stomp, telnet,
chat, etc? Calling TCPSocket() with arguments, that worked /very/
sweetly in 0.5...

Thanks
Ben

Ben Weiner

unread,
Aug 20, 2008, 11:16:39 AM8/20/08
to orbite...@googlegroups.com
Hi,

I wrote:
> And (changing the subject ;-) can I do
>
> conn = new Orbited.TCPSocket();
>
> and then
> conn.open('host1','8000');
>
>

Woops. Not reading the config there. Rather:

conn.open('google.com','81');


Cheers,
Ben

Rui Lopes

unread,
Aug 20, 2008, 11:32:54 AM8/20/08
to orbite...@googlegroups.com
Ben Weiner wrote:
> Hi Rui,
>
> Rui Lopes wrote:
>
>> The configuration is described at:
>>
>>> http://orbited.org/wiki/Configuration
>>>
>>> But there were a few changes with 0.6, one of them was the syntax on the
>>> "[access]" zone; for making the telnet example work, you'll need to
>>> change orbited.cfg by adding "* -> www.google.com:80" into the
>>> "[access]" zone, eg:
>>>
>>> [access]
>>> * -> www.google.com:80
>>>
>>> This reads as, let any client connect to www.google.com at port 80.
>>>
>>>
> Thanks: I'd just about started to approach a similar understanding by
> reading the changesets ;-\
>
> So, can I do:
>
> host1:8000 -> google.com:80
> host1:8000 -> google.com:81
>
> Or is that illegal?
>
Just use an "*" in the left hand side (LHS) to match any client IP
address, or use a specific IP address. I'm not sure if it lets you
define the port number, but in the normal case, it does not make sense,
because you cannot control which port the browser uses to access orbited.

The right hand side is the destination hostname:port (arguments passed
into the TCPSocket.open function) to which the client is allowed to open
the socket.

> And (changing the subject ;-) can I do
>
> conn = new Orbited.TCPSocket();
>
> and then
> conn.open('host1','8000');
>
> if I want to make straight TCP connections rather than stomp, telnet,
> chat, etc? Calling TCPSocket() with arguments, that worked /very/
> sweetly in 0.5...
>

Use it like (as you can see on telnet.js):

conn = new Orbited.TCPSocket();
// set the callbacks here, eg: conn.onopen = function{ alert("socket is open"); };
conn.open('google.com', 80);

Best regards,
Rui Lopes

Ben Weiner

unread,
Aug 21, 2008, 7:17:19 AM8/21/08
to orbite...@googlegroups.com
Hi,

Rui Lopes wrote:
> Just use an "*" in the left hand side (LHS) to match any client IP
> address, or use a specific IP address. I'm not sure if it lets you
> define the port number, but in the normal case, it does not make sense,
> because you cannot control which port the browser uses to access orbited.
>

Well you can specify it, but whether you *want* to ... ;-)

I found that in Orbited 0.5 I was able to specify the port number when
calling the TCPSocket.js script from /static, but with 0.6 the call that
the script makes to /tcp (gets a session ID?) did not have the port
number included. That caused me some considerable confusion but in the
end I mod-rewrite proxied the Orbited server, which is running alongside
Apache. Sledgehammer? It seemed to do the trick.


> The right hand side is the destination hostname:port (arguments passed
> into the TCPSocket.open function) to which the client is allowed to open
> the socket.
>

Excellent.


>>
>>
> Use it like (as you can see on telnet.js):
>
> conn = new Orbited.TCPSocket();
> // set the callbacks here, eg: conn.onopen = function{ alert("socket is open"); };
> conn.open('google.com', 80);
>

Ace.

Remaining problems must be of my own creation ;-)

Thanks,
Ben

Michael Carter

unread,
Aug 21, 2008, 3:23:42 PM8/21/08
to orbite...@googlegroups.com
On Thu, Aug 21, 2008 at 4:17 AM, Ben Weiner <b...@readingtype.org.uk> wrote:

Hi,

Rui Lopes wrote:
> Just use an "*" in the left hand side (LHS) to match any client IP
> address, or use a specific IP address.  I'm not sure if it lets you
> define the port number, but in the normal case, it does not make sense,
> because you cannot control which port the browser uses to access orbited.
>
Well you can specify it, but whether you *want* to ... ;-)

I found that in Orbited 0.5 I was able to specify the port number when
calling the TCPSocket.js script from /static, but with 0.6 the call that
the script makes to /tcp (gets a session ID?) did not have the port
number included. That caused me some considerable confusion but in the
end I mod-rewrite proxied the Orbited server, which is running alongside
Apache. Sledgehammer? It seemed to do the trick.

You can control which port the browser uses to access Orbited.

Orbited.settings.port = 8001;

While the proxying may work, its not going to be your most scalable bet.

-Michael Carter

Rui Lopes

unread,
Aug 22, 2008, 5:30:28 AM8/22/08
to orbite...@googlegroups.com
Hi,

Is that setting is for defining the destination port where orbited
listens, that is, the port where orbited is listening?

What is its relation to the port we define in left hand side on the
"[access]" configuration?

Eg: what is the meaning of the following configuration?

[access]
*:12345 -> localhost:7


As a note, in my original answer, I was talking about the source port
the browser uses to connect to orbited, not the port where orbited is
listening.

Best regards,
Rui Lopes

Ben Weiner

unread,
Aug 26, 2008, 6:45:17 AM8/26/08
to orbite...@googlegroups.com
Hi there,


Rui Lopes wrote:
> Michael Carter wrote:
>
<snipped>


>> You can control which port the browser uses to access Orbited.
>>
>> Orbited.settings.port = 8001;
>>
>> While the proxying may work, its not going to be your most scalable bet.
>>

That's interesting to hear. I remember years ago having problems with
users who were behind firewalls that prevented http over anything other
than ports 80 and 443 and I have never since dared to rely on access to
other ports. Isn't that likely to be a problem here too?


> Is that setting is for defining the destination port where orbited
> listens, that is, the port where orbited is listening?
>
> What is its relation to the port we define in left hand side on the
> "[access]" configuration?
>
> Eg: what is the meaning of the following configuration?
>
> [access]
> *:12345 -> localhost:7
>
>
> As a note, in my original answer, I was talking about the source port
> the browser uses to connect to orbited, not the port where orbited is
> listening.
>

So to summarise the conversation, it looks to me like port configuration
is like this:

- Browser outgoing: undefined (and cannot be defined)
- Orbited incoming (the connection over http):
- defined for the browser with Orbited.settings.port and
- for the Orbited server on the left-hand side of an access directive.
- Orbited outgoing (the connection to the persistent network service,
eg TCP): defined on the right-hand side of an access directive.

Therefore you need to set ports in:
Orbited.js
orbited.cfg

Have I got this right?

Thanks,
Ben

Michael Carter

unread,
Aug 26, 2008, 4:59:26 PM8/26/08
to orbite...@googlegroups.com
On Tue, Aug 26, 2008 at 3:45 AM, Ben Weiner <b...@readingtype.org.uk> wrote:

Hi there,


Rui Lopes wrote:
> Michael Carter wrote:
>
<snipped>
>> You can control which port the browser uses to access Orbited.
>>
>> Orbited.settings.port = 8001;
>>
>> While the proxying may work, its not going to be your most scalable bet.
>>

That's interesting to hear. I remember years ago having problems with
users who were behind firewalls that prevented http over anything other
than ports 80 and 443 and I have never since dared to rely on access to
other ports. Isn't that likely to be a problem here too?

You can have orbited listening on any port to http or https by using the [listen] section

[listen]
http://:80
https://:443


> Is that setting is for defining the destination port where orbited
> listens, that is, the port where orbited is listening?
>
> What is its relation to the port we define in left hand side on the
> "[access]" configuration?
>
> Eg: what is the meaning of the following configuration?
>
> [access]
> *:12345 -> localhost:7
>
>
> As a note, in my original answer, I was talking about the source port
> the browser uses to connect to orbited, not the port where orbited is
> listening.
>
So to summarise the conversation, it looks to me like port configuration
is like this:

-  Browser outgoing: undefined (and cannot be defined)
-  Orbited incoming (the connection over http):
  -  defined for the browser with Orbited.settings.port and
  -  for the Orbited server on the left-hand side of an access directive.
-  Orbited outgoing (the connection to the persistent network service,
eg TCP): defined on the right-hand side of an access directive.

The left hand side of the access rule is what you expect to see  in the host header. If people are navigating to yoursite.com:8000, then thats what will be in the Host header. If it gets some other host header, it will not accept the communication (if, for instance, someone points their domain name at your server (as per the princeton attack)). As mentioned above, the listen section is used for specifying the port that orbited listens on.


Therefore you need to set ports in:
Orbited.js
orbited.cfg

You don't actually modify Orbited.js. You do something like this:
<script  src="orbited.domain.com/static/Orbited.js"></script>
<script>
  Orbited.settings.port = 80
  Orbited.settings.hostname = 'orbited.domain.com'
</script>


-Michael Carter

Reply all
Reply to author
Forward
0 new messages