Results 1 to 7 of 7
  1. #1

    is the adapter bidirectional?

    The adapter allows to send notifications with _listener.Update.
    Is there a way to listen for events?

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    If you mean client-originated events, yes, the involved method is NotifyUserMessage on the Metadata Adapter.
    Note that client-originated events are related with the client identity, so they don't pertain to the Data Adapter, but rather to the Metadata Adapter, which manages the user activity.

  3. #3
    thx Dario,

    I followed http://www.lightstreamer.com/docs/ar...sseo/index.htm , sessions is really needed I'd need to get a sort of session_id to send different data to each (clients)

    I guess I must start by implementing IMetadataProvider

    Thx for the help

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    A more complete example is the .NET Portfolio Demo Adapters, under
    DOCS-SDKs\sdk_adapter_dotnet\examples\Remote_Portfolio_ Adapters
    in the distribution package.
    There, the client-originated messages are used to simulate buy/sell operations.

  5. #5
    I was using the c++ or c# remote architecture because my data feeder is a c++/c# dll API.
    This whole architecture seems rather complex, I'd be tempted to wrap the feed API in JNI code and use the classic and simpler lighstreamer codes.
    Do you think one solution is better?
    Last edited by darch; March 20th, 2013 at 12:28 PM.

  6. #6
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Building Java inprocess Data Adapter and MetaData Adpater using C++ or C# dll via JNI is not prohibited and could be a workable solution.

    However, I would recommend the solution implemented by the remote adapter, this given the following considerations.
    Please note that the architecture with the remote adapters may seem more complicated but it leaves you with the only task of developing the adapters based on the Lightstreamer .NET library and you can forget about direct socket programming and network protocol. Furthermore, in this way you can add metadata and data adapters in a single process facilitating communication between them.

    Finally I would like to mention some potential issues regarding the use of JNI, the first concerns the possible crash of the external dll that sharing the same process will crash the Lighstreamer kernel too; the second concerns the mixed sharing of heap memory between JNI and Java.

    Hope that helps.

  7. #7
    thx, I think I'll try to do it like you say, though I'd have preferred Java

    the c++ portfolio adapter seems close to what I need (a LS app that tracks tick prices and orders per client, with a c++ Metatrader4 library)
    Each user has their own data, users don't share portfolio, a bit different so
    I would like to simplify it, because I'm not sure I need a Portfolio class that links the metadataAdapter to dataAdapter
    the issue is incoming messages comes in metadataAdapter, and the rest is in dataAdapter

 

 

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