×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    10

    Server to client notification

    What is the best way of implementing server-to-client notifications in client(Rsessionbase)-server(CServer2) architecture. I know this can be done using asynchronous request from client to server, but is there any way that server can notify the client without client's explicit request.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Server to client notification

    Maybe you could try using property monitoring.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    10

    Re: Server to client notification

    Could you please provide some information about monitoring you suggested (which class is that), some documentation or an example that I could look at.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Server to client notification

    you could use RProperty API, just defined your property in the server, and use the Subscribe() function on the client side to get notifications on the changes.

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    10

    Re: Server to client notification

    If I am right, this is Publish & Subscribe mechanism.
    Last edited by RockyM; 2009-08-23 at 13:17.

  6. #6
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: Server to client notification

    Quote Originally Posted by RockyM View Post
    If I am right, this is Publish & Subscribe mechanism.

    Yes.

    It depends what you mean by 'explicit request'. There are several options for a client to be informed when the server has some information to push to it
    - the client passes a TRequestStatus and whenever the server has information to notifity the client of it signals the status.
    - the client passes a callback to the server (not directly, a callback can't go across the IP boundary, but it passes one to the client side proxy of the server)
    - the client subscribes to something from publish and subscribe


    However all 3 of these require the client doing something first, and have an element of the waiting for something (even if that waiting is done in parallel to performing some other actions). P&S is the one where the client is most decoupled from the server, but if its your server and your client, is decoupling to that extent necessary?

    There's more mechanisms if you want, a message queue for example. But better for you to state your precise requriements first if none of the above is sufficient.

  7. #7
    Registered User
    Join Date
    Aug 2009
    Posts
    10

    Re: Server to client notification

    The client and server run in separate processes. The most of the time client makes the requests and server responses to that requests. But sometimes server has to inform the client about some change (some data that server monitors have been changed). What is the most appropriate way of doing this? Is there some mechanism of notifications to which the client could subscribe, so that every time the change happens, the client is being informed, without reissuing request?
    Examples are appreciated also.

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Server to client notification

    What would be wrong with the method I already suggested ?, did you try it ?

  9. #9
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: Server to client notification

    Quote Originally Posted by RockyM View Post
    ..Is there some mechanism of notifications to which the client could subscribe....
    maybe there was a clue in one of the precise words your choose that should indicate yucca has already given you the answer?

Similar Threads

  1. XML onLoad with background http server problem
    By simonjuric in forum [Archived] Flash Lite on Nokia Devices
    Replies: 5
    Last Post: 2009-06-08, 16:47
  2. Replies: 10
    Last Post: 2008-02-01, 20:20
  3. Replies: 1
    Last Post: 2007-12-03, 23:54
  4. Bluetooth server and client
    By ug94bxs in forum Mobile Java General
    Replies: 4
    Last Post: 2007-01-01, 14:10
  5. Problem in reconnection from client to server
    By Palermo4Ever in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-06-19, 16:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×