Web IM的特性:無需安裝客戶端,穿透防火牆,與社區的緊密結合
Web IM的應用:社區用戶的交流,在線客服,CRM。
Web IM實現技術
Web IM的實現技術主要有:
基於插件的技術:如ActiveX,插件相對穩定,但插件須要用戶本身容許並下載安裝,而大多數用戶擔憂安裝了黑客軟件或插件對計算機系統很差而不肯意安裝,而且上網助手等軟件也攔截插件,致使不少用戶沒法使用。另外,ActiveX受平臺限制,只能在IE下使用。
基於Flash的技術:典型的如Yahoo web messenger,結合Flash和Ajax;Google Talk Gadget
純粹的基於HTTP的技術:
前端使用Ajax的Web IM:meebo, ebuddy, ILoveIm, MSN Web Messenger, KoolIM等。
後臺使用comet的Web IM:meebo, gtalk等。
支持wap的有ebuddy, Yahoo Web Messenger, MSN Web Messenger, Google Talk, Mabber, AIM Express (Web Messengers Handbook)
Web IM
1. 國內有獨立IM的Web版:Web Popo, WebQQ, 也有與論壇等結合的IM:sohu小紙條,新浪「紙條箱」,QQ空間「小紙條」,淘寶旺旺等,
2. 國外:基於上都是獨立IM的Web版。或者集成多種IM的Web版,如meebo, flcikim, ebuddy等。
相關技術
Comet (Server-Push)
Comet技術的一個重要組成部分就是event-drived web server,目前商用的實現已經出現,如lightstreamer,Lightstreamer Dojo Demo:http://app.lightstreamer.com/DojoDemo/
幾個開源的支持Comet的Library。
Orbited :一種開源的分佈式Comet服務器
AjaxMessaging :Ruby on Rails的Comet插件
Pushlets :一個開源框架,能夠讓服務器端java對象推送事件到瀏覽器端javascript,java applet,或者flash應用程序
Lightstreamer :提供基於AJAX-COMET模式的HTTP流的商業實現
Pjax :Ajax的推送技術
Scalability(可伸縮性,可擴展性)
Because Comet applications send events in real time, they typically use more resources than other types of web applications, making them more difficult to scale (grow to support large numbers of users).
Comet relies on continually keeping at least one server–client connection open for each client. Traditional web servers, designed for the page-by-page application architecture, cannot cope with such large numbers of open connections. This is a vertical scalability problem: it is difficult to handle many users on each server.
Additionally, because Comet applications are often interactive, allowing arbitrary groups of users to communicate with each-other, splitting tasks among servers is more difficult than for applications in which each user acts independently. This is a horizontal scalability problem: it is difficult to add more servers to the application.
Comet在可伸縮性上的提高:
性能:After some recent optimizations, the Dojo Cometd implementation of the Bayeux protocol running on the Jetty web server can now handle up to 20,000 simultaneous users per server while maintaining sub-second latency.
測試環境:mid-sized Amazon EC2 virtual servers: 7.5 GB of memory, 2×2 EC2 Compute Units, 64-bit platform running Ubuntu 7.10 and Sun JVM 1.5.0_13. A single virtual machine was used as the Cometd server and between 1 and 3 virtual machines were used to generate the load of 20,000 clients.
DWR
DWR(Direct Web Remoting)是一個WEB遠程調用框架.利用這個框架能夠讓AJAX開發變得很簡單.利用DWR能夠在客戶端利用JavaScript直接調用服務端的Java方法並返回值給JavaScript就好像直接本地客戶端調用同樣(DWR根據Java類來動態生成JavaScrip代碼)。