Page 1 of 1

Handling large objects with WCF

Posted: Thu 13 Oct 2011 20:26
by s_tristan
I want to optimize uploading/downloading a large binary files with WCF client (Silverlight) and PgSQL. Except loading/saving a file entirely that will decrease server's memory performance, I want to do the same chunk by chunk. This is most important in SaaS scenarios.
Can you provide a small code example with best practice how can I do that?
Thank you!

Posted: Tue 18 Oct 2011 15:40
by Shalex
An example of storing binary data in and retrieving them from a database is available at http://www.devart.com/dotconnect/postgr ... lBlob.html.

Posted: Fri 21 Oct 2011 10:19
by s_tristan
Thanks for the example, but is uses non-chunked method for storing/retrieving blobs. Is there an example with "chunking" blobs into parts?

Posted: Tue 25 Oct 2011 10:57
by Shalex
There is a possibility for storing/retrieving blob to/from PostgreSQL server only entirely (as a whole). But you can read/write blob from/to memory in parts using the Read()/Write() methods of the PgSqlBlob class.