1 / 75

Working with Collaboration Service

Working with Collaboration Service. Working with Collaboration Service. In this module, you will gain an understanding of collaboration service and implement features that will enable you to build a collaborative application. Concepts .

veata
Download Presentation

Working with Collaboration Service

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Working with Collaboration Service

  2. Working with Collaboration Service In this module, you will gain an understanding of collaboration service and implement features that will enable you to build a collaborative application.

  3. Concepts In this module, you will learn about the following topics Introducing LiveCycle Collaboration Service Building your first application and connecting to a room Using pod components Using resource bundles to ease setting credentials and room URL Using publisher and subscriber components Manipulating files Introducing a shared model Understanding the need for custom pods.custom components Introducing room hierarchy, permissions and objects Using server authentication

  4. Exploring Collaboration Service In this topic, you will start your understanding of collaboration service and create a developer’s account.

  5. Introducing LiveCycle Collaboration Service LiveCycle Collaboration Service (LCCS) is a platform as a service that allows developers to add real-time social capabilities to RIAs LCCS is comprised of Flex-based client components Server SDK Hosted service infrastructure LCCS goals are Enable rapid development of multi-user, real-time collaborative (RTC) applications Provide a set of easy to understand components, tools and services 4

  6. Introducing LiveCycle Collaboration Service Possible use cases 4

  7. Getting started with development Table 1:  LCCS Terminology 5

  8. Introducing shared managers Shared managers are the four "pillars" of every LCCS application Singleton manager classes that are used to access and manipulate the shared state of the application as a whole The APIs of all shared managers are asynchronous; that is, changes are not reflected in the client until the server has validated them Only after changes are validated and results returned to all clients are the appropriate events dispatched 5

  9. Introducing shared managers • Like other LCCS APIs, shared manager APIs have permission management built into them, that is, only users with the requisite permission may utilize them Table 2:  Shared managers 5

  10. SDK Installation As part of the setup the SDK is installed from the LCCS SDK Navigator Application As part of the SDK installation, the following are written to disk SWCs for Flex components Source code for the SWCs Sample applications Server integration scripts Documentation 6

  11. SDK Installation 6

  12. SDK Installation 6

  13. Task 1:  Preparing to use the environment In this task, you will perform the following Create an account and a room DO NOT DO FOR MAX SESSION: Use the SDK Navigator Application 8

  14. Building an Application and Connecting to a Room In this topic, you will build a simple collaboration service application. 8

  15. Building your first application and connecting to a room To get started with the most basic LCCS application, two tasks must be completed Create a Flash Builder project that includes the LCCS SDK Add code to the application to connect and authenticate to a room 12

  16. Creating a Flash Builder project When creating a project that is going to be used with LCCS applications, the LCCS library for Flex (SWC) must be available to the project SWC is named lccs.swc May be added at project creation, or later Good practice to add the source code 12

  17. Authenticating to a room <rtc:ConnectSessionContainer> tag is used to authenticate to a room and specify the LCCS components to be created within it The ConnectSessionContainer class Is a Flex UI container which manages LCCS connectivity for its child components Contains other Flex SDK and LCCS SDK components Ensures a LCCS server session is created before instantiating its child components ConnectSessionContainer requires values for these properties roomURL: The URL of the room to which to connect https://collaboration.adobelivecycle.com/[account name]/[room name] authenticator: Requires an authentication object such as AbstractAuthenticator 12

  18. Authenticating to a room For hosted room development, the AdobeHSAuthenticator class is used as the authenticator Embedded username and password properties may be used in development If only the username is provided, users enter the room as a guest If only the authenticationKey property is used, users must authenticate via external authentication Note: Authentication is discussed further later in the course. Code example <rtc:ConnectSessionContainer width="100%" height="100%" roomURL="https://collaboration.adobelivecycle.com/lcsf/Creative"> <rtc:authenticator> <rtc:AdobeHSAuthenticator userName="fake@gmail.com" password="fakepw"/> </rtc:authenticator> </rtc:ConnectSessionContainer> 12

  19. Task 2:  Configuring a Flash Builder project and connecting to your room Create a Flash Builder project Add code to connect to your room Add code to display web camera 14

  20. Exploring Pod Components In this topic, you will use pod components in a collaboration service application. 14

  21. Using pod components Pods are high-level, mini applications which provide the most requested pieces of LCCS functionality Can be used out-of-the-box or extended to meet unique requirements Current pods are WebCamera: Start and run user’s camera to share live video SimpleChat: Chat with other room users FileShare: Share files Roster: List of users in the room Note: Add meeting notes Whiteboard: Allow one or more users to draw on the virtual whiteboard Pod components are meant to be used with little or no customization through property settings, other than positioning and size 19

  22. Using resource bundles to ease setting credentials and room URL In the tasks, the room URL, username and password must be set for each individual To ease this task, resource bundles will be used A text file, called a resource, defines variable-value pairs Metadata points to this resource file Instead of using literal text in code, a variable is used that references a resource, and the value corresponding to the variable is inserted into the code Often used for localization as browser or OS language settings can cause different resources to be used for value insertion 20

  23. Using resource bundles to ease setting credentials and room URL In this course, credentials and room URL will be set once in a resource, then the code will reference that resource <fx:Metadata> [ResourceBundle("login")] </fx:Metadata> <rtc:ConnectSessionContainer width="100%" height="100%" roomURL="@Resource(bundle='login',key='lccs.url')"> <rtc:authenticator> <rtc:AdobeHSAuthenticator userName="@Resource(bundle='login',key='lccs.[UserName]')" password="@Resource(bundle='login',key='lccs.[Password]')"/> </rtc:authenticator> </rtc:ConnectSessionContainer> 20

  24. Task 3:  Using pod components In this task, you will perform the following Auto-promote users in a shared room Open the project Set values for the resource bundle to use Add default components Auto-promote users in a shared room Set values for the resource bundle to use Add default components 21

  25. Exploring Publisher and Subscriber Components In this topic, you will implement the audio and web cam publisher/subscriber components in an application. 21

  26. Using publisher and subscriber components One of LCCS’s strongest assets is the ability to publish, receive and manage A/V streams across unlimited number of users Customized management of publication and subscription streams provides the means to build fully customized audio/video workflows in applications All publishers publish StreamDescriptor objects to the StreamManager, which notifies subscribers that a new stream has been initiated StreamDescriptors: Define the set of audio and video properties of a stream kBps mute for audio pause for video type 25

  27. Using publisher and subscriber components The default behavior of publishers and subscribers working together is A StreamDescriptor identifies the available stream Stream publishers publish to everyone in the room Users with the role UserRoles.PUBLISHER or greater may publish, and all users with the role of UserRoles.VIEWER or greater are able to subscribe Subscribers automatically subscribe to any incoming streams and play them in the manner most appropriate (for example, audio through the speakers) Publisher and subscriber components are available for Audio: AudioPublisher, AudioSubscriber Web cameras: WebcamPublisher, WebcamSubscriber Screens: ScreenSharePublisher, ScreenShareSubscriber 25

  28. Implementing the publisher and subscriber components Publishing is very straight forward Instantiate the publisher Call the corresponding publish() method ... <rtc:WebcamPublisher id="camPub"/> ... camPub.publish(); To suspend publishing, use the publisher object’s stop() method To subscribe, simply instantiate the subscriber 25

  29. AudioPublisher and AudioSubscriber components AudioPublisher and AudioSubscriber are the principal ways to add audio communication to a collaborative application Implement Voice over IP (VoIP) Completely headless (no user interface) When starting to publish, Flash Player will display the following prompts 26

  30. AudioPublisher and AudioSubscriber components Many properties and methods available to customize the AudioPublisher, including gain gainControl isPaused silenceLevel publish() stop() pause() stop() 26

  31. AudioPublisher and AudioSubscriber components Many properties and methods available to customize the AudioSubscriber, including streamCount accessModel subscribe() setLocalVolume() close() Note: LCCS API Reference has the complete list of properties and methods. Example code <rtc:AudioPublisher id="audioPub"/> <rtc:AudioSubscriber/> 26

  32. WebcamPublisher and WebcamSubscriber components • When instantiated, the WebcamSubscriber is added to the display list, but must be given a width and height The WebcamPublisher is headless Flash Player will display a prompt to allow publishing Properties are available to control the quality of video published, such as the following quality resolutionFactor fps WebcamSubscriber has a rudimentary interface where it displays each incoming video as a separate rectangle in a tiled layout As part of the UI, the boolean displayUserBars property can be set 26

  33. WebcamPublisher and WebcamSubscriber components Example code <rtc:WebcamPublisher id="camPub" quality="50" resolutionFactor="5" fps="24"/> <rtc:WebcamSubscriber width="300"height="300" top="20"left="20" displayUserBars="false"/> By default the WebcamSubscriber will NOT subscribe to the stream being published from the current user’s computer 26

  34. Subscribing to the local camera To subscribe to the local camera, one property must be added to the subscriber webcamPublisher: Specifies a WebcamPublisher whose video should be displayed if a local camera video display is desired 27

  35. Task 4:  Using audio and video publisher and subscriber components In this task, you will perform the following Open the project Add audio to the application Add video to the application 28

  36. Manipulating Files in a Room In this topic, you will upload images to a room, then display different images via a selectedItem. 28

  37. Manipulating files The FilePublisher and FileDescriptor classes work together to implement file management in a room 31

  38. Using the FileDescriptor FileDescriptor: Describes the set of properties for a file present in the room for upload or download FileDescriptors are accessed through FileManager methods FileManager events will notify of any changes to the set of FileDescriptor objects Collaboration components FileSubscriber and FilePublisher use FileDescriptor objects to access raw files themselves FileManager’s fileDescriptors property contains an array of all FileDescriptors in a room Properties provide access to data in the FileDescriptor downloadUrl: It gives the complete URL required for downloading the file filename: The name of the file on the server name: The name of the file on the client size: The size of the file in bytes 31

  39. Using the FilePublisher FilePublisher: Foundation component for supporting file uploads, as well as notification to other users that a file has been uploaded Supports only one upload a time Acts as an easy to use proxy for the FileManager in creating and uploading files to groups Methods provide access to key functionality browse(itemID, typeFilter) itemID: A unique identifier based on ActionScript’s pseudo-random number generator and current time Use the UIDUtilcreateUID() method to generate the value typeFilter: An array of FileFilter instances Individual filter example: FIleFilter("Images","*.tiff;*.png") remove(fileDescriptor) 31

  40. Task 5:  Manipulating files in a room In this task, you will perform the following Open the project Browse for, and upload, a file Display a selected image 32

  41. Exploring a Shared Property In this topic, you will use a shared property from a shared model to make image selection a collaborative effort. 32

  42. Introducing a shared model In terms of the model-view-controller (MVC) design pattern in an LCCS application, the model’s responsibilities could include Represent an application or component state Provide APIs to query and modify that state Notify listeners when a state change occurs In LCCS, the model is augmented by a concept of a shared model A shared model adds the following responsibilities to the overall model Maintains knowledge of the current user’s permission to use a given API When the shared model is called upon to alter its state, the potential change generates a message which is sent to the service A change is NOT reflected in the shared model immediately When the service routes an incoming message to the shared model, it then updates the state and notifies any local listeners 35

  43. Introducing a shared model 35

  44. Shared properties As part of the shared model, developers can implement the SharedProperty class SharedProperty: A model that manages a variable of any type and which is shared among all users connected to the room 35

  45. Shared properties To better understand the process of using a shared property, assume the situation where a user is clicking words in a List, and the selected word then appears in a Label for all users in a room 35

  46. Shared properties Instantiate a new SharedProperty object Add an event listener to handle changes to the SharedProperty object The shared object subscribes to synchronization events from the service A room user named user1 clicks on a word in the List This updates user1’s ;, it DOES NOT update all room users’ Labels The event handler for the click event sets the SharedProperty’s value to the selectedIndex value of the List The shared property’s event handler sets the List’s selectedIndex to the SharedProperty’s value This changes the Label for all the users in the room 35

  47. Key SharedProperty properties and methods sharedID: Datatyped as a String and defines the logical location of the component on the service Typically this assigns the sharedID of the CollectionNode used by the component value: The value of the SharedProperty subscribe(): Tells the component to begin synchronization with the service 36

  48. Task 6:  Implementing a shared property In this task, you will perform the following Open the project Synchronize image selection Avoid unnecessary assignments 37

  49. Exploring custom pods In this topic, you will build a custom pod to replace the default FileShare pod. 37

  50. Understanding the need for custom pods/custom components There are times when the default pod components may not function and/or look as desired Custom pods/components can be built using Flex to implement new functionality and/or new design 41

More Related