EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Safe CbFsDriverState Operations

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#19632
Posted: 03/31/2012 18:49:02
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

How will the CBFS automatically handle write and read operations during the various service states (CBFS_SERVICE_START_PENDING, CBFS_SERVICE_STOP_PENDING, etc.)? Instead of simply throwing / catching an exception, how would you advise handling such operations in each state?

Thanks in advance.
#19633
Posted: 04/01/2012 01:52:22
by Eugene Mayevski (EldoS Corp.)

CBFS doesn't know anything about where handlers are implemented so if your handlers can work in any unusual state, it's up to you to care about it. I would say that handlers just should not appear in such state first of all, i.e. if the service is stopped, - remove all virtual disks immediately, and don't mount anything until the server is fully started.


Sincerely yours
Eugene Mayevski
#19636
Posted: 04/01/2012 05:57:34
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

Quote
handlers just should not appear in such state first of all


Could you explain this? I'm not sure what you mean by a handler not appearing.

In the supplied examples, the UpdateDriverStatus() method is called to enable a button and update a status label. At no other place is anything special done, or not done, based on the status of the driver.

If I understand what you're saying, we should remove all disks if the status reaches CBFS_SERVICE_STOPPED without us knowing about it. Correct?

Does this mean that the ONLY status where read or write operations should be performed is CBFS_SERVICE_RUNNING?
#19637
Posted: 04/01/2012 06:29:44
by Eugene Mayevski (EldoS Corp.)

Maybe there's some misunderstanding here (due to quite condensed question).

There's no service beyond CBFS so the question is just not applicable. It's just the way the OS is designed that services and drivers are listed in the same manner (which makes you think there's a service inside).

In the supplied examples driver status and version is checked to show one of methods to know if the driver is installed. Of course you can do the same in your code if needed. However, the user should not manipulate the driver so all you actually need to know is whether the driver is installed. If it is installed yet doesn't work, then the best one can do is uninstall it, reboot the system and install the driver back (optionally telling the user not to go into what he doesn't understand and not to disable the driver).


Sincerely yours
Eugene Mayevski
#19638
Posted: 04/01/2012 06:39:52
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

Not sure why we're discussing services. I'm referring to the UpdateDriverStatus() method where the EXAMPLE uses enumerators with the word "SERVICE"... SERVICE_STATUS, CBFS_SERVICE_STOPPED, CBFS_SERVICE_RUNNING, etc.

Quote
Of course you can do the same in your code if needed.


This is what I am trying to understand... the "if needed" part...

Is it necessary to EVER check the status of the driver?
Or, should we simply care about "Installed" or "Not Installed?"
Since CBFS exposes the events, should we be doing something different based on the various statuses?

Sorry for the confusion.
#19639
Posted: 04/01/2012 06:57:18
by Eugene Mayevski (EldoS Corp.)

Quote
Fred Lackey wrote:
Or, should we simply care about "Installed" or "Not Installed?"


yes.


Sincerely yours
Eugene Mayevski
#19640
Posted: 04/01/2012 07:12:56
by Fred Lackey (Basic support level)
Joined: 03/03/2012
Posts: 16

Perfect! Thanks. =)
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 958 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!