Home >Documents >Instant Messaging for CSNS

Instant Messaging for CSNS

Date post:19-Jan-2016
Category:
View:47 times
Download:0 times
Share this document with a friend
Description:
Instant Messaging for CSNS. Chanwit Suebsureekul Advisor: Dr. Chengyu Sun. Outline. Introduction Demo Technologies Design and Implementation Evaluation Conclusion. Introduction. CSNS: Computer Science Network Services Instant Messaging Real-time communication Contact list - PowerPoint PPT Presentation
Transcript:
  • Instant Messaging for CSNSChanwit Suebsureekul

    Advisor: Dr. Chengyu Sun

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    OutlineIntroductionDemoTechnologiesDesign and ImplementationEvaluationConclusion

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IntroductionCSNS: Computer Science Network ServicesInstant MessagingReal-time communicationContact listOnline status

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    ObjectivesEncourage the use of CSNSEncourage interaction among members of the CS departmentStudents, instructors, staff, and alumniImprove student learning

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Demohttp://cs3.calstatela.edu:4046/csns/Set user informationSet online statusSet personal messageConverseStart private conversationStart group conversationInvite buddyLeaveSend messageSend emoticonSet fontManage contact listManage groupCreate groupRename groupDelete groupManage buddyAdd buddyAdd people from classRemove buddyMove buddy to groupView buddys profileBlock buddyUnblock buddy

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    TechnologiesServer SideJ2EE, Spring Framework, Hibernate, PushletClient SideHTML, CSS, DOM, JavaScript, Ajax, Drag & Drop API, Pushlet

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Drag & Drop APIJavaScript library that adds drag & drop functionality to web pagesCross-browser compatibleUsage:Basis for creating windows and dialog boxes in the project

    http://www.walterzorn.com/dragdrop/dragdrop_e.htm

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    PushletWhats Comet?Open-source Comet implementation for the Java platformPublish/Subscribe frameworkSubscribe to a subjectGet notified when new data is published for that subjectThree modes of operationStream mode, Poll mode, and Pull mode

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Pushlet: Stream ModeClientPushletPublishermsg 2msg 2msg 3msg 3msg Nmsg Nmsg 1msg 1Use a single persistent connection

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Pushlet: Poll ModeClientPushletPublishermsg 1msg 2msg 1-2poll intervalpoll intervalmsg 3msg 3Periodically poll the server for new information

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Pushlet: Pull ModeClientPushletPublishermsg 1msg 2msg 1-2msg 3msg 3heartbeatThe server keeps the connection open until new data is available

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Design and Implementation:System ArchitectureClientServerDBPushlet FrameworkFront ControllerIMCommandController(Model)JavaBeansIMManagerPushlet CorePushlet Client APIim-pushlet.jsim-ui.jsAjax requestXML responseIM EventUserIM Event

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Event: ServerMap of the request query stringsMust have the p_event parameter

    http://cs3.calstatela.edu:4046/csns/pushlet.srv?p_event=im-create-group &p_id=xxxx&im-group-name=CS320

    KeyValuep_eventim-create-groupp_idxxxxim-group-nameCS320

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Event: ClientMap of the response XML attributesMust have the p_event attribute

    KeyValuep_eventim-create-group-ackim-group-idyyyyim-group-nameCS320

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    im-ui.js321467121314155891011Interact with usersWindowDialog BoxDrag & Drop APIMoveResize

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    im-ui.js: Dialog BoxcreateDialogWindow( w, h, title, content, button, icon )w: widthh: heighttitle: text on the title barcontent: text or HTML codebutton: DLG_OKOnly, DLG_OKCancel, DLG_YesNoCancel, DLG_YesNoicon: DLG_Critical, DLG_Question, DLG_Exclamation, DLG_Information, DLG_NoIconiconcontentbuttonsetDialogButtonCaption( dialog, type, caption )setDialogButtonFunction( dialog, type, function )

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    im-pushlet.jsIntermediary between UI and Pushlet APIClient ServerGather input from window & dialog boxBasic input validationGenerate query stringServer ClientProcess IM Event

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Pushlet Client APICreate Ajax XMLHttpRequestSend requestCapture XML responseConvert XML to IM Event

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Front ControllerMVC FrameworkIntercept requestPreliminary input validationConvert request to IM Event

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    Model ClassesPOJOs (Plain Old Java Objects)Include:BuddyGroupGroupChatAddBuddyNotificationEtc.Mapped to database tablesHibernate

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IMCommandControllerProcess IM EventTake various actions based on event typeInput validationSecurity check

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IMManagerService ManagerSingleton patternApplication EnvironmentFontEmoticonKeep track of:Active users & online statusGroup chats & members

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Protocol (1)IM Events are sent back and forthControl the communication and data synchronizationDefine standard syntax of IM EventEx.im-create-group( p_id, im-group-name );im-create-group-ack( im-group-id, im-group-name );

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Protocol (2)join-listen( im-signin-status );join-listen-ack( p_id, im-user-id, im-username, im-personal-message, im-font-name, im-font-size, im-font-color, im-font-bold, im-font-italic, im-font-underline, im-signin-status );leave( p_id );leave-ack( p_reason );im-get-user-info( p_id, im-user-id );im-get-user-info-ack( im-user-id, im-username, im-personal-message, im-status, im-listed, im-blocked, im-group-id, im-email, im-font-name, im-font-size, im-font-color, im-font-bold, im-font-italic, im-font-underline );im-change-status( p_id, im-to-status );im-change-status-ack();im-status-changed( im-user-id, im-from-status, im-to-status );im-change-pm( p_id, im-personal-message );im-change-pm-ack();im-pm-changed( im-user-id, im-personal-message );

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Protocol (3)im-change-font( p_id, im-font-name, im-font-size, im-font-color, im-font-bold, im-font-italic, im-font-underline );im-change-font-ack();im-font-changed( im-user-id, im-font-name, im-font-size, im-font-color, im-font-bold, im-font-italic, im-font-underline );im-get-classes-enrolled( p_id );im-get-classes-enrolled-ack( im-class-list );im-get-users-from-class( p_id, im-class-id );im-get-users-from-class-ack( im-class-id, im-class-code, im-user-list );im-add-buddy( p_id, im-username, im-group-id );im-add-buddy-ack( im-user-id, im-username );im-add-buddies( p_id, im-user-list, im-group-id );im-add-buddies-ack();im-get-add-buddy-notifications( p_id );im-get-add-buddy-notifications-ack();im-add-buddy-notification-received( im-user-id, im-username );

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Protocol (4)im-reply-add-buddy-notification( p_id, im-user-id, im-block-buddy, im-add-buddy );im-reply-add-buddy-notification-ack();im-remove-buddy( p_id, im-user-id, im-block-buddy );im-remove-buddy-ack( im-user-id );im-remove-buddies( p_id, im-user-list, im-block-buddy );im-remove-buddies-ack();im-block-buddy( p_id, im-user-id );im-block-buddy-ack( im-user-id );im-unblock-buddy( p_id, im-user-id );im-unblock-buddy-ack( im-user-id );im-create-group( p_id, im-group-name );im-create-group-ack( im-group-id, im-group-name );im-rename-group( p_id, im-group-id, im-group-name );im-rename-group-ack( im-group-id, im-group-name );im-delete-group( p_id, im-group-id );im-delete-group-ack( im-group-id );

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Protocol (5)im-move-buddy-to-group( p_id, im-user-id, im-group-id );im-move-buddy-to-group-ack( im-user-id, im-group-id );im-buddy( p_id, im-username );im-buddy-ack( im-user-id, im-username, im-personal-message, im-status, im-listed, im-blocked, im-group-id, im-email, im-font-name, im-font-size, im-font-color, im-font-bold, im-font-italic, im-font-underline );im-send-individual-message( p_id, im-user-id, im-message );im-send-individual-message-ack();im-individual-message-received( im-user-id, im-username, im-message );im-create-group-chat( p_id );im-create-group-chat-ack( im-group-chat-id );im-invite-buddy( p_id, im-group-chat-id, im-username );im-invite-buddy-ack();im-invite-buddies( p_id, im-group-chat-id, im-user-list );im-invite-buddies-ack();im-invitation-received( im-group-chat-id, im-user-id, im-username );

    Chanwit Suebsureekul - California State University, Los Angeles IM for CSNS

    IM Protocol (6)im-join-group-chat( p_id, im-group-chat-id );im-join-group-chat-ack( im-group-chat-id, im-user-list );im-joined-group-chat( im-group-chat-id, im-user-id, im-username );im-leave-group-chat( p_id, im-group-chat-id );im-leave-group-chat-ack();im-left-group-chat( im-group-chat-id, im-user-id );im-send-group-message( p_id, im-group-chat-id, im-message );im-send-group-message-ack();im-group-message-received( im-user-id, im-group-chat-id, im-message );refresh( p_wait );

Popular Tags:

Click here to load reader

Embed Size (px)
Recommended