Re: getting frustrated with web sockets

2012-06-07 Thread Pid
On 06/06/2012 15:54, Ravi wrote: > > Mark / Chris, > > Essentially, if I want to use websockets, you are asking me to rewrite > my app + rewrite grails + rewrite hibernate + rewrite apache http > utilities + rewrite several other web libraries I use. I don't they're asking you to do that at all.

Re: getting frustrated with web sockets

2012-06-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 6/6/12 2:42 PM, Mark Thomas wrote: > I'd rather not pass in the session object since it just encourages > folks to retain a copy of it and I am not at all convinced that is > a good idea for WebSockets. > > I have no objection to making ses

Re: getting frustrated with web sockets

2012-06-06 Thread smilli...@c2b2.co.uk
Thinking off the top of my head. How about passing in an unmodifiable map of the session attributes to give some context to the creation of the MessageInbound class? Hmm however then some bright spark will probably want the URL and the request parameters, then the cookies etc. of the initiating HT

Re: getting frustrated with web sockets

2012-06-06 Thread Mark Thomas
On 06/06/2012 17:40, Steve Millidge wrote: > Mark, > > > > I think it would be useful to get access to the session at least when you > are bootstrapping the web socket and creating the MessageInBound subclass > instance. It is very likely that a user will have accessed a web application > and l

Re: getting frustrated with web sockets

2012-06-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 6/6/12 11:09 AM, David kerber wrote: > On 6/6/2012 10:54 AM, Ravi wrote: >> >> Mark / Chris, >> >> Essentially, if I want to use websockets, you are asking me to >> rewrite my app + rewrite grails + rewrite hibernate + rewrite >> apache ht

Re: getting frustrated with web sockets

2012-06-06 Thread Steve Millidge
Mark, I think it would be useful to get access to the session at least when you are bootstrapping the web socket and creating the MessageInBound subclass instance. It is very likely that a user will have accessed a web application and logged in etc. prior to bootstrapping the websocket connecti

Re: getting frustrated with web sockets

2012-06-06 Thread David kerber
On 6/6/2012 10:54 AM, Ravi wrote: Mark / Chris, Essentially, if I want to use websockets, you are asking me to rewrite my app + rewrite grails + rewrite hibernate + rewrite apache http utilities + rewrite several other web libraries I use. I do not think this is a reasonable option. Or rewri

Re: getting frustrated with web sockets

2012-06-06 Thread Ravi
Mark / Chris, Essentially, if I want to use websockets, you are asking me to rewrite my app + rewrite grails + rewrite hibernate + rewrite apache http utilities + rewrite several other web libraries I use. I do not think this is a reasonable option. On 6/5/2012 9:04 PM, Christopher Schult

Re: getting frustrated with web sockets

2012-06-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 6/5/12 5:42 PM, Mark Thomas wrote: > WebSocket != HTTP and you simply can't replace one with the other. +1 You can't just shout "websocket" and make a webapp work better with no other changes. It's not just like adding transport encryption

Re: getting frustrated with web sockets

2012-06-05 Thread Mark Thomas
On 05/06/2012 22:16, Ravi wrote: > > Mark you are absolutely right if you only talk about future applications > with latest technologies and only specific use cases like chat > applications. > > However there are billions of people whose browsers/phones will not be > upgraded for years. Also a lo

Re: getting frustrated with web sockets

2012-06-05 Thread Ravi
Mark you are absolutely right if you only talk about future applications with latest technologies and only specific use cases like chat applications. However there are billions of people whose browsers/phones will not be upgraded for years. Also a lot of existing applications and existing web

Re: getting frustrated with web sockets

2012-06-05 Thread Mark Thomas
On 05/06/2012 21:28, Ravi wrote: > > > Thanks for the details Chris. Unfortunately I am building a web app and > all my frameworks/utilities/existing code is around requests/sessions. > > It would have been a blessing if I could simply change transport layer > from http to websockets and have th

Re: getting frustrated with web sockets

2012-06-05 Thread Ravi
Thanks for the details Chris. Unfortunately I am building a web app and all my frameworks/utilities/existing code is around requests/sessions. It would have been a blessing if I could simply change transport layer from http to websockets and have the app work much better. But that does not

Re: getting frustrated with web sockets

2012-06-05 Thread Christian Finckler
Hello Ravi, I do not use Requests or sessions. Since I have the Message-Inbound object I can directly store in it for example with private fields any session attributes I want. I do it this way, that the message Inbound implements my GameSessionParticipant-interface which has access to a gameSes

Re: getting frustrated with web sockets

2012-06-05 Thread Ravi
Because 1. This article says tomcat websockets were implemented as servlets so that users have access to request and session parameters. So I am trying to find out what the mechanism is. If it is not possible, maybe the author of that article is confused. http://www.tomcatexpert.com/blog/20

Re: getting frustrated with web sockets

2012-06-05 Thread Mark Thomas
On 05/06/2012 20:18, Ravi wrote: > > Thanks a lot Chris. It took a lot of work for me to get websockets to > work. I wonder if you can help me little further. Here is my issue: > > 1. I need to get access to request and session. However when I get a > message in MyMessageInboundImpl class, I do n

Re: getting frustrated with web sockets

2012-06-05 Thread Ravi
Thanks a lot Chris. It took a lot of work for me to get websockets to work. I wonder if you can help me little further. Here is my issue: 1. I need to get access to request and session. However when I get a message in MyMessageInboundImpl class, I do not have access to either of them. 2. I

Re: getting frustrated with web sockets

2012-06-03 Thread Mark Thomas
On 02/06/2012 08:32, Christian Finckler wrote: > Hello, > I had the same problem some time ago. > I could get jwesocket to work either. > But I then used autobahn: > http://autobahn.ws/developers/autobahnandroid/installation The Tomcat WebSocket implementation is tested against Autobahn (and every

Re: getting frustrated with web sockets

2012-06-03 Thread Pid
On 02/06/2012 03:38, Ravi wrote: > > I am trying to build an android app that connects to tomcat web sockets. > > I need a few java classes that can interact with tomcat websockets. I > have tried 3 different implementations > (strumsoft, jwebsockets and something else also) but neither one can >

Re: getting frustrated with web sockets

2012-06-02 Thread Christian Finckler
Hello, I had the same problem some time ago. I could get jwesocket to work either. But I then used autobahn: http://autobahn.ws/developers/autobahnandroid/installation That worked great for me. I couldn't find out if the different client libraries do something wrong or tomcat but I was a bit d

getting frustrated with web sockets

2012-06-01 Thread Ravi
I am trying to build an android app that connects to tomcat web sockets. I need a few java classes that can interact with tomcat websockets. I have tried 3 different implementations (strumsoft, jwebsockets and something else also) but neither one can talk to tomcat correctly. The issue seems