Symbian3/PDK/Source/GUID-E6F08B67-8DBC-5896-946D-BD0D27F82FE2.dita
changeset 12 80ef3a206772
parent 9 59758314f811
child 14 578be2adaf3e
equal deleted inserted replaced
11:5072524fcc79 12:80ef3a206772
    12 <concept id="GUID-E6F08B67-8DBC-5896-946D-BD0D27F82FE2" xml:lang="en"><title>Views
    12 <concept id="GUID-E6F08B67-8DBC-5896-946D-BD0D27F82FE2" xml:lang="en"><title>Views
    13 of a Server Application System</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 of a Server Application System</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    14 <section id="GUID-AC0E13F3-5DFE-5060-BE09-B76A08632B5E"><title>Process view</title> <p>Client
    14 <section id="GUID-AC0E13F3-5DFE-5060-BE09-B76A08632B5E"><title>Process view</title> <p>Client
    15 objects, in the client, talk to server objects, in the server application.
    15 objects, in the client, talk to server objects, in the server application.
    16 The client and the server are in different processes. </p> <fig id="GUID-C5650791-6E61-5212-B563-42778AAEDE98">
    16 The client and the server are in different processes. </p> <fig id="GUID-C5650791-6E61-5212-B563-42778AAEDE98">
    17 <image href="GUID-08698D45-1F37-553A-9497-0081271535A1_d0e167629_href.png" placement="inline"/>
    17 <image href="GUID-08698D45-1F37-553A-9497-0081271535A1_d0e173722_href.png" placement="inline"/>
    18 </fig> </section>
    18 </fig> </section>
    19 <section id="GUID-1453B676-A271-5D89-80B4-88C8DBDEAF1C"><title>Service view</title> <p>The
    19 <section id="GUID-1453B676-A271-5D89-80B4-88C8DBDEAF1C"><title>Service view</title> <p>The
    20 diagram below shows the point of view of services which operate over the server
    20 diagram below shows the point of view of services which operate over the server
    21 application system. Services are things such as "printing", "send-as" and
    21 application system. Services are things such as "printing", "send-as" and
    22 "contacts selection", which offer useful functionality to applications. </p> <p>The
    22 "contacts selection", which offer useful functionality to applications. </p> <p>The
    23 server application framework provides generic service support over a client/server
    23 server application framework provides generic service support over a client/server
    24 link, upon which real services can be created. A service will typically provide
    24 link, upon which real services can be created. A service will typically provide
    25 a client-side interface that clients can use directly, and a server-side interface
    25 a client-side interface that clients can use directly, and a server-side interface
    26 that server applications have to implement. </p> <fig id="GUID-81435382-06BE-5057-A23D-EDDC829191E4">
    26 that server applications have to implement. </p> <fig id="GUID-81435382-06BE-5057-A23D-EDDC829191E4">
    27 <image href="GUID-CCC121FA-C180-5103-915D-583A0CE9FB45_d0e167645_href.png" placement="inline"/>
    27 <image href="GUID-CCC121FA-C180-5103-915D-583A0CE9FB45_d0e173738_href.png" placement="inline"/>
    28 </fig> </section>
    28 </fig> </section>
    29 <section id="GUID-A608EB50-672E-54B3-B438-BD42F7D3F191"><title>Symbian platform
    29 <section id="GUID-A608EB50-672E-54B3-B438-BD42F7D3F191"><title>Symbian platform
    30 component view</title> <p>The diagram below shows the Symbian platform components
    30 component view</title> <p>The diagram below shows the Symbian platform components
    31 involved in the server application support system. </p> <p>The core of the
    31 involved in the server application support system. </p> <p>The core of the
    32 server application framework support is in Apparc, built on the client/server
    32 server application framework support is in Apparc, built on the client/server
    47 of the server application framework can be used to start new application instances.
    47 of the server application framework can be used to start new application instances.
    48 Those based on Apparc's implementation must connect to a server application
    48 Those based on Apparc's implementation must connect to a server application
    49 which is already started. </p> <p>Applications will use the server application
    49 which is already started. </p> <p>Applications will use the server application
    50 framework appropriate for their platform. They may use whatever services are
    50 framework appropriate for their platform. They may use whatever services are
    51 available on that platform, subject to security restrictions. </p> <fig id="GUID-6D5FD60F-731C-57EB-9019-FEFD04EA29DC">
    51 available on that platform, subject to security restrictions. </p> <fig id="GUID-6D5FD60F-731C-57EB-9019-FEFD04EA29DC">
    52 <image href="GUID-D3F800F3-0818-5DF2-947C-AB8DE0C0053C_d0e167691_href.png" placement="inline"/>
    52 <image href="GUID-D3F800F3-0818-5DF2-947C-AB8DE0C0053C_d0e173784_href.png" placement="inline"/>
    53 </fig> </section>
    53 </fig> </section>
    54 <section><title>Client-server view</title> <p>The diagram below shows Apparc's
    54 <section><title>Client-server view</title> <p>The diagram below shows Apparc's
    55 implementation of the server application system from the client/server point
    55 implementation of the server application system from the client/server point
    56 of view. These are the points to note about this system: </p> <ul>
    56 of view. These are the points to note about this system: </p> <ul>
    57 <li id="GUID-1AAAFB86-9FF2-5E2E-90B6-675D38784A8E"><p>The basic client server
    57 <li id="GUID-1AAAFB86-9FF2-5E2E-90B6-675D38784A8E"><p>The basic client server
    76 sessions on client and server-side marshal parameters across the client server
    76 sessions on client and server-side marshal parameters across the client server
    77 link. Typically, the server-side will introduce a number of virtual functions
    77 link. Typically, the server-side will introduce a number of virtual functions
    78 to handle the client requests, which the server application must override
    78 to handle the client requests, which the server application must override
    79 and implement. </p> </li>
    79 and implement. </p> </li>
    80 </ul> <fig id="GUID-FBF5D23A-C44E-597D-8B85-9BAEACF55710">
    80 </ul> <fig id="GUID-FBF5D23A-C44E-597D-8B85-9BAEACF55710">
    81 <image href="GUID-866B69E6-8D4C-546F-B9C9-244AD8988DE5_d0e167767_href.png" placement="inline"/>
    81 <image href="GUID-866B69E6-8D4C-546F-B9C9-244AD8988DE5_d0e173860_href.png" placement="inline"/>
    82 </fig> </section>
    82 </fig> </section>
    83 <section id="GUID-4D0B549E-E11D-54E2-9D8C-90F04771FF48"><title>Security view </title> <p>This
    83 <section id="GUID-4D0B549E-E11D-54E2-9D8C-90F04771FF48"><title>Security view </title> <p>This
    84 section discusses security aspects of the server application support. Essentially,
    84 section discusses security aspects of the server application support. Essentially,
    85 both client and server need to protect themselves against malicious versions
    85 both client and server need to protect themselves against malicious versions
    86 of their counterpart that they may connect to. </p> <ol id="GUID-1E43D0D8-919E-5778-8C06-322C7049933A">
    86 of their counterpart that they may connect to. </p> <ol id="GUID-1E43D0D8-919E-5778-8C06-322C7049933A">
   104 <li id="GUID-D61DDBA1-9E29-53BC-9F3C-492A41ADEADF"><p>Service specific sub
   104 <li id="GUID-D61DDBA1-9E29-53BC-9F3C-492A41ADEADF"><p>Service specific sub
   105 sessions on the server-side should protect the server by checking the validity
   105 sessions on the server-side should protect the server by checking the validity
   106 of parameters received from the client. They should not assume that they are
   106 of parameters received from the client. They should not assume that they are
   107 talking to their equivalent class on the client-side. </p> </li>
   107 talking to their equivalent class on the client-side. </p> </li>
   108 </ol> <fig id="GUID-A040B1BF-AF99-5E41-B9F8-3245F54AD25C">
   108 </ol> <fig id="GUID-A040B1BF-AF99-5E41-B9F8-3245F54AD25C">
   109 <image href="GUID-8617B132-D8C8-5769-95B9-867815B45B18_d0e167817_href.png" placement="inline"/>
   109 <image href="GUID-8617B132-D8C8-5769-95B9-867815B45B18_d0e173910_href.png" placement="inline"/>
   110 </fig> </section>
   110 </fig> </section>
   111 <section id="GUID-8C154D80-591D-5834-93B0-A99E9EF4BCD2"><title>Sequence views</title> <p>The
   111 <section id="GUID-8C154D80-591D-5834-93B0-A99E9EF4BCD2"><title>Sequence views</title> <p>The
   112 following sections show sequence diagrams illustrating various dynamic relationships
   112 following sections show sequence diagrams illustrating various dynamic relationships
   113 between client and server application. </p> <p><b>Server application start</b> </p> <p>When
   113 between client and server application. </p> <p><b>Server application start</b> </p> <p>When
   114 a client wishes to establish a connection with a new server application, it
   114 a client wishes to establish a connection with a new server application, it
   127 tells the server a random number to use in the server name. The server name
   127 tells the server a random number to use in the server name. The server name
   128 is then generated from this random number and the UID of the server application.
   128 is then generated from this random number and the UID of the server application.
   129 Since both numbers are known to both parties, the combination can be checked
   129 Since both numbers are known to both parties, the combination can be checked
   130 for uniqueness and they can't be used to impersonate system servers. This
   130 for uniqueness and they can't be used to impersonate system servers. This
   131 name agreement system is therefore safe. </p> <fig id="GUID-DD480C95-45A1-5FE6-BDD6-A72E34BE0278">
   131 name agreement system is therefore safe. </p> <fig id="GUID-DD480C95-45A1-5FE6-BDD6-A72E34BE0278">
   132 <image href="GUID-5690EA18-106E-52E6-ABD3-4D5EE3CA8B23_d0e167865_href.png" placement="inline"/>
   132 <image href="GUID-5690EA18-106E-52E6-ABD3-4D5EE3CA8B23_d0e173958_href.png" placement="inline"/>
   133 </fig> <p><b>Service creation</b> </p> <p>Continuing from the previous diagram,
   133 </fig> <p><b>Service creation</b> </p> <p>Continuing from the previous diagram,
   134 this diagram shows the creation and use of a service specific sub-session
   134 this diagram shows the creation and use of a service specific sub-session
   135 between the client and server application. </p> <p>To use a service, the client
   135 between the client and server application. </p> <p>To use a service, the client
   136 must first create a service specific session. This happens during the call
   136 must first create a service specific session. This happens during the call
   137 to the <codeph>Connect…()</codeph> functions in <xref href="GUID-2E824A1A-078A-3D43-8B49-DF6328330B51.dita"><apiname>RApaAppServiceBase</apiname></xref> and <xref href="GUID-92F2DA99-0954-3399-9005-F3E817CB7E72.dita"><apiname>REikAppServiceBase</apiname></xref>.
   137 to the <codeph>Connect…()</codeph> functions in <xref href="GUID-2E824A1A-078A-3D43-8B49-DF6328330B51.dita"><apiname>RApaAppServiceBase</apiname></xref> and <xref href="GUID-92F2DA99-0954-3399-9005-F3E817CB7E72.dita"><apiname>REikAppServiceBase</apiname></xref>.
   140 no spare slots in the connect message, this UID is passed in the version field.
   140 no spare slots in the connect message, this UID is passed in the version field.
   141 The server application's override of the <codeph>CreateServiceL()</codeph> function
   141 The server application's override of the <codeph>CreateServiceL()</codeph> function
   142 is called passing in the UID of the requested service. The server application
   142 is called passing in the UID of the requested service. The server application
   143 can now instantiate it's implementation of the server-side objects for the
   143 can now instantiate it's implementation of the server-side objects for the
   144 service. </p> <fig id="GUID-7A6DB7F6-4CBC-5A69-A8E1-5BEF12911E20">
   144 service. </p> <fig id="GUID-7A6DB7F6-4CBC-5A69-A8E1-5BEF12911E20">
   145 <image href="GUID-84E742A8-2D24-55B8-A4DA-A67939A50754_d0e167895_href.png" placement="inline"/>
   145 <image href="GUID-84E742A8-2D24-55B8-A4DA-A67939A50754_d0e173988_href.png" placement="inline"/>
   146 </fig> <p><b>Service use</b> </p> <p>The diagram below shows the use of a
   146 </fig> <p><b>Service use</b> </p> <p>The diagram below shows the use of a
   147 service specific session between the client and server application. </p> <p>To
   147 service specific session between the client and server application. </p> <p>To
   148 use a service, the client-side implementation of the service sends service
   148 use a service, the client-side implementation of the service sends service
   149 specific messages to the server, which are passed to the service's interface
   149 specific messages to the server, which are passed to the service's interface
   150 in the server. This decodes the messages and calls virtual functions in the
   150 in the server. This decodes the messages and calls virtual functions in the
   151 server application's implementation of the service, to actually carry out
   151 server application's implementation of the service, to actually carry out
   152 the service. </p> <fig id="GUID-71C39EBC-EF06-5CA8-A7AC-ADD1BC8F562A">
   152 the service. </p> <fig id="GUID-71C39EBC-EF06-5CA8-A7AC-ADD1BC8F562A">
   153 <image href="GUID-68C4E5E5-65A2-51BC-B3DC-2B83D29212D4_d0e167911_href.png" placement="inline"/>
   153 <image href="GUID-68C4E5E5-65A2-51BC-B3DC-2B83D29212D4_d0e174004_href.png" placement="inline"/>
   154 </fig> <p><b>Server application lifetime monitoring</b> </p> <p>If the client
   154 </fig> <p><b>Server application lifetime monitoring</b> </p> <p>If the client
   155 application requires monitoring of the server application's lifetime, which
   155 application requires monitoring of the server application's lifetime, which
   156 it often will, it should implement the <xref href="GUID-1FE93B7E-FDA2-328A-A3A0-8C5351C1EF54.dita"><apiname>MApaServerAppExitObserver</apiname></xref> interface
   156 it often will, it should implement the <xref href="GUID-1FE93B7E-FDA2-328A-A3A0-8C5351C1EF54.dita"><apiname>MApaServerAppExitObserver</apiname></xref> interface
   157 and create a <xref href="GUID-DB7DF858-5380-368F-BDAD-F9B6CBA4A2CC.dita"><apiname>CApaServerAppExitMonitor</apiname></xref> to monitor a <xref href="GUID-2E824A1A-078A-3D43-8B49-DF6328330B51.dita"><apiname>RApaAppServiceBase</apiname></xref> derived
   157 and create a <xref href="GUID-DB7DF858-5380-368F-BDAD-F9B6CBA4A2CC.dita"><apiname>CApaServerAppExitMonitor</apiname></xref> to monitor a <xref href="GUID-2E824A1A-078A-3D43-8B49-DF6328330B51.dita"><apiname>RApaAppServiceBase</apiname></xref> derived
   158 connection to the server application. <codeph>CApaServerAppExitMonitor</codeph> opens
   158 connection to the server application. <codeph>CApaServerAppExitMonitor</codeph> opens
   159 a request for notification of exit to the server. When the server exits, this
   159 a request for notification of exit to the server. When the server exits, this
   160 notification will be completed. The <codeph>CApaServerAppExitMonitor</codeph> then
   160 notification will be completed. The <codeph>CApaServerAppExitMonitor</codeph> then
   161 runs and tells its observer that the server application has exited. </p> <fig id="GUID-5807A9C6-86FC-5779-BA9D-A490791E7EE5">
   161 runs and tells its observer that the server application has exited. </p> <fig id="GUID-5807A9C6-86FC-5779-BA9D-A490791E7EE5">
   162 <image href="GUID-3457B9BC-2F8F-55C1-9B5F-FA210D3439C6_d0e167942_href.png" placement="inline"/>
   162 <image href="GUID-3457B9BC-2F8F-55C1-9B5F-FA210D3439C6_d0e174035_href.png" placement="inline"/>
   163 </fig> </section>
   163 </fig> </section>
   164 <section><title>See also</title><p><xref href="GUID-940F3F6E-BA9C-5E19-9AC5-D848B5E175FB.dita">Application
   164 <section><title>See also</title><p><xref href="GUID-940F3F6E-BA9C-5E19-9AC5-D848B5E175FB.dita">Application
   165 Architecture Overview</xref></p></section>
   165 Architecture Overview</xref></p></section>
   166 </conbody></concept>
   166 </conbody></concept>