Storing Data on Server or Client in SilverLight4
-
Hi, I have a silver light application. I have some master data in database which is using extensivly on application especially when i print crystal reports. So i decided to store data on Server( through session etc) or on client to avoid database trips. I want to ask which is best option from perfomance point of view Option 1: Store all data on server( through session or application variables etc) and get data from server when needed for example while printing reports( I am using Crystal Reports12) Option2: Store all data on client ( e.g create a collection in silverlight on client and store all currencies in that collection) and when i want to print report and want to use that data pass this data( currency collection) to server along with other data( other arguments needed on server) through WCF services ( I am using WCF Services) Thanks
-
Hi, I have a silver light application. I have some master data in database which is using extensivly on application especially when i print crystal reports. So i decided to store data on Server( through session etc) or on client to avoid database trips. I want to ask which is best option from perfomance point of view Option 1: Store all data on server( through session or application variables etc) and get data from server when needed for example while printing reports( I am using Crystal Reports12) Option2: Store all data on client ( e.g create a collection in silverlight on client and store all currencies in that collection) and when i want to print report and want to use that data pass this data( currency collection) to server along with other data( other arguments needed on server) through WCF services ( I am using WCF Services) Thanks
-
You should also look at the Isolated Storage option. Here, you can store some amount of data (so long as it is not too large) and make it persist for some time (unless the client clears this storage area).
Thank you for suggestion. I want to get/transfer this data from database when user login and clears out when he log off ( As data may be change any time). Should i still consider Isolated storage option? and second thing storing data in Isolated storage means transfer data on client is good option . Am i right? Thank you & Best regards
-
Thank you for suggestion. I want to get/transfer this data from database when user login and clears out when he log off ( As data may be change any time). Should i still consider Isolated storage option? and second thing storing data in Isolated storage means transfer data on client is good option . Am i right? Thank you & Best regards
If the data is liable to change during the use of the application then you shouldn't really consider storing it in isolated storage. Take, for instance, stock prices - these change rapidly, so the data for this should be retrieved from elsewhere (e.g. a web service, or database if you are the one controlling the stock prices). If the setting is something like a user preference, then it does make sense to store this locally, but with it synchronised back to the server when the user updates it.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
If the data is liable to change during the use of the application then you shouldn't really consider storing it in isolated storage. Take, for instance, stock prices - these change rapidly, so the data for this should be retrieved from elsewhere (e.g. a web service, or database if you are the one controlling the stock prices). If the setting is something like a user preference, then it does make sense to store this locally, but with it synchronised back to the server when the user updates it.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
Thanks you for your suggestion. Data can be changed but not so frequently. You can say that when user login then if we have fetched data from database then its ok until he logg off( if data is changed between user login and log out then no need to update/syncronize). I shall use this data on different crystal reports which will print from server. so what i am thinking instead of fetching this data from database i shall use this from session (stored in any sevrver object) but other option may be tranfer all data to client machine and send back to server when it is needed to print on crystal report or wherever used on server( to decrease load on server). Which option will be best Either to store data on server or on client
-
Thanks you for your suggestion. Data can be changed but not so frequently. You can say that when user login then if we have fetched data from database then its ok until he logg off( if data is changed between user login and log out then no need to update/syncronize). I shall use this data on different crystal reports which will print from server. so what i am thinking instead of fetching this data from database i shall use this from session (stored in any sevrver object) but other option may be tranfer all data to client machine and send back to server when it is needed to print on crystal report or wherever used on server( to decrease load on server). Which option will be best Either to store data on server or on client
Think about it this way. If you store the data on the client and you have lots and lots of clients, then that's a lot of traffic you're going to be sending out, just to send it back to the server when you need to print the report. Is this acceptable to you, in terms of performance. Please note that there is no right answer that we can give you, it's going to depend entirely on your requirements, system architecture and so on. Saying that, if it were me, I wouldn't be transferring it backwards and forwards.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility