Sie sind auf Seite 1von 5

c c

 
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.

Build a SOAP-based Chat Application with Java Web Services

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


c !" #$.


% (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.

+ ,,$-c- Grizzly ensures greater performance by Asynchronous request


processing which makes use of the thread pool system pool system.

#"( MINA (Multipurpose Infrastructure for Network Applications) is a


network application framework which helps users develop high performance and high
scalability network applications easily.

- - 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

!#'./'..' $ #$"( application


(http://oreilly.com/catalog/javmesser/chapter/ch02.html) . The requirements of Internet chat map
neatly onto the publish-and-subscribe messaging model. In this model, In this model, a producer
can send a message to many consumers by delivering the message to a single topic. A single
topic . In reality, using JMS for a chat application would be overkill, since chat systems don't
require e don't require enterprise quality service.
 $0 - Elko is a Java-based server framework for building stateful, sessionful applications in
the web. It is especially suited to applications to applications that require realtime interaction
among multiple clients.http://www.fudco.com/software/elko

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.

3(!- uses a slightly different technique to enable a scalable implementation of


Comet. Jetty supports the programming construct known as continuations. The idea is simple
enough. A request is suspended and continued at some point in the future. The resumption could
happen either because of a timeout or some other, meaningful event. While the request is
suspended, its thread is freed up.

You can use Jetty's O O 


   O  OO  class to create an instance
of O O 
   O  O for any  
.

3 c

4-5 "5GNU General Public License

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

4-5A. de Bernis "5GNU General Public License

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( #"(

4-5 Mr.Lee "5GNU General Public License

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(

4-5 countjoe "5GNU General Public License

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!&/!..

OpenIM !&/!..®  is an #'"!


#$  (BSD License) of XMPP/Jabber Instant Messager. An
XMPP server.
c 

(#5//)))3 .3"/$#)0/)./$ .-/)"8/

(#5//)))3 #3"/.$9/:/:/:/-"$' *-'$ ##/

(#5//)))38.3/ "$/; '" "8<3($

http://www.javaprogrammingforums.com/java-code-snippets-tutorials/551-how-write-simple-
xmpp-jabber-client-using-smack-api.html

Das könnte Ihnen auch gefallen