Wednesday, 26 June 2013

Introduction to LINQ Queries (C#)

A query is an expression that retrieves data from a data source. Queries are usually expressed in a specialized query language. Different languages have been developed over time for the various types of data sources, for example SQL for relational databases and XQuery for XML. Therefore, developers have had to learn a new query language for each type of data source or data format that they must support. LINQ simplifies this situation by offering a consistent model for working with data across various kinds of data sources and formats. In a LINQ query, you are always working with objects. You use the same basic coding patterns to query and transform data in XML documents, SQL databases, ADO.NET Datasets, .NET collections, and any other format for which a LINQ provider is available.
All LINQ query operations consist of three distinct actions:
  1. Obtain the data source.
  2. Create the query.
  3. Execute the query.
The following example shows how the three parts of a query operation are expressed in source code. The example uses an integer array as a data source for convenience; however, the same concepts apply to other data sources also. This example is referred to throughout the rest of this topic.
class IntroToLINQ
{        
    static void Main()
    {
        // The Three Parts of a LINQ Query: 
        //  1. Data source. 
        int[] numbers = new int[7] { 0, 1, 2, 3, 4, 5, 6 };

        // 2. Query creation. 
        // numQuery is an IEnumerable<int> 
        var numQuery =
            from num in numbers
            where (num % 2) == 0
            select num;

        // 3. Query execution. 
        foreach (int num in numQuery)
        {
            Console.Write("{0,1} ", num);
        }
    }
}
The following illustration shows the complete query operation. In LINQ the execution of the query is distinct from the query itself; in other words you have not retrieved any data just by creating a query variable.
Complete LINQ Query Operation
In the previous example, because the data source is an array, it implicitly supports the generic IEnumerable<T> interface. This fact means it can be queried with LINQ. A query is executed in a foreach statement, and foreach requires IEnumerable or IEnumerable<T>. Types that support IEnumerable<T> or a derived interface such as the generic IQueryable<T> are called queryable types.
A queryable type requires no modification or special treatment to serve as a LINQ data source. If the source data is not already in memory as a queryable type, the LINQ provider must represent it as such. For example, LINQ to XML loads an XML document into a queryable XElement type:
// Create a data source from an XML document. 
// using System.Xml.Linq;
XElement contacts = XElement.Load(@"c:\myContactList.xml");
With LINQ to SQL, you first create an object-relational mapping at design time either manually or by using the Object Relational Designer (O/R Designer). You write your queries against the objects, and at run-time LINQ to SQL handles the communication with the database. In the following example, Customers represents a specific table in the database, and the type of the query result, IQueryable<T>, derives from IEnumerable<T>.
Northwnd db = new Northwnd(@"c:\northwnd.mdf");

// Query for customers in London.
IQueryable<Customer> custQuery =
    from cust in db.Customers
    where cust.City == "London"
    select cust;
For more information about how to create specific types of data sources, see the documentation for the various LINQ providers. However, the basic rule is very simple: a LINQ data source is any object that supports the generic IEnumerable<T> interface, or an interface that inherits from it.
NoteNote
Types such as ArrayList that support the non-generic IEnumerable interface can also be used as a LINQ data source. For more information, see How to: Query an ArrayList with LINQ.
The query specifies what information to retrieve from the data source or sources. Optionally, a query also specifies how that information should be sorted, grouped, and shaped before it is returned. A query is stored in a query variable and initialized with a query expression. To make it easier to write queries, C# has introduced new query syntax.
The query in the previous example returns all the even numbers from the integer array. The query expression contains three clauses: from, where and select. (If you are familiar with SQL, you will have noticed that the ordering of the clauses is reversed from the order in SQL.) The from clause specifies the data source, the where clause applies the filter, and the select clause specifies the type of the returned elements. These and the other query clauses are discussed in detail in the LINQ Query Expressions (C# Programming Guide) section. For now, the important point is that in LINQ, the query variable itself takes no action and returns no data. It just stores the information that is required to produce the results when the query is executed at some later point. For more information about how queries are constructed behind the scenes, see Standard Query Operators Overview.
Note Note
Queries can also be expressed by using method syntax. For more information, see Query Syntax and Method Syntax in LINQ (C#).
As stated previously, the query variable itself only stores the query commands. The actual execution of the query is deferred until you iterate over the query variable in a foreach statement. This concept is referred to as deferred execution and is demonstrated in the following example:
//  Query execution.  
foreach (int num in numQuery)
{
    Console.Write("{0,1} ", num);
}
The foreach statement is also where the query results are retrieved. For example, in the previous query, the iteration variable num holds each value (one at a time) in the returned sequence.
Because the query variable itself never holds the query results, you can execute it as often as you like. For example, you may have a database that is being updated continually by a separate application. In your application, you could create one query that retrieves the latest data, and you could execute it repeatedly at some interval to retrieve different results every time.
Queries that perform aggregation functions over a range of source elements must first iterate over those elements. Examples of such queries are Count, Max, Average, and First. These execute without an explicit foreach statement because the query itself must use foreach in order to return a result. Note also that these types of queries return a single value, not an IEnumerable collection. The following query returns a count of the even numbers in the source array:
var evenNumQuery = 
    from num in numbers
    where (num % 2) == 0
    select num;

int evenNumCount = evenNumQuery.Count();
To force immediate execution of any query and cache its results, you can call the ToList<TSource> or ToArray<TSource> methods.
List<int> numQuery2 =
    (from num in numbers
     where (num % 2) == 0
     select num).ToList();

// or like this: 
// numQuery3 is still an int[] 

var numQuery3 =
    (from num in numbers
     where (num % 2) == 0
     select num).ToArray();
You can also force execution by putting the foreach loop immediately after the query expression. However, by calling ToList or ToArray you also cache all the data in a single collection object.

Tuesday, 25 June 2013

Getting started with CEBP

To get started, IT buyers need to do two things. The first is to start your UC deployment -- but do not choose a vendor based on who your VoIP or email vendor is. Instead, think of UC as a development platform, and choose your vendor based on its ability to integrate into your current application infrastructure and business processes.
The second task is to evaluate your business processes and understand which ones will benefit most from being communications-enabled. These are typically the ones with the highest amounts of human latency. Taking a platform approach, coupled with an understanding of the business process benefits, will create a higher likelihood of a successful deployment.

CEBP helps companies be more efficient

Communications-enabled business processes enable most companies to be much more agile than they have been before. Organizations can deliver critical information to anyone in the extended enterprise at any time, over any device in real time, ultimately saving companies huge amounts of time. For organizations that have adopted CEBP, many processes that previously took hours to complete can now be completed in minutes. CEBP allow organizations to make faster, more accurate decisions. This will lead to a more efficient workforce, higher productivity and even, in many cases, higher customer satisfaction.
Companies will vary in deciding which elements of UC to deploy and which processes to communications-enable. There is no company that should integrate all elements of UC into all processes, but most companies will integrate some of the elements. These are the elements of UC most likely to be used in a CEBP:
  • Presence -- This allows the process to understand which individuals are available and how to reach them. This is the main reason I feel presence is the key foundational element of UC, not VoIP.
  • Email and messaging -- This will be the most common method of delivering information to the key individuals.
  • Integration into a skills database, customer information or other data source -- An additional source of information can be used to refine the decision the CEBP makes.
  • Mobile extension -- This will allow information to be delivered to devices and users that are not tied to a desktop.
Other components such as voice, video, conferencing and chat will also be used to allow users to communicate with one another, but the use will be dictated by the process.

Defining a communications-enabled business process (CEBP)

A "communications enabled business process" is just what the phrase describes -- it's a business process that is enabled because communications has been embedded into it. One way to understand this is to think of the concept of a "Web-enabled business process." While we don't call it that specifically, there are many processes that are more efficient or entirely possible only because of the Web. Similarly, over the next few years, organizations will streamline and then subsequently create new business processes that are wrapped around communications.
CEBP combines all the capabilities of UC with the world of business applications. In this phase of UC, Web services and service-oriented architecture (SOA) become the means by which communications and business applications converge. A CEBP can be something as simple as a transfer of information or as complex as an organization's supply chain being modified because real-time communications is now being fed into it.
An example of a CEBP would be the process of finding an expert to answer a question. This can be streamlined by calling a network-based service that uses a combination of presence, customer information and business rules to locate the best person and contact him across any mode of communication. In many cases, this could be a fully automated process removing all of the human latency.
This might occur in a hospital environment where a medical alarm creates the need for a specialist. Historically, this could require an attendant to search through many systems to find the right individual and then call specific individuals until one is located. With a CEBP, the system would automatically know who was available, on which device and what presence status, and then a message could automatically be sent alerting the specialist that there is a need for his or her skills. In a medical environment, this precious time could be the difference between life and death. Not all CEBP will be this dramatic, but it could be the difference between a manufacturer being able to fulfill an order or a retailer being able to replenish inventory for the holiday season.

Understanding communications-enabled business processes (CEBP) with unified communications

Unified communications (UC) has gone through several market transitions since its inception. Over the past few years, we've heard terms like "integrated communications," "IP communications" and "unified communications and collaboration" as terms that further the definition of UC. The latest evolution of UC is something known as communications-enabled business processes (CEBP). But CEBP needs to be better understood to have it be more broadly adopted.

Glossary (UCMA 4.0 SDK)

Term
Definition
Activated Conference
A conference that has at least one participant. A conference becomes activated when the first participant joins the conference. Conferences are deactivated after the last participant leaves the conference. Any conference properties that have changed while the conference was activated are lost after the conference is deactivated.
ApplicationEndpoint
An endpoint type that is principally used by server applications, and that provides communication and collaboration services for end users. An ApplicationEndpoint is designed for high availability and resiliency against dialog route failure and is trusted by Lync Server 2013. Because an ApplicationEndpoint is trusted, an application using this endpoint type must be provisioned before it is deployed. Provisioning ensures that the relevant information needed for the application and Lync Server 2013 is in persistent stores such as Active Directory and the Central Management Store (used by Lync Server 2013).
The trust relationship that an ApplicationEndpoint has with Lync Server 2013 makes it possible for any Lync Server 2013 Front End server to reach such an endpoint directly, which makes an ApplicationEndpoint more reliable than a UserEndpoint. If the preferred registrar of a UserEndpoint ceases operation, up to two minutes can elapse before other servers can be made aware of the problem. Although an ApplicationEndpoint is more reliable than a UserEndpoint, there are some operations that a UserEndpoint can perform that an ApplicationEndpoint cannot. For example, an ApplicationEndpoint cannot publish presence or schedule conferences on behalf of another user, or receive calls for specific users. For these purposes, an application must use a UserEndpoint object in conjunction with a trusted server platform.
An ApplicationEndpoint can also be used for some limited scenarios that do not involve Lync Server 2013.
Back-to-Back User Agent
A back-to-back user agent allows one party (typically known as the call controller) to set up and manage communication between two or more other parties. A back-to-back user agent is also known as a third-party call control (3PCC) in telephony.
Branch Office (BO)
In unified communications terminology, any remote location other than the Data Center that hosts the user agent for communications.
Browser
The object that sets up an audio user interface that callers use to communicate with (“browse”) an IVR application, which is composed of one or more VoiceXML documents. A VoiceXML Browser contains a VoiceXML interpreter and includes APIs that provide access to telephony and audio resources that facilitate communication with a caller. The terms “Browser” and “VoiceXML Browser” are used interchangeably in this documentation.
Call
A communication session between the local endpoint and a remote endpoint. The Call abstract class provides the base class implementation needed to handle a Session Description Protocol (SDP)-based communication session. The SDP is used to negotiate media characteristics between the two endpoints. The base Call class implements the common functionality that is independent of the media types involved, and this functionality can be leveraged by derived classes. InstantMessagingCall and AudioVideoCall are two subclasses that are provided by the Microsoft Unified Communications Managed API 4.0 for instant messaging and audio-video sessions. A call always belongs to a conversation.
The Call, MediaProvider, and MediaFlow abstract classes are the building blocks of the communication framework. A developer can create classes that are derived from these abstract classes to extend the UCMA platform, to establish a media channel between two endpoints for arbitrary media types.
CallFactory
A call factory is used to create a call to handle a collection of media types. By default, the UCMA platform incorporates two call factories to handle the creation of InstantMessagingCall and AudioVideoCall instances. An application can remove these factories or add new custom call factories, although call factories that are registered with the platform cannot overlap in the media types supported. For simplicity, only incoming sessions with active media types that are supported by a registered call are exposed to the application. Incoming sessions with media types not supported by a registered call are rejected automatically by the UCMA platform.
Call Admission Control (CAC)
Industry-standard terminology for controlling the creation of new calls, based on business rules (policy) that are coordinated through a policy distribution point (PDP) and enforced by a policy enforcement point (PEP). Call Admission Control can be used to manage bandwidth usage in an organization.
Call Parking
A user involved in a two party audio call can park a call at a Call Park server so that the call can be retrieved at another device or by another user. Typically, the user who parks the call is given an "orbit" number that uniquely identifies the parked call. The call can be retrieved by any user who has the orbit number. The user whose call is parked typically hears music while waiting for someone to retrieve the call. The Call Park server provides the means for users to be able to park and retrieve calls. This concept is typically applied to audio calls, but can be extended to other media types when appropriate.
CollaborationPlatform
The CollaborationPlatform class is the foundational class for any application built using UCMA. This class is used to initialize the platform with such settings as listening port, the certificate to be used, and the list of trusted servers or domains. It is responsible for managing connections between servers (connection pooling, connection throttling), establishing trust with Lync Server 2013 computers, and providing extensibility to calls of different modalities, such as audio and instant messaging.
A CollaborationPlatform instance represents one SIP stack instance. An application cannot create an endpoint without first creating a collaboration platform. Although a single platform instance is sufficient for most applications, it is possible to create multiple instances of the platform. Typically, this is useful for supporting Mutual TLS and TCP for connections. Creating more than a small number of platform instances is not recommended because memory consumption increases significantly with each instance.
There are two types of collaboration platform that are available. A client platform can be used for quick prototyping or to develop a tool to simulate a large number of client instances that target an application server. This is useful to measure the performance of an application server built using the UCMA platform. A server platform is typically used for a production application that might run on multiple servers. The server platform enables sharing of connections across multiple endpoints and enables the application to accept incoming connections from trusted sources. To create an application that is trusted by Lync Server 2013, it is important to provision the application so that persistent information for the trust relationship is created in persistent stores such as the Active Directory or Central Management Store. A trusted application server can create application endpoints or user endpoints that are not challenge for user credentials.
Conference
A conference represents an online meeting place for participants to discuss topics of interest, using one or more media types, such as instant messaging or audio-video. A conference organizer typically schedules a conference in advance by using a Web application or add-in tools for e-mail programs such as Microsoft Outlook. An impromptu or ad hoc conference can also be created. A conference becomes active when the first participant joins the conference. Conference participants who are neither leaders nor the organizer are called attendees. A conference leader typically has more control over a conference than an attendee. For example, only leaders have the ability to mute all participants or admit or deny entrance to users who are in the conference lobby.
Conference Leader
A conference participant who is able to can perform certain privileged operations on an activated conference. However, a conference leader cannot eject the conference organizer from the organizer’s own conference.
A pre-invited leader is a participant whom the conference organizer has designated as a leader, when the conference is being scheduled. Such a person becomes a leader when he or she joins an active conference.
Conference Lobby
A conference can be controlled by the organizer or presenter so that new users who join the conference are placed in a virtual Conference Lobby instead of being directly connected to the conference. The Leader has the ability to see those users in the lobby and can selectively admit certain users from the lobby into the conference, and deny admission to others.
Lobby participants are unable to admit themselves into the conference or perform conference commands such as mute, unmute, lock, unlock, and others.
Conference Organizer
The person who schedules the conference. A conference organizer always joins his or her conference as a conference leader. A conference can be cancelled or modified only by its organizer.
ConferenceServices
The ConferenceServices class offers a variety of services related to the management of conferences before they become active. Users can create a scheduled conference, modify an existing conference before it becomes active, or delete a previously scheduled conference.
ConferenceSession
The ConferenceSession class can be used for joining either an ad hoc conference or a scheduled conference. The conference is hosted by the Focus, which is responsible for enforcing conference policies as specified by the conference organizer. The conference session allows a user to perform a variety of operations within a conference to change the characteristics of an active conference. For example, the leader of the conference can eject a participant or can lock the conference to prevent new participants from joining it. Lync Server 2013 uses the Centralized Conferencing Control Protocol (C3P) for implementing the primitives needed for the conference.
Contact
A contact is usually another user who has the ability to use real-time communications, but can also be an application, such as a "bot" or a Help Desk service.
Users of real-time communications often maintain a list of "buddies" (or contacts in Lync Server 2013 terminology) with whom they frequently communicate. Every contact has a uniquely identifiable SIP URI and display name, as well as other attributes.
The contact list can exist in different stores such as e-mail servers or Communications Server backend stores. UCMA provides an API for managing contacts that are stored in the Lync Server 2013 backend stores. An application written using UCMA can use other mechanisms as well, if necessary.
An application can organize its contacts into contact groups, and usually subscribes to the presence (the online state of the contact) of users in a contact list.
A contact is different from an Active Directory contact object.
Contact Group
A contact group is a logical group of contacts controlled by the user.
ContactGroupServices
The ContactGroupServices class contains methods that can be used to add, delete, or update contacts and groups. The class is available only to UserEndpoint instances. It is not available to ApplicationEndpoint instances.
Conversation
A conversation represents a multi-party, multi-modal communication context between a local participant and one or more remote participants. A conversation involving only one remote participant is called a two-party conversation. The Conversation class manages and coordinates between components such as calls, the conference session, MCU sessions, and media providers that are needed for the communication experience. A conversation that involves more than two participants involves a conference session. A two-party conversation is normally escalated into a conference when it is desired to add a new participant or a new modality that requires the services of an MCU.
Contact Object
An Active Directory contact object represents a communication and collaboration-enabled service. Similar to a user object, an Active Directory contact object is assigned a SIP URI, Display Name, and telephone number, and belongs to an Lync Server 2013 pool.
An application can also have a dedicated SIP URI assigned to it based on an Active Directory contact object entry for the application, similar to an end user having a SIP URI in the Active Directory user object that represents the user. Note that an Active Directory contact object is unrelated to a contact.
ConversationParticipant
A conversation participant represents an information worker or a communication-enabled service (local or remote) engaged in a conversation. It exposes properties of a participant such as the URI, network source, phone URI, and endpoints of the participant in the conversation.
DNS Load Balancing
Hardware load balancers are typically used to balance the load among a set of computers that are configured behind the load balancer. Because configuring hardware load balancers can be difficult at times, the UCMA platform supports Domain Name System (DNS) load balancing to avoid the use of hardware load balancers. In DNS load balancing, a set of IP addresses are assigned to a specific fully-qualified domain name (FQDN). The UCMA platform distributes all calls to the given FQDN among the various computers who share that FQDN (but have different IP addresses).
DTMF (Dual-Tone Multi-Frequency)
Tones produced by touching keys on a phone. IVR applications may allow a caller to provide information by speaking or by entering touch tones, or both.
Enhanced Presence
The presence information as represented by category instances supported by Lync Server 2013. The enhanced presence data model provides the presence publisher with a more flexible and more granular control of how presence can be tracked by other users.
Enhanced Presence Schema
An XML schema that defines the structure of enhanced presence data represented by the value of a category instance as XML elements and attributes. The schema helps an application create, parse, and validate the enhanced presence data before publication, or after receiving a fresh set of information as the result of a subscription.
Focus
In Lync Server 2013, the Focus represents an active conference. The Focus is created when the first user joins the conference. The Focus is responsible for authenticating users, supplying the roster, and enabling indirect communication with Multipoint Controller Units (MCUs) that support different media types, such as an AudioVideo MCU, an InstantMessaging MCU, or a Data MCU. The Focus is responsible for ensuring that conference policies and settings are followed by all participants of a conference.
Focus Factory
In Lync Server 2013, the Focus Factory is a component that offers conference creation, conference deletion, and conference update services for users. The ConferenceServices class communicates with the Focus Factory to offer its services.
GRUU
A Globally Routable Unique URI (GRUU) represents a URI that can be used to uniquely address an endpoint or an application process in the Lync Server 2013 infrastructure. When an endpoint registers with Lync Server 2013, it is dynamically assigned a GRUU (a registered GRUU) that can be used to route messages to that specific endpoint.
An application that is provisioned so that it is trusted by Lync Server 2013 also is assigned a static GRUU in the back end storage used by the server. This static GRUU uniquely addresses a specific process on a machine. A message that is routed by Lync Server 2013 to the process using this static GRUU can have additional information that identifies an endpoint that is hosted in that process. The UCMA platform uses this additional information to route the message to that specific endpoint. If the additional information is not present, special rules are used to route the message to an endpoint, if possible. For example, if an application endpoint is designated as the default endpoint (by a value of true in its IsDefaultRoutingEndpoint property), messages without the additional endpoint-specific information are routed to this endpoint.
If an endpoint is registered and has a registered GRUU assigned to it, and the platform has a static GRUU assigned to it, the registered GRUU is used only for operations related to presence publication. The static GRUU is used for all other operations.
Grammar
A list of words or phrases that an application will recognize. A VoiceXML application might use multiple grammars, each of which defines what a user can say for a portion of a call. Other grammars might be active across multiple portions of a call.
A grammar can assign meanings to words, typically assigning the same meaning to multiple words. For example, the spoken words “Yes”, “Yup”, “Yeah”, “You Bet”, and “Affirmative” can all be given the meaning “Yes”.
UCMA 4.0 supports XML-format grammars that conform to the Speech Recognition Grammar Specification (SRGS) Version 1.0. Grammars may be included inline in a VoiceXML document, or may be separate files that the VoiceXML document references with links.
Host Application
A .NET application that contains a Browser and can process the markup language in VoiceXML documents.
LocalEndpoint
An endpoint represents the basic communication unit needed by a user or application to perform any meaningful operations in the UCMA. An endpoint is created in the context of a collaboration platform. The UserEndpoint and ApplicationEndpoint classes are two subclasses of the LocalEndpoint class.
LocalOwnerPresence
The LocalOwnerPresence class can be used to manage the presence of the local (self) presentity. A presentity can use this class to publish presence categories, subscribe to self presence notifications, and assign and manage access control lists.
McuSession
A multipoint controller unit (MCU) is a server component that offers media specific services in a conference. For example, an AudioVideo MCU is useful for mixing audio of the participants in a conference. In the UCMA 4.0 SDK, the McuSession class is the base class that provides services to control an MCU. The InstantMessagingMcuSession and AudioVideoMcuSession classes are concrete platform implementations that extend the McuSession class. MCU-specific commands such as ejecting a user from a specific MCU or requesting the MCU to send an invitation to a specific user (dial-out) can be issued using this class. An McuSession subclass instance cannot exist without a supporting ConferenceSession instance because communication with the MCU happens through the Focus.
MediaFlow
The MediaFlow abstract class represents a media channel that is created as a result of offer/answer exchange in a call. A media flow is created and managed by a media provider that is bound to a conversation. When a media flow is created, an application can configure the flow settings that are used when it generates the SDP needed for the invitation. The InstantMessagingFlow and AudioVideoFlow classes are platform-supplied concrete implementations of a media flow.
The Call, MediaProvider, and MediaFlow abstract classes are the building blocks of the communication framework. A developer can create classes that are derived from these abstract classes to extend the UCMA platform, to establish a media channel between two endpoints for arbitrary media types.
When a call is used to provide back-to-back services (also called third-party call control, or 3PCC), the provider bound to the call does not create the MediaFlow, because the media does not flow through the local endpoint.
MediaProvider
A media provider represents the media platform that offers support for a specific media type. The MediaProvider abstract class is the base class that must be derived from by media providers to extend media support for typical applications. The UCMA includes AudioVideoProvider and InstantMessagingProvider class implementations to enable the consumption of the audio and message media types. An application does not need to create or deal with provider instances directly. The media provider implementations built into the UCMA for audio and instant messaging are internal and cannot be accessed by the application.
The Call, MediaProvider, and MediaFlow abstract classes are the building blocks of the communication framework. A developer can create classes that are derived from these abstract classes to extend the UCMA 4.0 platform, to establish a media channel between two endpoints for arbitrary media types.
MediaProviderFactory
A media provider factory is used to create media providers. By default, the collaboration platform supports the creation of platform-supported media providers to handle calls. An application that is intended to support a custom media type should register a factory instance that is responsible for creating an appropriate MediaProvider type to handle the custom media type.
Player
An audio device in UCMA 4.0 that plays a pre-recorded audio file to communicate with a caller.
Pool
A collection of one or more computers that are affiliated with a site and serve as an installation point for a service role. All computers in a pool are homogeneous in nature (the service roles installed on all of the computers in the cluster are identical). For example, a pool for Lync Server 2013 can have a pool FQDN assigned to it that points to one or more Front End servers to enable load balancing.
Presence Category
Provides the basic identification of the kind of data that is published. A category name is an identifier of the contract between publisher and subscriber. It identifies the nature of the published data, and implies an agreed-upon schema for how the data should be interpreted. Some of the predefined categories in Lync are note, contactCard, calendarData, state, and device.
A presence category represents a type to capture specific Rich Presence Data. A number of categories are defined and used in the Lync Server 2013 infrastructure. Some of the categories are Note, ContactCard, CalendarData, UserState, and DeviceState. Each category has metadata that is interpreted by Lync Server 2013 and includes such data as Category Name, expiry time, and instance ID. In addition, a category instance carries actual data for that category that is used and interpreted by some server components and clients. Each category has well defined XML schema and semantics associated with the various fields.
Presence Category Expiry Policy
Indicates the lifetime of a category publication. The publication lasts until it is unpublished.
Presence Category Instance
Enables the publication of the same category of data multiple times by the same publisher.
It is sometimes desirable to publish multiple instances of a specific presence category from one or more endpoints. Each publication carries a presence category instance that uniquely identifies the specific instance that is published. When a single instance across all of a user’s endpoints is to be published, a predefined instance number (such as 0) can be used for the publication. For example, an offline presence note is published by all endpoints using a specific instance ID.
Presence Category Version
Allows multiple clients that publish the same category instance to synchronize themselves. Each published item has a server-maintained version number. The publication is updated only if the publisher presents the current version number. The version number is then incremented atomically with the data update by the server.
Presence Container
A data structure that holds a set of published items and a membership list describing who can see those items. A presence container allows a publisher to publish different data values of the same category and instance for the purpose of allowing different subscribers to see different values. Containers are identified by container IDs. A set of well-known containers is defined for use by the Lync Server 2013 infrastructure.
Presence Document
The XML data that is defined by a schema and represented by the document object model (DOM). The presence document is used in the publication and subscription of enhanced presence.
Presence Information Document Format (PIDF)
This commonly used data format represents presence based on the rules specified in RFC 3863, and is used by Lync Server 2013 when presence notifications are delivered to a PIC user.
Presence Publication
A user publishes his or her presence data to inform other users that he or she is willing, available, or even able to communicate or collaborate with them. With Lync Server 2013, presence publication can be thought of as placing specified category instances in the appropriate category containers, at a specified membership scope.
Presence View
The RemotePresenceView class can be used to subscribe to remote presentities either persistently or through polling at possibly different intervals. Using this class, and application can obtain up-to-date presence information as often as it specifies. For example, the Contacts list should be a persistent subscription, updated immediately. In contrast, a conference call with two other participants does not need immediate update information, and can be set to poll every five minutes. The RemotePresenceView class is an alternative to the RemotePresence class.
The RemotePresenceViews maintains a list of active RemotePresenceView objects.
Presentity
An application or user whose presence information can be tracked. A presentity registers its status, location, and other attributes with Lync Server 2013.
Public Internet Cloud (PIC) User
A user on a public internet cloud service provider, such as MSN, AOL, or Yahoo!.
Publisher
A user who publishes his or her presence for the use of other users who subscribe to it. The enhanced presence model allows a publisher to publish presence in a more flexible way to control how the specified presence data can be received by different subscribers.
Recorder
An audio device in UCMA 4.0 that captures audio and records it to a file.
Session
Represents the contents of a phone call between a single user and an IVR application. A session begins when the hosting .NET application launches a Browser instance to process the documents in a VoiceXML application in response to an incoming phone call. A session ends when the Browser exits a VoiceXML document.
Session Description Protocol (SDP)
An RFC-based protocol that describes the offer/answer payload format for an INVITE-based session to indicate a variety of information such as the media types for the session, the codec formats that are supported, the bandwidth information, and security properties. For more information, see RFC 4566.
Session Initiation Protocol (SIP)
An RFC-based protocol for real-time communications, supported by Lync and Lync Server 2013. The UCMA platform supports SIP-based message abstractions. For more information, see RFC 3261.
Speech Recognition
The conversion of spoken words into text. UCMA 4.0 uses the speech recognition engines in Microsoft.Speech to match speech or keypad tones from callers to lists of acceptable input. Lists of acceptable input are contained in a grammar, see above. Speech recognition is also referred to as SR or ASR (automatic speech recognition).
Speech Synthesis
The conversion of text to computer-generated spoken words. Also known as text-to-speech (TTS). UCMA 4.0 uses the speech synthesis engines in Microsoft.Speech to speak text as instructed by a VoiceXML application. Speech Synthesis is also known as text-to-speech (TTS). An instruction to speak text in a VoiceXML application is also known as a prompt.
Subscriber
A presentity who subscribes to presence data published by another presentity. This documentation uses subscriber and watcher interchangeably.
Subscription
A long-lived session in which a presentity receives published presence data that the presentity has subscribed to. A presentity can elect to subscribe to its own presence data or to the presence data of remote presentities.
Tone Controller
An audio device in UCMA 4.0 that can receive or send telephone keypad tones during a call.
Uniform Resource Identifier (URI)
A URI represents an identity across multiple devices, either of an application or a user. URIs are used for routing in the Lync Server 2013 network. A SIP URI uses the sip scheme and a telephony URI uses the tel scheme. The UCMA supports both SIP and telephony URIs. A URI can also be used to refer to a specific device instance in advanced scenarios.
UserEndpoint
A UserEndpoint primarily represents an endpoint for a user with a SIP identity. This endpoint type enables an Information Worker to manage his or her contacts and groups, share his or her presence status, subscribe to the presence of others, schedule conferences, and communicate with others. An application can use a UserEndpoint instance to emulate an end user or to emulate large numbers of test clients in order to stress test an application built using the platform. A UserEndpoint instance must be used in conjunction with Lync Server 2013, because it depends on a variety of features and protocols supported by Communications Server.
Unlike an ApplicationEndpoint, a UserEndpoint is not automatically trusted, and must register with Lync Server 2013 components. This registration requirement has an impact on the reliability of the UserEndpoint in some scenarios. For more information, see the ApplicationEndpoint entry in this glossary.
VoiceXML Document
An XML-format file that contains markup language that conforms to the VoiceXML standard. A VoiceXML document is also called a VoiceXML page, and both terms are used in this documentation. For more information about VoiceXML, see VoiceXML 2.0.
VoiceXML Interpreter
Interprets the markup language in VoiceXML documents and passes the instructions in the markup language to the Browser, which transacts the actual communication with the caller.
Watcher
A presentity who subscribes to presence data published by another presentity. This documentation uses subscriber and watcher interchangeably.