EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Concurrency in Callback File System

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#12228
Posted: 01/28/2010 00:08:34
by Giovanni Aninon (Basic support level)
Joined: 05/16/2009
Posts: 11

Hello.

I implemented CBFS as a windows service. We started with the Mounter sample and modified/changed come codes. In OnStart(), we called the Start() function of Mounter. Everything works well except the following..

I placed log messages (using log4net) within each function of CBFS Mounter sample. I then have a separate program that calls/reads for example 10 files simultaneously from the virtual drive Z:. When I checked the log file, the files are not concurrently called inside FindVirtualFile method nor in CbFsOpenFile or CbFsReadFile methods. If they are processed concurrently, the log for each file should have showed differences by just a few milliseconds (maybe less than 100ms or less). Currently, each file request enters FindVirtualFile/CbFsOpenFile/CbFsReadFile in an interval of 200ms to 400ms leading me to believe that they are not processed/received by CBFS concurrently (I made sure that the calling program reads the files from the virtual drive at exactly the same time.).

I already tried the following:

mCbFs.SerializeCallbacks = false;
mCbFs.ThreadPoolSize = 100;

But still nothing changed.
Is there anything that I missed?

I hope someone can help me on this.
Thank you.
#12239
Posted: 01/28/2010 09:06:42
by Volodymyr Zinin (EldoS Corp.)

Hello,

Perhaps the problem isn't in CallbackFS. Could you give us your test code (both - the modified Mounter sample and the test app)?
Thanks.
#12269
Posted: 02/01/2010 05:28:00
by Giovanni Aninon (Basic support level)
Joined: 05/16/2009
Posts: 11

Hello Vladimir,

Thank you very much for your reply.
I have nowhere to ask for help on CBFS so, with approval from my boss, I would like to send to you the simplified code but I am not sure if this is the right channel to post (since this is a public forum). Can I send it to an email of yours or to an Eldos email?

Overview:
The test application which reads files from virtual drive Z: is GetFileFromVFS.sln. The CBFS Mounter modified code is VFS.sln.

Explanation:
The CBFS Mounter sample was modified and converted to a web service. For any file request, it will lookup the data from other sources (such as a database). In this test, I just removed the lookup and replaced it with Thread.Sleep(500) to simulate actual processing time of the lookup. Settings were added such as mCbFs.SerializeCallbacks = false and mCbFs.ThreadPoolSize = 100, to make sure that if many files are requested concurrently, then they should be processed concurrently for performance optimization.

Test Results:
A test application is created to read files from CBFS drive Z:. The results are shown in the image file attached (cbfs-concurrency-test.jpg). On the left side (in red box), 3 different files are requested simultaneously (up to milliseconds) using different threads by the Test Application that reads files from VFS. These files read from the CBFS should have been created almost simultaneously (if not, then maybe close to within 100ms difference).

Similar situation is observed in blue (5 files) and in all other files.

log4net logging:
In the VFS log (using log4net), it seems that there is no processing that is done concurrently (there is a big difference in milliseconds).

This is our first time with CBFS and any help will be greatly appreciated. We may have done something stupid in the CBFS Mounter sample code. We will appreciate any comments (we may haave simple code mistakes that we didn't noticed).

Attached is the Test Application that concurrently reads files from CBFS virtual drive. Please do inform me where I can send the modified Mounter code (perferarbly in an email).

Thank you very much for your time.


[ Download ]
#12270
Posted: 02/01/2010 06:28:23
by Eugene Mayevski (EldoS Corp.)

Moved to HelpDesk.


Sincerely yours
Eugene Mayevski
#12271
Posted: 02/01/2010 06:34:53
by Volodymyr Zinin (EldoS Corp.)

Hi Giovanni,

The topic has been moved to helpdesk. Please attach your test code there. No one except you and helpdesk staff can access it.
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 1617 times

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




|

Back to top

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

Got it!