Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2008
    Location
    Englewood
    Posts
    4

    Subscription Problem, I think

    I am setting up a .NET client and things appear to be working but Lightstreamer is not distributing updates to the client. I think it might be a subscription problem but I am not sure if I understand the process correctly. I am using SimpleTableInfo but I either don't see a good description or I don't understand how it works.

    I have a database table to which I want to subscribe but like many implementations I have a twist. I have an existing subscription based system that I have to rely on t get my updates. This requires that I have to pass Lightstreamer subscription info and legacy subscription info to adapter.

    Here is what I am doing now:

    SimpleTableInfo tableInfo = new SimpleTableInfo(
    "dev|" + subKeys.InnerXml, //This is the table I need data from and the additional XML I need for my legacy system.
    "MERGE", //I am really kinda clueless what this should be so I left it with with the same values as the example I was working with
    "DEV_ID ROW_ID DEV_TYPE DESCRIPTION", //These are the table columns I am interested in
    false); //I am really kinda clueless what this should be so I left it with with the same values as the example I was working with

    tableInfo.SetRange(1, 1);

    client.SubscribeTable(
    tableInfo,
    new fidsDeviceListener(cliPage, updateDelegate, statusChangeDelegate));

    Hope this is a good start for my question.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    According to the above code,
    "dev|" + subKeys.InnerXml
    computes a "group name". It may be expanded into one or multiple "item names" depending on the way the Metadata Adapter manages it through the "getItems" method.
    If the Metadata Adapter that is currently configured is the LiteralBasedProvider, then the supplied "group name" is managed as a space-separated list of "item names". Custom Metadata Adapters can implement more complex mapping rules.
    The "item names" are used by Lightstreamer Server to call "subscribe" to the Data Adapter.
    Is it what you were expecting?

    Note: If setRange(1,1) is also left there from the previous example code, then it could be undesired and should probably be removed.

  3. #3
    Member
    Join Date
    Aug 2008
    Location
    Englewood
    Posts
    4
    What exactly does "group name" mean and how does it effect a subscription?


    Here is the data I am trying to subscribe to:

    I have a table that describes a hardware device which is really not different from any other database table. However I do need supply additional data information so that my legacy subscription system can be activated. That system will send data from our system into the Lightstreamer adapter. In that system I also need to pass the table name and a few keys(read as column names in a sql where clause). My legacy system can return any of the columns that have changed that are related to a particular hardware device.

    In my particular case I am interested in the following columns:
    "DEV_ID ROW_ID DEV_TYPE DESCRIPTION"

    So I might ignore some of the results from my legacy system. The "dev|" + subKeys.InnerXml is the table name and the keys I need to use for the dev table. I am currently parsing this data in the subscribe function in the adapter. I need a way to tell Lightsteamer the columns I am interest in and be able to communicate my legacy subscription system.

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

    For a definition of "group name", please see page 4 of "General Concepts.pdf".

    Basically, the workflow is this:

    1) When you subscribe to a table, your Client specifies a Group Name and a Schema Name.
    2) The Group Name and the Schema Name are passed to your Metadata Adapter, to be transformed into an Item Name List and Field Name List respectively.
    3) Each Item Name is used to perform a subscribe call to your Data Adapter, which must start providing data for such item, including all the possible fields that a Client could subscribe to for that item.
    4) The Server will dispatch the data for each subscribed item to the Clients, but sending only the fields that are comprised in the Field Name List.

    So you could use any string as the Group Name in order to include all the relevant information for your query. then you should decide how to transform the Group Name into a list of Item Names, while preserving all the query information that your Data Adapter needs.

    Hope that helps.

  5. #5
    Member
    Join Date
    Aug 2008
    Location
    Englewood
    Posts
    4
    Go it working. Thank. I ended up having to use the build item name and then parsing it in the adapter:

    itemdev_id,Row_id

 

 

Similar Threads

  1. re subscription
    By Pradeep Chahal in forum Client SDKs
    Replies: 3
    Last Post: March 24th, 2010, 09:35 AM
  2. Incremental fields subscription
    By Pradeep Chahal in forum Client SDKs
    Replies: 1
    Last Post: February 2nd, 2010, 11:11 AM
  3. Incremental fields subscription
    By Pradeep Chahal in forum Adapter SDKs
    Replies: 1
    Last Post: February 2nd, 2010, 10:23 AM
  4. subscription came to late
    By michaelvb in forum Adapter SDKs
    Replies: 1
    Last Post: May 29th, 2008, 11:07 AM
  5. Replies: 6
    Last Post: May 30th, 2007, 12:47 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 04:38 AM.