-
May 21st, 2009, 12:04 PM
#1
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
-
May 22nd, 2009, 12:14 PM
#2
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.
-
May 23rd, 2009, 11:41 AM
#3
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
-
May 25th, 2009, 10:24 AM
#4
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
-
May 26th, 2009, 06:32 AM
#5
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
-
May 26th, 2009, 05:12 PM
#6
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
-
By mohelal84@yahoo.com in forum Adapter SDKs
Replies: 5
Last Post: March 25th, 2015, 09:26 AM
-
By msgiribabu in forum Adapter SDKs
Replies: 4
Last Post: February 3rd, 2011, 10:33 AM
-
By kkrisjoy in forum Client SDKs
Replies: 7
Last Post: December 17th, 2010, 09:30 AM
-
By kclerc in forum Adapter SDKs
Replies: 7
Last Post: April 12th, 2010, 11:40 AM
-
By ebarnhorst in forum Adapter SDKs
Replies: 1
Last Post: May 7th, 2007, 05:07 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:21 PM.
Bookmarks