-
March 13th, 2012, 09:46 PM
#1
How to configure snapshot length?
I get confused on setting snapshot length. Where should it be defined, client or server side? Can you provide some examples?
Thanks
-
March 14th, 2012, 09:43 AM
#2
Some assumptions:
the snapshot size setting concerns only the DISTINCT subscription mode while for MERGE and COMMAND its size is inherent in the nature of the items data;
the snapshot size in DISTINCT subscription mode is an application level concept.
Client can ask a snapshot of specific length in accordance with its needs.
In server side both DataAdapter and MetaDataAdapter are involved.
MetaDataAdapter must return the maximum snapshot lenght in reply to getDistinctSnapshotLength(item) call by the server. This only to prevent the server processing is too long.
DataAdapter should collaborate by sending enough data for the initial snapshot in accordance to MetaDataProvider setting.
An example:
a client that display the latest news in a grid with 10 rows.
When client subscribe itemNews it asks a snapshot of lenght 10 in order to fill the grid with the last 10 news.
If getDistinctSnapshotLength(itemNews) return 10 or greater the server supplies the client with the last 10 news; but if getDistinctSnapshotLength(itemNews) return 5 the client will receive the last 5 news only.
Hope this help.
Giuseppe
-
March 14th, 2012, 01:39 PM
#3
What if the same data adapter set need to support various client applications and each client has different snapshot lenght requirement? For example, application A requires item X to have snapshot length to be 10 but application B requires item X to have snapshot length to be 30. How it should be setup in order to satisfy the above scenario?
Thanks
-
March 14th, 2012, 02:46 PM
#4
MetDataAdapter getDistinctSnapshotLength function must return the maximum allowed length for a Snapshot of an Item that has been requested with publishing Mode DISTINCT.
So since getDistinctSnapshotLength is specific for single Item the MetaDataAdapter must take into account the expected needs of all clients.
In the above scenario if MetDataAdapter getDistinctSnapshotLength function for item X return 50: application A will receive snapshot with length 10 and application B snapshot with length 30.
But if MetDataAdapter getDistinctSnapshotLength function for item X return 25: application A will receive snapshot with length 10 and application B snapshot with length 25.
The getDistinctSnapshotLength implementation must be a trade off between the need to satisfy all customer requests and the foresight to avoid stressful situations for the server.
Similar Threads
-
By msgiribabu in forum General
Replies: 1
Last Post: January 11th, 2011, 08:58 AM
-
By vaduganathan in forum Adapter SDKs
Replies: 8
Last Post: December 16th, 2010, 03:15 PM
-
By patilgkk in forum General
Replies: 5
Last Post: August 2nd, 2010, 09:04 AM
-
By riwang in forum Client SDKs
Replies: 3
Last Post: May 21st, 2009, 09:37 AM
-
By sukhdev in forum Adapter SDKs
Replies: 3
Last Post: August 1st, 2007, 08:44 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 12:56 PM.
Bookmarks