Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Jul 2013
    Posts
    39

    Arrow Guideline for ExceptionHandler

    Hi,

    You menitioned in "\DOCS-SDKs\sdk_adapter_dotnet\examples\Remote_StockListD emo_Adapters\Deployment\Deployment_LS(robust)\Stoc kList_sockets\adapters.xml":

    + RobustNetworkedMetadataProvider: "Moreover, this Metadata Adapter manages the case in which the remote counterpart is missing, by just refusing all new requests from the clients and storing all state change notifications that have to be sent to the backend (namely, session closing and table closing notifications). Meanwhile, this Metadata Adapter keeps waiting for a connection from a new remote server; upon connection, it will flush pending notifications, then start working normally."

    + RobustNetworkedDataProvider: "This Data Adapter also manages failures of the remote counterpart, by waiting for connection from a new remote server and trying to recover the data flow."

    I don't know how Remote .NET Adapter Server, Remote .NET Metadata Adapter, and Remote .NET Data Adapter work together with those "robust" proxies in case of failure? What is proper way to implement Server's ExceptionHandler to recover failure?

    I read in "DOCS-SDKs\sdk_adapter_dotnet\examples\Remote_Portfolio_ Adapters\src_standalone_launcher\StandaloneAdapter sLauncher.cs", you noted that:
    Code:
            // Notes about exception handling.        
            // 
            // In case of exception, the whole Remote Server process instance
            // can no longer be used;
            // closing it also ensures that the Proxy Adapter closes
            // (thus causing Lightstreamer Server to close)
            // or recovers by accepting connections from a new Remote
            // Server process instance.
            // 
            // Keeping the process instance alive and replacing the Server
            // class instances would be possible.
            // This would issue new connections with Lightstreamer Server.
            // However, new instances of the Remote Adapters would also be needed
            // and a cleanup of the current instances should be performed,
            // by invoking them directly through a custom method.
    It is very good if you can provide completed example for failure recovery at remote server side.

    Thanks.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    606
    Hi tvhnet2013,

    I attach below the example of a demo Adapters launcher (modified from the StandaloneAdaptersLauncher.cs) to handle cases of failure without exiting.

  3. #3
    Senior Member
    Join Date
    Jul 2013
    Posts
    39
    How should I implement RecoveryState() and CleanUp() methods?

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    606
    Hi tvhnet2013,

    The implementation of these two methods is strictly linked to the logic of your Adapters, and in the extreme case may well not be implemented.

    Anyway, in the RecoveyState() method you must provide all the necessary actions in order that the information contained in the old instance of the Adapter that you think is useful to keep, are returned to the new instance.

    The CleanUp() method simply must perform any necessary clean and close operations of the resources used prior to its disposal.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 11:37 PM.