Re: ServerSocket from within Tapestry

2019-04-06 Thread Christopher Dodunski
Thanks Lance, those two libraries look very interesting! For now I've successfully implemented Tyrus 'stand-alone' (Grizzly) on my desktop clent application, and this connects to my Tapestry app via Tomcat. However, in the future I would also like to PUSH server-side state changes out to a dashbo

Re: ServerSocket from within Tapestry

2019-03-24 Thread Lance Java
You might be interested in tapestry-atmosphere and tapestry-cometd. Each project is a tapestry wrapper for an underlying websocket implementation. The aim of each library is to integrate websocket / push functionality into your tapestry app without requiring any javascript. Instead you can use anno

Re: ServerSocket from within Tapestry

2019-03-20 Thread Christopher Dodunski
A simple solution in the end, a retweaking of the 'IgnoredPathsFilter'... public static void contributeIgnoredPathsFilter(Configuration configuration) { configuration.add("/websocket/.*"); } - To unsubscribe, e-m

Re: ServerSocket from within Tapestry

2019-03-14 Thread Christopher Dodunski
Hi team, Just wondering whether anyone has successfully implemented a serverside WebSocket endpoint as a Tapestry service? The beauty of implementing it as a Tapestry service is that I could then easily PUSH messages out from other parts of the program, via the injected service. The client is no

Re: ServerSocket from within Tapestry

2018-06-13 Thread Christopher Dodunski
Hi Eugen, Thank you for explaining so well. I had been considering running a standalone WebSocket server to avoid being tied to Tomcat in particular, but, after further thought, think I'll take your advice and keep it simple. :-) Here is a recording of the client app running in demo mode: www.h

Re: ServerSocket from within Tapestry

2018-06-12 Thread Eugen
Hi Christopher, By decorating a Tapestry Service by @ServerEndPoint You can use all Tapestry benefits like Injection etc. You don't need to start any additional servers.. the application is already deployed on Tomcat and Tomcat will serve classes decorated by @ServerEndPoint. Important is to exclud

Re: ServerSocket from within Tapestry

2018-06-11 Thread Christopher Dodunski
I like the look of the WebSocket library below: https://github.com/TooTallNate/Java-WebSocket It is 100% Java, and includes example code for both server and client. Also, it supports multi-threading 'out of the box'. If I were to use this library's server code, placed in the Tapestry 'services'

Re: ServerSocket from within Tapestry

2018-06-08 Thread Christopher Dodunski
Hi Carlos, Thanks for detailing how you implemented a WebSocket using an external HttpServlet. I'm sure it works well for you. However, since it seems possible to implement a WebSocket right inside a Tapestry app, I will attempt to do it this way first. It keeps everything self-contained and ti

Re: ServerSocket from within Tapestry

2018-06-07 Thread Christopher Dodunski
Hi Eugen, I like the look of the WebSocket library you shared: https://github.com/TooTallNate/Java-WebSocket. It is 100% Java, and includes example code for both server and client. Also it supports multi-threading 'out of the box'. So, if inside my Tapestry project's 'services' directory I crea

Re: ServerSocket from within Tapestry

2018-06-07 Thread Carlos Montero Canabal
Hi! I have to develop a chat on a Tapestry5 app and I have to include WebSockets. To do it i put the config below: I create a ChatServlet class outside Tapestry5 packages my.package. chat -> ChatServlet web. pages

Re: ServerSocket from within Tapestry

2018-06-07 Thread Eugen
Hi Christopher, In my case the annotation @ServerEndpoint decorates an Service implementation class. I don't invoke any threads in WS Methods, but, i think You can use the Tapestry's ParralelExecutor Service to optimize the processing of client requests (see https://tapestry.apache.org/parallel-ex

Re: ServerSocket from within Tapestry

2018-06-06 Thread Christopher Dodunski
Thanks Eugen, and where did you place the server-side class decorated with @ServerEndpoint("/ws")? Perhaps it doesn't matter whether it is placed in 'pages' or 'services', as Tomcat finds it regardless. Is it necessary to invoke new threads (multi-threading) within each of the methods decorated w

Re: ServerSocket from within Tapestry

2018-06-06 Thread Eugen
Hi Christopher, to do somewhat similar I`m using Tomcat WebSockets (the Software are deployed allways on Tomcat Server). The Desktop application communicates over Java WS Client, WebPages over JavaScript implementation. Transmitted Data is serialized into JSON Strings. On Server-Side the @ServerEnd

ServerSocket from within Tapestry

2018-06-06 Thread Christopher Dodunski
Hi team, I'm in the final stages of developing a Tapestry webapp for a multi-contractor worksite. Most user interactions will be via webpage forms, with state displayed on a dashboard page, involving mostly text (though done attractively). To support this application I've also developed a small