Results 1 to 10 of 10

Hybrid View

  1. #1
    Member
    Join Date
    May 2009
    Location
    Madurai
    Posts
    10

    problem in establishing socket connection from adapter

    I need to establish a new socket connection with another server whenever a subscribe message comes to the adapter. That server will fire the events on the adapter. Then, the adapter will send notification to the client. If I establish socket connection while initializing the adapter, everything is working fine. Instead, If I establish the socket connection while adapter receives subscribe message, none of the events in adapter gets fired.

    Can anyone help me?


    Thanks in advance,
    Latha.P

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    Is the problem in some way related with Lightstreamer interfaces?
    In that case, may you please clarify how your Data Adapter behaves with respect to Lightstreamer interface?
    Are you talking about a Remote Adapter that uses the .NET interface?

    Just in case, I warn you that you cannot open a socket and wait for data on it in the body of a "susbcribe" call; you should do it on a different thread.

  3. #3
    Member
    Join Date
    May 2009
    Location
    Madurai
    Posts
    10
    I am talking about remote adapter(.Net) that implements "IDataProvider". We are using the "DotNetStockListDemo" sample coding only by doing some alteration as per our requirements. The process we need to do is, whenever a client logon through browser, we will send logon message to another external server to validate. That server doesn't reply to the request, but just fires an event as response and also will send notification to clients currently logged on. This all will happen in separate thread only. (Note : We need to establish a new socket connection whenever a client do logon)
    The way we are implementing this logic is, whenever a client logon through browser, client application will send logon message to "DotNetStockListDemo" application by calling "subscribe" function. From there, we will establish a socket connection with external server and send logon request. As mentioned above, none of the events gets fired. Is there any other better way to implement/resolve this? Kindly do help me to sort out this issue.

    Thanks,
    Latha.P

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    521
    hi Latha,

    I'm not sure i can understand your scenario.

    Please take a look at the general work-flow of how you should manage authentication and subscriptions in your Adapters. See Chapter 4 of "General Concepts.pdf". The Metadata Adapter will be notified of a new user logging on. It will be notified of any subscriptions made by that user too. On the other hand, the Data Adapter will be notified of any new subscription(that is, irrespective of the user provoking it) and has the role of injecting updates on the items related to such subscriptions.

    So, for your requirements perhaps you need to work on the Metadata Adapter, more than on the Data Adapter. You can find the source code of a .NET Metadata Adapter under "\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\src_metadata_adapter".

    Hope that helps.

    -Alessandro

  5. #5
    Member
    Join Date
    May 2009
    Location
    Madurai
    Posts
    10
    Hi,
    Thanks for your information. To use our own metadata adapter, what all changes I need to do on xml file & client application. If I use metadata adapter to connect a user with external server, how can i update client application when external server sends notification(because metadata adapter will only know the external server reference value). Kindly send me the samples if any.

    Thanks & Regards,
    Latha

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    All backend side links needed should be implemented on your side.
    The Metadata Adapter, once informed that a user has logged in, should communicate with your external server, get back the answers and send them to the Data Adapter, by connecting to the latter in some way.
    The Data Adapter could then use this data to answer to the subscription to a user-specific item. Note that you may have to wait for the user to eventually subscribe to that item before returning the data.

    If you want to simplify the process and connect to the external server from the Data Adapter, upon subscription of the user-specific item, this is possible. However, you should still ensure in your Metadata Adapter that the user-specific item can only be requested by the proper user.
    Did you try this way and did you have any problem?

    As we still can't understand your requirements, we can't point you to any of the available example code.

 

 

Similar Threads

  1. Hello World -- Socket
    By mohelal84@yahoo.com in forum Adapter SDKs
    Replies: 5
    Last Post: March 25th, 2015, 10:26 AM
  2. Replies: 4
    Last Post: February 3rd, 2011, 11:33 AM
  3. Silverlight Client Connection problem in IE
    By kkrisjoy in forum Client SDKs
    Replies: 7
    Last Post: December 17th, 2010, 10:30 AM
  4. Hello World Remote Socket Adapter
    By kclerc in forum Adapter SDKs
    Replies: 7
    Last Post: April 12th, 2010, 12:40 PM
  5. problem building example adapter
    By ebarnhorst in forum Adapter SDKs
    Replies: 1
    Last Post: May 7th, 2007, 06:07 PM

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 06:09 AM.