Re: [Twisted-Python] AMP WebSockets bridging

2012-06-16 Thread Tobias Oberstein
> Do you happen to know what the figures are like for iOS? I know mobile Safari 
> only got web sockets in 4.something (1 or 2), I'm not sure what version of 
> the protocol it speaks either, and obviously flash isn't an option...

4.2.1 .. which includes very old devices like iPod Touch 2nd gen.

All those speak Hixie-76 .. I don't know yet about iOS6 (do you have a device? 
would set up a test ..)

FWIW, Windows Phone 8 will come with IE10, and hence first class RFC6455. I 
don't know if MS ports that down to WP <8.

You can find more details rgd. WebSocket browser support here 
http://autobahn.ws/browsers

Disclosure: I am affiliated with above (but the information given there applies 
in general) .. and said that, let me at least mention 2 other probably 
controversial points;)

Protocol. I understand you are into AMP. IMHO there will be at least 2 others 
in that fields of higher level messaging across WebSocket:

STOMP over WebSocket
http://www.jmesnil.net/stomp-websocket/doc/

WebSocket Application Messaging Protocol (WAMP)
http://wamp.ws/

Twisted WebSocket. There is also https://github.com/tavendo/AutobahnPython .. 
OSS project I run. This does Hixie-76 and WAMP.

Cheers,
Tobias

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] AMP WebSockets bridging

2012-06-16 Thread Laurens Van Houtven
On Friday, June 15, 2012, Glyph wrote:

>
> On Jun 15, 2012, at 10:13 AM, Laurens Van Houtven wrote:
>
> > Hi,
> >
> > I'm trying to get browsers to communicate with an AMP API.
>
> This is also what  is doing.  I hope that it
> becomes a common enough practice that there's a library for it :).


See Allen's comment. It'd certainly be great. Do you think that for old
browsers (that is ie6 & 7) it's acceptable to tell them to go install
chrome frame? ( for Franck and hence twisteds future bug tracker). If the
answer is yes, is that because it will take a while to switch, or would
that also be true today?

Bear in mind that my users are a lot less technical and many are stuck on
winxp because they're corporate machines...


> > The issue is that while AMP is inherently a binary protocol, WebSockets
> transfer text (well, that's a lie: there's a binary version, but it's even
> less widely supported than WebSockets themselves -- and SockJS doesn't
> support it at all, although it's on the roadmap). So, I need an
> alternative, preferably 7-bit, serialization for AMP boxes.
>
> Did you immediately discard the obvious solution of "base64 everything"? :)


Base64 does not fix the problem of encoding and decoding binary responses
on the client side, only on the transport. Binary support (Blob and
ArrayBuffer are those 2 essentially unsupported things. It may be feasible
to build a Unicode amp representation, however meaningless some code points
may then become (that's not a tab stop, it's a length specifier!!)


>
> > An issue I'm running into is an AMP ListOf. With the above code, ListOf
> still gets translated to a string, and obviously I want it to be a list.
> When that ListOf has actual data in it, I get the binary representation.
>
> I would recommend implementing an entirely alternate serialization code
> path; specifically, one which adapts the existing AMP Argument objects to
> some new interface ('.toJSON()'), with a default adapter that uses the
> existing toString()/fromString(), and then specific adapters for those
> interfaces which need modification, like ListOf and Boolean.


I'm not sure I understand at which point that takes effect since apparently
AMP.sendBox is too late?


>
> -glyph
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com 
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>


-- 
cheers
lvh
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] AMP WebSockets bridging

2012-06-16 Thread Laurens Van Houtven
On Saturday, June 16, 2012, Tobias Oberstein wrote:

> > Do you happen to know what the figures are like for iOS? I know mobile
> Safari only got web sockets in 4.something (1 or 2), I'm not sure what
> version of the protocol it speaks either, and obviously flash isn't an
> option...
>
> 4.2.1 .. which includes very old devices like iPod Touch 2nd gen.


... But only when fully updated, right? (I realize the update penetration
on iOS is quite high)


>
> All those speak Hixie-76 .. I don't know yet about iOS6 (do you have a
> device? would set up a test ..)


Typing this on an ipad3, but so far it's the usual iOS 5.something


> FWIW, Windows Phone 8 will come with IE10, and hence first class RFC6455.
> I don't know if MS ports that down to WP <8.


So what's the story on wp7? Does that thing have flash?


>
> You can find more details rgd. WebSocket browser support here
> http://autobahn.ws/browsers
>
>
Thanks, I'll take a look :)


