implementing collaborative applications
play

Implementing Collaborative Applications Prasun Dewan Department of - PowerPoint PPT Presentation

Implementing Collaborative Applications Prasun Dewan Department of Computer Science University of North Carolina CB 3175 Sitterson Hall Chapel Hill, NC 27599-3175 dewan@cs.unc.edu http:/www.cs.unc.edu/~dewan Dewan CS 290-063 1


  1. Implementing Collaborative Applications Prasun Dewan Department of Computer Science University of North Carolina CB 3175 Sitterson Hall Chapel Hill, NC 27599-3175 dewan@cs.unc.edu http:/www.cs.unc.edu/~dewan Dewan CS 290-063 1

  2. Infrastructures Applications Infrastructures Applications Dewan CS 290-063 2

  3. Evaluation Criteria • Flexibility • Automation • Efficiency • Reuse of Existing Code Dewan CS 290-063 3

  4. Automation vs Flexibility Tradeoff Programmer User

  5. Favouring the Programmer Programmer User

  6. Favouring the User Programmer User

  7. Shared Window System Stefik ‘87 + Tightly-Coupled Meetings Application + Easy to Understand + Application-Independent + Automatable WYSIWIS Window Window Coupling Audio/Video User 1 User 2 Dewan CS 290-063 7

  8. Centralized Architecture XTV (‘88) VConf (‘87) Rapport (‘88) X Client NetMeeting Pseudo Server Pseudo Server X Server X Server User 1 User 2 Dewan CS 290-063 8

  9. Replicated Architecture Rapport VConf X Client X Client Pseudo Server Pseudo Server X Server X Server User 1 User 2 Dewan CS 290-063 9

  10. Synchronization in Replicated Architecture abc abc dabc aebc deabc daebc X Client X Client Insert d,1 Insert e,2 Insert e,2 Insert d,1 Pseudo Server Pseudo Server Insert d,1 Insert e,2 X Server X Server User 1 User 2 Dewan CS 290-063 10

  11. Migrate Central Client X Client Pseudo Server Pseudo Server X Server X Server User 1 User 2 Dewan CS 290-063 11

  12. Migrate Central Client Chung & Dewan ‘96 X Client Pseudo Server Pseudo Server X Server X Server User 1 User 2 Dewan CS 290-063 12

  13. Shared Window System - Scroll Wars + Tightly-Coupled Meetings - Window Wars Application + Easy to Understand - No Flexibility + Application-Independent - Performance + Automatable - Consistency WYSIWIS Window Window Coupling Audio/Video User 1 User 2 Dewan CS 290-063 13

  14. File System Grove Outline IBIS Arguments lrwx File GroupDraw Drawing Notes Document Prep Document Read/Write Process 1 Process 1 - Large- + Sharing Grained + Persistence - Connected User 1 User 2 + Access, - Async Conc. Control Dewan CS 290-063 14

  15. Relational DBMS Author, Category, Status and Awareness Info M IDS + Fine-Grained L Database Insert/Delete/ + Query Select Language Process 1 Process 1 User 1 User 2 Dewan CS 290-063 15

  16. Replicated Disconnected Databases “Replica” “Replica” DC -> C source determines rep. schedule read access IDS M IDS M delete replication old data replication replication schedule destination determines write access type replication Process 1 Process 1 record replication ACL rep. rep. param. rep. User 2 User 1 immediate rep. Dewan CS 290-063 16

  17. Coda: Connection Degree Data Server SC send update & cache send update SC DC -> SC send updates & get uncached WC SC cache WC trickle updates WC send updates DC -> SC Cache Client 1 Client 2 Cache User 1 User 2 Dewan CS 290-063 17

  18. Interprocess Communication Session Manager register, get peers Process 1 Process 1 + Absolute - No Flexibility User 1 User 2 Automation Dewan CS 290-063 18

  19. ISIS: Causal and Atomic Broadcast cbcast_group t( m2) < t (m1) create_group, join_group, leave_group abcast_group t (m1) < t( m1’) t (m1’) < t (m1) P2 P1 m1 m1 ISIS ISIS m2 m1 m2 commuting m1 = color red operations m1 m2 m1’ = magnify P3 non-commuting m1 = Insert a, 2 m1’ ISIS m1’ operations m1’ = Insert b, 1 Dewan CS 290-063 19

  20. Multiple Views Host 1 Model notify request notify View View Window Window User Dewan CS 290-063 20

  21. Multiple Threads in Rendezvous +Multi Model Multiple Views threads Prevent -Two- View View starvation Phase Comm. -Central Window Window Arch. Host 1 Host 2 User 1 User 2 Dewan CS 290-063 21

  22. 2-Phase Model-View Protocol Figure originally appears in [22] Dewan CS 290-063 22

  23. Clock: Optimized MVC Figure originally appears in [22] Dewan CS 290-063 23

  24. Xerox’s Colab. Broadcast Methods Associates/ Associates/ Replicas Replicas Broadcast Association Model Model method bm lm lm View View lm lm lm Window Window User 1 User 2 Dewan CS 290-063 24

  25. GroupKit: Environment Replication K1, V1 K1, V1 Environment Active I K2, V2 K2, V2 Environments I I R P Q all Multicast T S T Procedures Session-based others, Calls U V usernum Dewan CS 290-063 25

  26. GroupKit: Open Session Management +Flexible K1, V1 K1, V1 -Collaboration K2, V2 K2, V2 Aware I I R P Q newUserArrived newUserArrived updateEntrant Session userReqNewConf Session User 1 User 2 Manager Manager new newUserApproved new invite invite Registrar Dewan CS 290-063 26

  27. GroupKit Multicast Code & Events Shared Idea List proc insertIdea idea { insertColouredIdea blue $idea gk_toOthers ’’insertColouredIdea red $idea’’ Event Handlers gk_bind newUserArrived { makeChatWindow %U } proc makeChatWindow usernum { ... } Dewan CS 290-063 27

  28. GroupKit Shared Environments Group Hello World gk_initConf $argv gk_defaultMenu .menubar pack .menubar -side top -fill x gk_newenv -bind -share message message greetings ’’Hello World’’ button .hello -text ’’Hello World’’ -command { message greetings ’’[users local.username] says hello!’’} pack .hello -side top message bind changeEnvInfo .hello configure -text [ message greetings ] after 2000 {.hello configure -text ’’Hello World’’} } Dewan CS 290-063 28

  29. Suite: Parameterized Generator Active int[] v1 Variables C Application bool validateElem V1(int newVal) void updateV1 (int[] newVal) void updateElemV1 (int index, newVal) Attributed v1[2] v Interaction V1[ update(v2, newVal) Variables 2] int v1 (widget = w1, int v1 (widget = w2, Dialogue valueCpld = true, valueCpld = true, Managers viewCpld = false, sync viewCpld = true, sync = incr, access = “rw”) v1[2] = explicit, access = “r”) edit v1[2] transmit validate commit Dewan CS 290-063 29 User 2 User 1

  30. Text Editor Dewan CS 290-063 30

  31. Text Editor /*dmc Editable String */ String text = "hello world"; Load () { Dm_Submit (&text, "Text", "String"); Dm_Engage ("Text"); } Dewan CS 290-063 31

  32. Multiuser Outline Dewan CS 290-063 32

  33. Outline /*dmc Editable Outline */ typedef struct { unsigned num; struct section *sec_arr; } SubSection; typedef struct section { String Name; String Contents; SubSection Subsections; } Section; typedef struct { unsigned num; Section *sec_arr; } Outline; Outline outline; Load () { Dm_Submit (&outline, "Outline", "Outline"); Dm_Engage ("Outline"); } Dewan CS 290-063 33

  34. Talk Dewan CS 290-063 34

  35. Talk Program /*dmc Editable String */ String UserA = "", UserB = ""; int talkers = 0; Load () { if (talkers < 2) { talkers++; Dm_Submit (&UserA, "UserA", "String"); Dm_Submit (&UserB, "UserB", "String"); if (talkers == 1) Dm_SetAttr ("View: UserB", AttrReadOnly, 1); else Dm_SetAttr ("View: UserA", AttrReadOnly, 1); Dm_Engage_Specific ("UserA", "UserA", "Text"); Dm_Engage_Specific ("UserB", "UserB", "Text"); } } Dewan CS 290-063 35

  36. Command Interpreter Dewan CS 290-063 36

  37. Command Interpreter /*dmc Editable CmdSeq */ typedef struct { String Cmd, Result; } CmdRec; typedef struct { unsigned num; CmdRec *cmd_arr; } CmdSeq; CmdRec Init = {"", ""}; CmdSeq CmdList = {1, &Init }; void Execute (cmd_name, val) char *cmd_name; String *val; { int index; char output_name[1024]; char *result; sscanf (cmd_name, "(((CmdList)[%d]).Cmd)", &index); sprintf (output_name, "(((CmdList)[%d]).Result)", index); /* execute command using popen() and capture output */ result = ExecuteCommand (*val); Dm_Update (output_name, "String", &result); Dm_SequenceElementAppend ("CmdList", "CmdRec", &Init); } Load () { Dm_Submit (&CmdList, "CmdList", "CmdSeq"); Dm_SetAttr ("Type: String", AttrAcceptOnReturn, 1); Dm_SetAttr ("Type: String", AttrUpdateProc, Execute); ... Dm_Engage ("CmdList"); } Dewan CS 290-063 37

  38. Web +Wide-Area Naming and Sharing HTTP Server Form 1 +High-level update Local UI Cgi scripts -Async -Jittery get notify get Web Rendered Form 1 Display Browsers HTML Form 1 Display Document edit form1 commit Dewan CS 290-063 38 User 2 User 1

  39. Implementation Taxonomy X Client X Client X Client Pseudo Server Pseudo Server Pseudo Server Pseudo Server X Server X Server X Server X Server User 1 User 2 User 1 User 2 lrwx File Model View View Process Process Window Window 1 1 Host 1 Host 2 User 1 User 2 User 1 User 2 Dewan CS 290-063 39

  40. Single-User Architecture Model View Toolkit Windows PC User 1 Dewan CS 290-063 40

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend