Jump to: navigation, search

Difference between revisions of "UBIK Push Web Service"


 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A normal data web service (Content Service) delivers data when it is asked for it (for example by calling GetNextContentLevel). In contrast the '''Push Service''' is responsible for '''pushing''' data to every client.
+
[[File:IC Push Notification Service 01.png|thumb|220px|Push Service]]
 +
A normal data web service ([[UBIK Content Web Service]]) delivers data when it is asked for it. In contrast the '''Push Service''' is responsible for '''pushing''' data to every client.
  
The Push Service acts as a central data hub and has a set of methods to get the update information, containing the data that must be pushed to the client defined by its [[#Push Criteria|criteria]], by the sequence and by the last known status.
+
The push service acts as a central data hub and has a set of methods to get the update information, containing the data that must be pushed to the client defined by its [[#Push Criteria|criteria]], by the sequence and by the last known status.
  
The Push Service is aware of known devices and users and delivers the situation relevant update information. The service is capable of persisting the update data in the {{UBIK}} system as the Push Service must deliver the correct data for every client.
+
The push service is aware of known devices and users and delivers the situation relevant update information. The service is capable of persisting the update data in the {{UBIK}} system as the push service must deliver the correct data for every client.
  
 
== Push Triggers ==
 
== Push Triggers ==
The Push Service supports following update triggers:
+
The service supports following update triggers:
 
* Force update of single Content
 
* Force update of single Content
 
* Force update of children of Content
 
* Force update of children of Content
Line 15: Line 16:
  
 
== Push Criteria ==
 
== Push Criteria ==
The Push Service supports following criteria:
+
The service supports following criteria:
* Sequential
+
{| class="wikitable sortable" style="width:60%"
* Device dependent
+
|-
* User dependent
+
! style="width:20%" | Name !! style="width:50%" | Purpose
* ''Location dependent (future version)''
+
|-
 +
| Sequential || If set, data will be pushed only once
 +
|-
 +
| Device dependent|| Filter on a [[Satellite|satellite]] object
 +
|-
 +
| User dependent || Filter on a [[Login]] object
 +
|-
 +
| Application name || Filter on an [[Application]] object
 +
|-
 +
| Context name || Filter on a [[Context]] object
 +
|-
 +
| Location dependent|| ''(future version)''
 +
|}
  
 
== Configuration ==
 
== Configuration ==
 
=== Service ===
 
=== Service ===
The {{UBIK}} Push Service is available since Version 2.3.1.
+
The {{UBIK}} Push Service is available since Version 2.3.1. As the Push Service uses the same configuration as the {{UBIK}} Content service it is recommended to configure the push service in the same folder as ''UBIKContent.svc''.
As the Push Service uses the same configuration as the UBIK Content service it is recommended to configure the Push Service in the same folder as UBIKContent.svc.
+
The File 'UBIKPush.svc' contains the basic definition of the service:
+
  
 +
The File ''UBIKPush.svc'' contains the basic definition of the service:
 
<source lang="xml">
 
<source lang="xml">
 
<%@ ServiceHost Language="C#" Debug="true" Service="UBIK.Service.UBIKPush" CodeBehind="UBIKPush.svc.cs" %>
 
<%@ ServiceHost Language="C#" Debug="true" Service="UBIK.Service.UBIKPush" CodeBehind="UBIKPush.svc.cs" %>
Line 32: Line 44:
  
 
=== Endpoint ===
 
=== Endpoint ===
The Endpoint of the Push Service must be configured in the Service section of the Web.Config file:
+
The Endpoint of the push service must be configured in the ''service'' section of the ''Services.Config'' file:
 
+
 
<source lang="xml">
 
<source lang="xml">
<configuration>
+
<services>
  <system.serviceModel>
+
...
    <services>
+
  <service name="UBIK.Service.UBIKPush" behaviorConfiguration="httpBehavior">
    ...
+
    <endpoint address="" behaviorConfiguration="httpBehavior" binding="webHttpBinding" contract="UBIK.Service.IUBIKPush" />
      <service name="UBIK.Service.UBIKPush" behaviorConfiguration="httpBehavior">
+
    <endpoint address="/SOAP" binding="wsHttpBinding" contract="UBIK.Service.IUBIKPush" />
        <endpoint address="" behaviorConfiguration="httpBehavior" binding="webHttpBinding" contract="UBIK.Service.IUBIKPush" />
+
  </service>  
        <endpoint address="/SOAP" binding="wsHttpBinding" contract="UBIK.Service.IUBIKPush" />
+
</services>
      </service>  
+
    </services>
+
  </system.serviceModel>
+
</configuration>
+
 
</source>
 
</source>
  
 +
{{Attention|The endpoint and binding has to be configured for the Studio and Enterprise Service as well!}}
  
  
== Web Service Interface ==
 
In this section you can find some of the most important Web Service members. You can find detailed information about the all the members and about the data types in the UBIK Class documentation.
 
  
  
The WebService provides a method to add content to be pushed to the clients:
 
  
 +
== Web Service Interface ==
 +
The most important web service members are listed here, where more detailed information and a comprehensive list of all members and data types are located in the {{UBIK}} class documentation.
 +
 +
=== AddUpdateInformation ===
 +
The web service provides a method to add content to be pushed to the clients:
 
<source lang="csharp">
 
<source lang="csharp">
 
         /// <summary>
 
         /// <summary>
Line 70: Line 80:
 
</source >
 
</source >
  
 
+
=== DebugInfo ===
The Push Web Service provides access to its current status via a debug - info method. You can use this to get info about the current status of the Web Service.
+
The push web service provides access to its current status via a debug - info method. Use this to retrieve information about the current status of the web service.
This method can be executed via a Webbrowswer as well:
+
This method can also be called via a web browswer by browsing the according URL.
 
+
 
<source lang="csharp">
 
<source lang="csharp">
 
         /// <summary>
 
         /// <summary>
Line 86: Line 95:
 
</source>
 
</source>
  
 
+
=== Reset ===
There is a possibility to trigger a reinitialization (reset) of the Push Web Service from outside. This method can be executed via a Webbrowswer as well.
+
To trigger reinitialization (reset) of the push web service from extern, call this method via a web browser.
 
+
 
<source lang="csharp">
 
<source lang="csharp">
 
         /// <summary>
 
         /// <summary>
Line 102: Line 110:
  
 
== Future Prospective ==
 
== Future Prospective ==
Up to now (Version 2.3.1) there is no UI implementation for the Push Web Service. To guarantee an optimal integration of the Push Service to the UBIK Kernel a socket implementation of the Push Service is provided via the Environment. This socket class uses the web service methods to add data to the PushService. The Configura-tion of the WebService must be done as it is done for the LAS/GAS.
+
Currently there is no UI implementation for the push web service. To guarantee an optimal integration of the push service to the {{UBIK}} Kernel a socket implementation of the push service is provided via the environment. This socket class uses the web service methods to add data to the push service. The configuration of the web service must be done as it is done for the [[USAM|LAS/GAS]]. An instance of this socket class is provided via the {{UBIK}} environment.
An instance of this Socket class is provided via the Ubik Environment.
+
 
 +
== See also ==
 +
* [[HowTo:Configure_LAS_Authentication]]
 +
* [[HowTo:Configure_GAS_Authentication]]
  
[[Category:Publishing]]
+
[[Category:Publishing|UBIK Push Web Service]]
[[Category:Web Service]]
+
[[Category:Push|UBIK Push Web Service]]
{{Version|2.3.1}}
+
[[Category:Web service|UBIK Push Web Service]]

Latest revision as of 16:45, 26 November 2015

Push Service

A normal data web service (UBIK Content Web Service) delivers data when it is asked for it. In contrast the Push Service is responsible for pushing data to every client.

The push service acts as a central data hub and has a set of methods to get the update information, containing the data that must be pushed to the client defined by its criteria, by the sequence and by the last known status.

The push service is aware of known devices and users and delivers the situation relevant update information. The service is capable of persisting the update data in the UBIK® system as the push service must deliver the correct data for every client.

Push Triggers

The service supports following update triggers:

  • Force update of single Content
  • Force update of children of Content
  • Force removing of single Content
  • Force update of Infrastructure
  • Force update of Root objects
  • Force update of Metadefinitions

Push Criteria

The service supports following criteria:

Name Purpose
Sequential If set, data will be pushed only once
Device dependent Filter on a Satellite object
User dependent Filter on a Login object
Application name Filter on an Application object
Context name Filter on a Context object
Location dependent (future version)

Configuration

Service

The UBIK® Push Service is available since Version 2.3.1. As the Push Service uses the same configuration as the UBIK® Content service it is recommended to configure the push service in the same folder as UBIKContent.svc.

The File UBIKPush.svc contains the basic definition of the service:

<%@ ServiceHost Language="C#" Debug="true" Service="UBIK.Service.UBIKPush" CodeBehind="UBIKPush.svc.cs" %>

Endpoint

The Endpoint of the push service must be configured in the service section of the Services.Config file:

<services>
...
  <service name="UBIK.Service.UBIKPush" behaviorConfiguration="httpBehavior">
    <endpoint address="" behaviorConfiguration="httpBehavior" binding="webHttpBinding" contract="UBIK.Service.IUBIKPush" />
    <endpoint address="/SOAP" binding="wsHttpBinding" contract="UBIK.Service.IUBIKPush" />
  </service>     
</services>
IC Attention.pngThe endpoint and binding has to be configured for the Studio and Enterprise Service as well!



Web Service Interface

The most important web service members are listed here, where more detailed information and a comprehensive list of all members and data types are located in the UBIK® class documentation.

AddUpdateInformation

The web service provides a method to add content to be pushed to the clients:

        /// <summary>
        /// AddUpdateInformation provides the possibility to register data to be forwarded (pushed) to the clients
        /// </summary>
        /// <param name="data">Data which should be pushed to the clients, and criteria which must be fullfilled for pushing</param>
        /// <returns>true as adding the information was successfull</returns>
        [OperationContract]
        [WebInvoke(UriTemplate = "AddUpdateInformation", Method = "POST",
                   RequestFormat = WebMessageFormat.Json,
                   BodyStyle = WebMessageBodyStyle.Bare,
                   ResponseFormat = WebMessageFormat.Json)]
        bool AddUpdateInformation(PushUpdateDefinition data);

DebugInfo

The push web service provides access to its current status via a debug - info method. Use this to retrieve information about the current status of the web service. This method can also be called via a web browswer by browsing the according URL.

        /// <summary>
        /// Delivers info about the current status of the Push Service.
        /// </summary>
        /// <param name="token">authentication token</param>
        [OperationContract]
        [WebInvoke(UriTemplate = "DebugInfo/{token}", Method = "GET",
                   RequestFormat = WebMessageFormat.Json,
                   ResponseFormat = WebMessageFormat.Json)]
        string DebugInfo(string token);

Reset

To trigger reinitialization (reset) of the push web service from extern, call this method via a web browser.

        /// <summary>
        /// Resets the Cache of the Push Service
        /// </summary>
        /// <param name="token">authentication token</param>
        [OperationContract]
        [WebInvoke(UriTemplate = "Reset/{token}", Method = "GET",
                   RequestFormat = WebMessageFormat.Json,
                   ResponseFormat = WebMessageFormat.Json)]
        void Reset(string token);

Future Prospective

Currently there is no UI implementation for the push web service. To guarantee an optimal integration of the push service to the UBIK® Kernel a socket implementation of the push service is provided via the environment. This socket class uses the web service methods to add data to the push service. The configuration of the web service must be done as it is done for the LAS/GAS. An instance of this socket class is provided via the UBIK® environment.

See also