> Disclosure: I am affiliated with above (but the information given there
> applies in general) .. and said that, let me at least mention 2 other
> probably controversial points;)
>
> Protocol. I understand you are into AMP. IMHO there will be at least 2
> others in that fields of higher level messaging across WebSocket:
>
> STOMP over WebSocket
> http://www.jmesnil.net/stomp-
> websocket/doc/ 


Used stomp a while ago when I was being subjected to message queues. I
guess it mig be interesting :)


> WebSocket Application Messaging Protocol (WAMP)
> http://wamp.ws/


I knew this was a raven do thing -- how's adoption going?

Also I'm surprised that jsonrpc didn't make this list! Seems like a perfect
candidate for browsers.


>
> Twisted WebSocket. There is also https://github.com/tavendo/AutobahnPython.. 
> OSS project I run. This does Hixie-76 and WAMP.
>
> Cheers,
> Tobias
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com 
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>


-- 
cheers
lvh
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] AMP WebSockets bridging

2012-06-16 Thread Tom Sheffler
>
> On Jun 15, 2012, at 10:13 AM, Laurens Van Houtven wrote:
>
> > Hi,
> >
> > I'm trying to get browsers to communicate with an AMP API.
>
> This is also what  is doing.  I hope that it
> becomes a common enough practice that there's a library for it :).
>
> > The issue is that while AMP is inherently a binary protocol, WebSockets
> transfer text (well, that's a lie: there's a binary version, but it's even
> less widely supported than WebSockets themselves -- and SockJS doesn't
> support it at all, although it's on the roadmap). So, I need an
> alternative, preferably 7-bit, serialization for AMP boxes.
>
> Did you immediately discard the obvious solution of "base64 everything"? :)


I had success simply base64'ing binary data.  And I believe encoding that
is safe for binary data, but I may be wrong.

Use this:
data = binascii.b2a_base64(bindata).strip()
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] AMP WebSockets bridging

2012-06-16 Thread Tobias Oberstein
> Do you happen to know what the figures are like for iOS? I know mobile Safari 
> only got web sockets in 4.something (1 or 2), I'm not sure what version of 
> the protocol it speaks either, and obviously flash isn't an option...

4.2.1 .. which includes very old devices like iPod Touch 2nd gen.

... But only when fully updated, right? (I realize the update penetration on 
iOS is quite high)

=> right.
 
FWIW, Windows Phone 8 will come with IE10, and hence first class RFC6455. I 
don't know if MS ports that down to WP <8.

So what's the story on wp7? Does that thing have flash?

=> the story is: WP is irrelevant given it's market share;)
no, seriously, AFAIK WP7 does not have Flash and there is no WebSocket 
possible, since it doesn't allow to install i.e. Opera Mobile either. 

WebSocket Application Messaging Protocol (WAMP)
http://wamp.ws/

I knew this was a raven do thing -- how's adoption going?

https://github.com/nicokaiser/wamp.io
https://github.com/cboden/Ratchet

others are starting

http://stackoverflow.com/questions/10882370/websocket-request-response-subprotocol
another one is working on WAMP over SockJS

we maintain a list on
http://wamp.ws/implementations


Also I'm surprised that jsonrpc didn't make this list! Seems like a perfect 
candidate for browsers.
 
jsonrpc:
* verbose (they have read too much xml)
* not fully Web .. methods aren't identified by URIs
* does not have PubSub, but only RPC


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] Solaris 11 Build Slave

2012-06-16 Thread Justin Venus
I am in the process of setting up a build Solaris 11 build slave for
twisted (currently at the bzr checkout phase).  I am interested in
having it join the other build slaves.  My long term goal for adding
this build slave is to help resolve a low priority ticket[1] that I am
interested in seeing completed.

Thank you,

-- 
Justin Venus
justin.ve...@gmail.com

1) http://twistedmatrix.com/trac/ticket/5538

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] AMP WebSockets bridging

2012-06-16 Thread Glyph

On Jun 16, 2012, at 6:45 AM, Laurens Van Houtven wrote:

> Do you think that for old browsers (that is ie6 & 7) it's acceptable to tell 
> them to go install chrome frame? ( for Franck and hence twisteds future bug 
> tracker). If the answer is yes, is that because it will take a while to 
> switch, or would that also be true today?

I think it's acceptable for *Twisted*'s bug tracker to just tell them to 
install a different browser, because who cares? ;-)

See here: http://www.sitemeter.com/?a=stats&s=sm7twistedmatrix&r=13

Only 5% of our traffic comes from IE, only 1% comes from IE7 and we don't get 
any from IE6.

Obviously these metrics don't apply to a general solution, of course.

> I'm not sure I understand at which point that takes effect since apparently 
> AMP.sendBox is too late?


I *think* the right place to hook in would be IResponderLocator.

