×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    23

    Question server client architecture

    Hi,

    I am designing a server client architecture in Symbian platform and it seems to get overly complicated.

    Basically I have 1. my application 2. Third party application and 3. agenda database, looks like I also need 4. agenda observer and 5. message relay server

    And all should work seamlesly together, both in S60 and S80.

    This is the way I am thinking about doing it:

    The application (1) will start a CServer object (5) which will relay messages, and it will give it a callback reference. Can normal class pointers can be passed through CSession interfaces?

    The application will register an agenda observer (4), which will in StartObserving function open a session into the server (5) too and pass a callback pointer to the CServer object.

    The third party application (2) will open a session into CServer object (5) and pass a callback object into it.

    Now when an event comes to agenda observer (4) from agenda DB (3), it invokes FooEvent in the server session (5), and the server will call all callback pointers it has to relay the message.

    Any way of reducing the number of different executables? Can agenda observer (4) and 'message distributor' (5) be combined into single dll? Is it possible to pass pointers between different executables through dll interfaces? What kind of thread safeguards should I use for communication between processes?

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143
    you can not use pointer too often between clients and servers, unless you always run all of the different modules in same process. Anyway, I would suggest using normal client/server message passing, unless the data size transfered is huge.

    Basically you need to start the client server connection from clients always, but you could have your server sending UserEvents to the clients to notify them on a event, so they would know to make the connection.

    Anyway, in case you are doing OS 7.0s you could have look into the paper in symbian site of new communications methods. Basically the publiser-subciper that is supported by OS 8.0, but is backported to OS 7.0s phones (except 6600), it might give you better possibilitie on your architectural desings.

    yucca

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    23

    Thanks for the help

    So what happens is that the pointer is passed, but the other process gets an access violation if it tries to use the pointer?

    File server RFs has has following method:
    TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey, CDir*& anEntryList) const;

    First three parameters are copied as the process border is crossed? But what happens with the fourth parameter anEntryList?

    From the description of the function "The function sets anEntryList to NULL, then allocates memory for it before appending entries to the list. Therefore, anEntryList should have no memory allocated to it before this function is called, otherwise this memory will become orphaned." you get an impression that the server and client can share memory?

    Or is it that kernel runs all applications as threads in a single process?
    Last edited by Onib; 2005-02-10 at 07:17.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    23
    I found the docs related to this, and they were actually quite helpful (using asynchronous services @ inter process communication @ base @ application protocols @ C++ API guide @ Symbian OS guide @ deleloper libary).

    Took some thinking though, in my opinion it's pretty complicated.

  5. #5
    Regular Contributor
    Join Date
    Dec 2004
    Location
    Mumbai
    Posts
    67

    UserEvents

    I just saw a mention of UserEvents, that can be sent from the server to client in the client/server architecture.

    I wanted to know how the server can send events to the clients. Any help would be appreciated.

    Thanx & Regards,

    Kamal

Posting Permissions

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