Is there a framework can realize Bayeux and hang in rensin? - comet

Look like ComeD can only extend jetty, is there a framework can realize Bayeux and hang in rensin, or other based on the long polling framework?

The CometD project is fully portable and works in any Servlet 3.0 compliant servlet container, so it should work in Resin too, see http://docs.cometd.org/reference/#java.
What you cannot get in Resin (I guess you meant Resin when you wrote "rensin") is WebSocket support because that is the only part of CometD that is Jetty-specific.
CometD is waiting for JSR 356 to standardize the WebSocket API in order to write the WebSocket support that will work in any compliant servlet container; this work has already been started in Jetty 9 and CometD 3.

Related

Delphi - Websockets and uniGUI

I am really a beginner in delphi, as the client request the project to be done in delphi, so I have to ask to get some help as possible as I can. This project will be involved in HTML5 and websockets as well, so there are some questions I need your advices.
Sorry let me explain more, this application have two parts mainly, one is HTML5 client web app (this app will be loaded from web server, and run locally in browser), and the other is its service located in server. The HTML5 web app is doing some product editing job, as well send its final output to server, during this process, there will be many communications between client app and service, and I planed to use Websockets.
I did plan this application in HTML5 and Node.js before, but as client send request to ask for the Delphi XE as primary development tool also it will be compiled to DLL (ISAPI, have to be) at last. For consistency of UI, I also was required to use uniGUI (http://www.unigui.com/demo)for Delphi. Now I have these questions:
Is there any other way to do this application with HTML5 as web front exclude uniGUI in Delphi?
What good libraries support Websockets in Delphi?
What book you can recommend me to read, as I don't know Delphi at all.
Thanks.
1: yes, make a "single page app" (static html + js) and communicate with server using xml or json.
At least with indy 10 it is quite straight forward to implement static file serving (response.contentstream := tfilestream.create(sfilename) or something like that)
2: yes, if you search for it on google you will find some :)
WebSocket server implementations for Delphi
btw, I'm busy with delphi socket.io implementation, which makes it easier to use websockets instead of plain low level tcp-like websockets itself
Is there any other way to do this application with HTML5 as web front exclude uniGUI in Delphi?
First concept : HTML5 applications are a bunch of HTML files and JS's wich can be processed by browsers.
Second concept : You need an application that can bind HTTP queries and return files from the first concept.
Third concept (paradigm) : With first two concepts, a third concept arises. Dynamic HTML. What is dynamic HTML? HTML that generates at runtime at the backend server and/or at frontend with JS.
Solution :
Yes, with Delphi as a backend server you can manipulate and return HTML5 views, if you know (MVC paradigmn for example) you can program an HTTPServer application that binds HTTP request from network and responses your HTMLs and JS.
What good libraries support Websockets in Delphi?
You need a multilayer library. The best library I know is mORMot. mORMot is like a swiss razor for Object Pascal.
You can create an HTTP server with websocket published interfaces. mORMot's Site
What book you can recommend me to read, as I don't know Delphi at all.
I have more than 10 years with Delphi and Free Pascal and I didn't read a book at all. But I read a lot from internet and a lot of computer architecture and another languages like C and C++.
If you like Delphi there are tons of documentation via Internet. I cannot recomend you a book because I will lie you.

HTML 5 Websocket using Apache Tomcat 7

I just dived into Websocket interface. I ran my first sample websocket code in Tomcat 7, it works great.
Is there any other servers to supports websocket with java programmming?
Any other features with HTML 5 & Tomcat 7 otherthan websocket?
Jetty (wiki) and Netty (examples from netty homepage) support WebSockets
Did you try Atmosphere?
https://github.com/Atmosphere/atmosphere
Quote from their github page
The Atmosphere Framework contains client and server side components for building Asynchronous Web Application. The majority of popular frameworks are either supporting Atmosphere or supported natively by the framework. The Atmosphere Framework supports all majors Browsers and Servers...
Here is a nice tutorial/sample app using Jersey/Jetty as server and Jquery on client-side
http://www.ncolomer.net/2012/03/cometwebsocket-introducing-the-atmosphere-framework/
I am try this out right now. Pretty impressive! (Jetty is good enough for me and I haven't tried out other servers with atmosphere; if you want a sample project to bootstrap yours, you can probably start from here)
Play framework(1.2.5 to latest) also support websocket. play-1.2.5 Websocket Link

socket.io and .Net socket server

Excuse me if the question sounds silly but I have to ask. Is there a server side alternative to Node.js written in C#? I need a client framework to fully utilize Web Sockets but AFAIK IE doesn't support Web Sockets and nor will it support in it's next version. socket.io uses Web Sockets if available and falls back to BOSH if not. So I will try to connect to a socket server that is running on .Net Framework.
What are my alternatives?
Excuse me for raising this thread from the dead - my friend and I just posted a server-side websocket server for C#: https://github.com/Olivine-Labs/Alchemy-Websockets
It's fast, it's scalable, and doesn't do everything socket.io does, on purpose: it provides websockets and a flash fallback, which keeps it very lean and efficient. I see you've already done your own stuff, but check it out; and hopefully it'll help others on SO.
Might be an answer to an old question, but I'll write here in case other finds this question using a search engine. Have a look at SignalR (http://signalr.net/) for that abstraction. For a nice post on what SignalR is please read Scott Hanselman's post http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx.

Web Application Framework - HTML5 with mobile devices JavaScript support

I searched for Java based web application frameworks the last few days. I have to build a Java EE backend and a HTML5/CSS3/JavaScript frontend which can be accessed with multi-touch capable devices. So I will need modern JavaScript frameworks like Sencha Touch.
My backend should be built upon with Java EE, Hibernate and MySQL. I have two kinds of data transfer: AJAX / JSON so the page does not need to be reloaded and pages and normal pages which reload the page by sending a form with POST (or do you think to have more the feeling as a application I should do all stuff with AJAX/JSON?).
I found several web application frameworks:
JavaSever Faces
Apache Wicket
Spring MVC
handle it only with jar files for JSON (and REST)
Google Web Toolkit
What do you think will fit best? Perhaps you can exclude one of them, that would also be great, so I can take a closer look at the remaining technologies.
Best Regards, Tim.
Interesting question.
Concerning exclusion: If you use a JS framework like Sencha Touch in the frontend I don't see the sense in using something like GWT which is for frontend-code generation.
I would probably stick with a more lightweight framework like http://www.playframework.org/.
You get your data from the backend and then hand it via JSON over to your frontend code i.e. sencha, sproutcore, cappuccino, gwt or what you choose to use.
Let me know what you choose :-)

what is Orbited?

from my understanding obited can do both comet and xmpp ? it is better than using typical comet library dwr right?
Orbited is a library to create 'realtime' applications that run in a web browser (it implements a technique known as Comet). More specifically is provides code and strategies to implement many protocols (xmpp, irc, stomp, amqp, etc) on top of what is known as a "web socket" - an object that abstracts away the many peculiarities of actually implementing Comet. Furthermore, Orbited describes, and in some cases provides, the back-end components (asynchronous webservers) that need to know and work with the front-end Comet clients.
Here is a little more detail on Comet and how Orbited plays in:
What makes Comet more complex to
implement (than making an Ajax app,
say), is that you need both the client
(a Comet javascript client) and the
server (an asynchronous webserver like
Twisted) working in conjunction, and
this is what you get with Orbited -
both the javascript client and the
server.