If you write your own locateResponder, you can do your own serialization, 
except in your case a "string" (for the purposes of toString/fromString) is 
just a JSON data structure, and an "object" is the corresponding Python data 
structure which is almost always the same.  This is a slight abuse of the API, 
but it will allow for maximal re-use of all the dispatching logic.  You will 
probably need to touch a private attribute or two, most noticeably 
_commandDispatch; you need to stuff your own wrapper around commandClass (that 
proxies 'arguments' and 'response' attributes to wrap them in something that 
does the requisite adaptation to change the meaning of fromString/toString) in 
locateResponder, you don't want to override all the behavior.

Then you override sendBox to just do plain old JSON serialization and you're 
done.

Please feel free to file bugs on any private parts of the API that you need to 
touch in order to make an alternate serialization.  The inability to 
programmatically discover which methods are responders and what commands they 
are responders for using a public API strikes me as a glaring oversight.

-glyph

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] Weekly Bug Summary

2012-06-16 Thread exarkun



Bug summary
__
Summary for 2012-06-10 through 2012-06-17
  Opened Closed  Total Change
Enhancements:  2  0855 +2
Defects:   2  2561 +0
Tasks: 1  1 70 +0
Regressions:   0  0  2 +0
Total: 5  3   1488 +2

|== Type Changes   |== Priority Changes   |== Component Changes 
|Defect:   +0  |Normal:  +2   |Core:+1  
|Enhancement:  +2  |Low: +0   |Release Management:  +1  
|Task: +0   



Total Tickets
Open Tickets



New / Reopened Bugs
__
= Normal =
[#5706] Update http://wiki.python.org/moin/TwistedMatrix in ReleaseProcess (opened by techtonik)
enhancement release management http://twistedmatrix.com/trac/ticket/5706

[#5708] PollReactor.running returns True and reactor.stop() raises ReactorNotRunning (opened by adiroiban) (CLOSED, invalid)
defect  core   http://twistedmatrix.com/trac/ticket/5708

[#5709] ISSLTransport.providedBy(self.transport) returns False for a SSL transport (opened by adiroiban)
defect  core   http://twistedmatrix.com/trac/ticket/5709

[#5710] Use posix_spawn to spawn processes for more fasterness, especially on large processes (opened by glyph)
enhancement core   http://twistedmatrix.com/trac/ticket/5710

= Low =
[#5707] Remove uses of apply() where covered by tests (opened by vperic) (CLOSED, fixed)
taskcore   http://twistedmatrix.com/trac/ticket/5707



Closed Bugs
__
= Normal =
[#5701] twisted.internet.test.test_unix in Twisted 12.1.0: Multiple failures and errors (opened by Arfrever, closed by therve, invalid)
defect  core   http://twistedmatrix.com/trac/ticket/5701

[#5708] PollReactor.running returns True and reactor.stop() raises ReactorNotRunning (opened by adiroiban, closed by adiroiban, invalid)
defect  core   http://twistedmatrix.com/trac/ticket/5708

= Low =
[#5707] Remove uses of apply() where covered by tests (opened by vperic, closed by vperic, fixed)
taskcore   http://twistedmatrix.com/trac/ticket/5707



Ticket Lifetime Stats
__
Oldest open ticket - [#50] conch command-line client doesn't work in win32 (since 2003-07-12 16:41:06).
Newest open ticket - [#5710] Use posix_spawn to spawn processes for more fasterness, especially on large processes (since 2012-06-14 02:39:56).

Mean open ticket age: 1164 days, 21:55:19.648181.
Median: 1030 days, 14:28:32.382725.
Standard deviation: 848 days, 4:47:23.852380.
Interquartile range: 1403 days, 7:29:19.

Mean time between ticket creation and ticket resolution: 707 days, 5:09:35.018388.
Median: 145 days, 3:52:12.
Standard deviation is 932 days, 18:33:08.189720.
The interquartile range is 1277 days, 17:53:02.

Mean time spent in review: 89 days, 4:33:33.069758.
Median: 4 days, 9:08:37.
Standard deviation: 376 days, 20:36:33.599047.
Interquartile range: 15 days, 23:01:59.

Mean number of times a ticket is reviewed: 1.95650095602.
Median: 1
Standard deviation: 1.56182983135.
Interquartile range: 1.


Contributor Stats
__
In the last 4 weeks,
13 unique ticket reporters
7 unique ticket reviewers
7 unique ticket resolvers
In the last 24 weeks,
78 unique ticket reporters
29 unique ticket reviewers
20 unique ticket resolvers
In the last 48 weeks,
124 unique ticket reporters
36 unique ticket reviewers
25 unique ticket resolvers





___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python