EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Some questions regarding the cache

Posted: 10/22/2013 08:54:51
by Andreas Pross (Standard support level)
Joined: 10/17/2013
Posts: 8

Is it possible to Access the Cache for a file within a callback?

The reason why I am asking:

I have a SQL Database. On Standard and Enterprise Edition, I have no Limit in database size and I will store all files within a regular nvarbinary(max) column.
I can read and write in chunks to that column.

But on SQL Server Express (which most of my customers will use), my Database size is limited. When I store the nvarbinary(max) column as filestream, it doesn't Count on the Limit and I can read in chunks, but I can only write the entire file at once. I actually don't use filestream Feature to acces the files directly with Windows API cause this will only work with Windows authentication.

So what I have to do with SQL Express when writing a file,
I have to retrieve the entire file first, cause I don't know if the application will rewrite the entire Content or just a part, but there is a big Chance it is already in the buffer of CBFS. Without the ability to Access the buffer within a callback, I have to retrieve the entire data of the file from the database again.

This has no priority, cause I don't think it will often happen that someone modifie files, but it may be usefull sometimes.
Posted: 10/22/2013 09:06:42
by Eugene Mayevski (Team)

You can't read the data out of the cache, but here's what you can do:

read (from the DB) only the part you need. If write request comes for this file, you read the rest to some intermediate storage and update the block in the read data. Once the file is closed (after writing to it), you flush everything from the intermediate storage back to the DB.

Sincerely yours
Eugene Mayevski



Topic viewed 720 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!