Beruflich Dokumente
Kultur Dokumente
c
We want to develop a simple, multi client chat program. We want the clients to be able to
connect to a server, sending messages and recieving messages from it.
Polling Vs Comet
In Pollingclient must regularly hit the server to check for updates . While Cometpushes
data from the server to the browser without the browser requesting it.
Polling Disadvantages
The main drawback of the polling approach is the amount of traffic generated as it scales
to many .Each lients. Eac client must regularly hit the server to check for updates, which
places a burden on the server's resources.
Comet Advantages
Comet technique is a variant of polling called long polling. The main difference between
polling and long polling is how long it takes the server to respond. The advantage of a
long poll over normal polling is that data goes from the server to the client as soon as it is
available. The request may wait a long time with nothing to send back, but once there is
something new, it is immediately sent to the client. There is no latency. Web-based chat
program, or anything that claims to be "real-time", it probably used this technique.
http://www.devx.com/webdev/Article/16853/1954
Build chat applications using just the streams available in the standard API.
The chat uses TCP/IP sockets to communicate, and can be embedded easily in a Web
page.
http://www.javaworld.com/javaworld/jw-01-1997/jw-01-chat.html
% (Direct Web Remoting) ± DWR helps Java developers ease the transition to using
JavaScript, in addition to providing real-time capa real-time capabilities. In comparison
to GWT, because DWR is a Java to JavaScript interface, you can code I you can code in
JavaScript , the native language of the browser, and communicate with a Java back-end
with back-end without the magic of translating/rewriting Java into JavaScript.
& ± XMPP server integration for chat applications server . ³Extensible Messaging
and Presence Protocol (XMPP) is an open, XML-inspired protocol for near-real-time,
extensible instant messaging (IM) and presence information (a.k.a. buddy lists).
- Atmosphere is a Comet framework which can work on any JEE web
server. The Framework contains its own web serve own server called ³Atmosphere Spade
Server´. If you are using Atmosphere framework please be aware that only aware that
only Jetty, GlashFish, and Grizzly servers can make use of asynchronous native API
(comet usessssssssssss using non-blocking IO technique for building highly scalable
communications )ICEfaces
!&#'() (c
*"- It is an open source !& based framework for developing
Rich Internet Applications using java. Java . !& push is an exciting feature of
ICEfaces which enable us to develop c web application wit application with simple
Java API without worrying about the low-level details of the push-mechanism
mechanisms.
- - Netty is a NIO client server framework which enables quick and easy
development of network applications such as protocol servers and clients. It greatly
simplifies and streamlines network programming such as TCP/IP socket server
1"0 - we can build a Java application which works in the same way as these popular
(jabber & pidgin) XMPP clients
c 2
3"!-
To handle Comet efficiently, you need non-blocking IO, and Java has this via its NIO library.
Two of the most popular open source servers, Apache Tomcat and Jetty, have both leveraged
NIO to add non-blocking IO and thus enable Comet.
3c
5http://freecs.sourceforge.net/
" # 5FreeCS is a free chatserver (WebChat) written in Java. But even
better: It is OpenSource. This means, that everybody may contribute her/his own
codesnippets and improvements or just implement special things for their own
benefits. (No java-applets are needed, making it compatible with every client,
which is able to to show HTML-Files)
13c( -)(3
5http://chateverywhere.sourceforge.net/
" # 5Chat Everywhere gives you the possibility to easily put a
real-time discussion forum on your website. It allows extended (Irc-like)
commands, several levels of hierarchy and an easy to modify
configuration file. The goal of this project is to provide webmasters with a
simple to use, but very configurable, chat zone on their site. The
requirements on the client side are as low as a java enabled browser (most
of them are). The server is very light (coded in standard, portable C), and
can run on very small servers. It does not require admin (root) rights.
Ö3c( #"(
5http://chipchat.sourceforge.net/
" # 5Chipchat is a web chat program written in java language. It is
a web application and needs a web server such as Tomcat. This does not
use http refresh feature, but it use appet for communication with server
and javascript for updating screen. So screen is updated smooth. There is
no need to install program in client. And if web browser support applet
and css2.1 well. It work well in any OS and Web browser.
63$c(
5http://sourceforge.net/projects/llamachat/
" # 5LlamaChat is designed to provide an open source, chat
server/client pair for use on the web. It is written in java and supports
many advanced chat functionality including secure connections,
emoticons, administrative class users, and more.
73!&/!..
http://www.javaprogrammingforums.com/java-code-snippets-tutorials/551-how-write-simple-
xmpp-jabber-client-using-smack-api.html