-
December 26th, 2022, 04:40 AM
#1
And I have some projects that push some data to private address.
As I know, to push data to Lightstreamer, need setup my external api as Lightstreamer client and send data via SendMessage().
But I dont want to modify my api source code ? My solution is create another api, that will listen on private address and this api also is is Lightstreamer client. It will forward data to Lightstreamer via SendMessage() func.
But I have one client only, so this solution is best choice ? Any better solution in my case ?
-
December 27th, 2022, 09:30 AM
#2
Both the "Data Provider" and the "Data Adapter" are custom components.
According to Figure 2, the Data Adapter is a java class written by you, which communicates with the Data Provider (which represents some existing back-end process).
Hence, the way the two parts communicate should depend on the interface offered by the Data Provider. The Data Adapter should obey this interface and "adapt" it to the interface offered by Lightstreamer Server.
On the other hand, if you consider the Generic Adapter SDK, then you refer to a different architecture, shown in the "Adapter Remoting Infrastructure" document, which is a special case of the basic architecture.
In this case, you don't have to add a custom java class to Lightstreamer Server, but you have to setup a remote process which connects to Lightstreamer Server based on the specifications of the ARI protocol.
Then your process is free to communicate with the back-end, but then it should "adapt" the communication to the ARI protocol requirements.
Two ways to achieve the same goal; so you can choose based on your convenience.
That said, please clarify the part of your question related with the Metadata Adapter.
About the second question, if you have "one client only" and need to create "another api", that uses sendMessage, my understanding is that you need to use two LightstreamerClient objects in the same client application or page, which will open two sessions.
This is allowed.
This is not the "best choice", because, if you are bound to "one client only", then keeping the existing LightstreamerClient and integrating the sendMessage on it would be better.
But, as you say "I dont want to modify my api source code", using a second LightstreamerClient objects is still a legal choice.
But please clarify the client environment and the LS SDK in use, to add some context.
-
December 28th, 2022, 04:54 AM
#3
Thanks so much for your answer. It help me a lot <3
Similar Threads
-
By rperseguini in forum Client SDKs
Replies: 2
Last Post: August 19th, 2019, 02:37 PM
-
By jonasby in forum General
Replies: 2
Last Post: May 22nd, 2014, 05:27 PM
-
By gengliangyu2008 in forum General
Replies: 2
Last Post: November 10th, 2010, 10:40 AM
-
By EWANG in forum Client SDKs
Replies: 1
Last Post: June 30th, 2009, 08:54 AM
-
By tuongkha in forum Adapter SDKs
Replies: 2
Last Post: March 18th, 2008, 09:11 AM
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:22 PM.
Bookmarks