InterviewSolution
| 1. |
Solve : Limit network file sharing for one file type.? |
|
Answer» At work, 20 or so employees on different shifts share about a dozen different computers all over the SHOP. We need to share certain files, but we get into big trouble on one file type when someone opens up the file on another COMPUTER at the other end of the shop. We have lost major work on numerous occasions when someone opened up a file, then forgot and let it sit open. Then they went to another computer, worked the program for a day or two. Then after having saved and closed the program, someone else closes the earlier opened file and selects save, thus overwriting the newer file. The problem isn't the file type, but rather the program you are using with it. Contact the vendor and tell them their product is hopelessly broken. Unless the vendor is Adobe, in which case they "don't support networked file-sharing"I have thought about contacting the vendor, but I thought that there might be a simple windows fix. I'm not a networking person, but if the problem is simply our windows/network setup, then I thought we should look at fixing that first. Thus the reason I posted my question here. If I don't find the simple fix, then I will contact the company. BUT! I will not tell them that their program is "hopelessly broken." It is a powerful program and suits our needs perfectly except for this one problem. By your definition, I'm pretty sure that many other programs like notepad are also "hopelessly broken". Windows allows you to open multiple copies of a text file with notepad. If you save on one copy in notepad, but then later close and save a different copy of notepad(with the same file open), you have just overwritten the newer copy. You have the same problem with notepad that I earlier described. That functionality can cause problems, but I'll bet you don't stop using notepad. You simply work more carefully and try not to open multiple copies. The problem we have here is that we have too many employees working too many computers, so the being careful method sometimes fails. Like I said earlier Microsoft Office does it very well, while many other programs, like Microsoft Notepad does not. (If you don't believe me just try it. Compare MS Offive to MS Notepad.) Quote from: llmeyer1000 on December 17, 2011, 12:25:09 AM If I don't find the simple fix, then I will contact the company. BUT! I will not tell them that their program is "hopelessly broken." It is a powerful program and suits our needs perfectly except for this one problem. The possibility of finding some kind of workaround for your problem might be increased if you mentioned what this "powerful program" is called, and what version. Gibbscam Virtual Gibbs version 7.7 I didn't mention it at first because because I thought that it was most likely a simple file sharing issue that the answer would be the same for any particular file type. Our company is licensed for 8 copies of the 3D Mill version and one copy of the lathe program. We are completely legal, but ... The problem about contacting the vendor is that when the economy got bad a few years ago we stopped paying for support. The company is dragging it's feet about paying the $30,000.00 reinstatement fee for current support. I can't say that I blame them completely. The version we have still does the job for the most part and $30,000.00 is something to consider. I thought about digging through the registry to see how Microsoft Office does it so well, but I thought one of you guys might already have the fix. Quote from: llmeyer1000 on December 17, 2011, 01:49:51 AM Microsoft Office does it well because it's written properly. It's not because it has magical values in the registry or anything, but because it is actually programmed properly. And I'm not being "overly brash" when I say properly. The functionality is built into the Operating System- it's all part of the file management API, they just aren't using it properly; and they clearly don't test it properly if they didn't find this out. Basically, when it comes to networked drives/shared files, it all comes down to how it's opened. If a Program Opens a file with Sharing flags (Such as FILE_SHARE_READ, FILE_SHARE_WRITE) it means that other users of the program can open that file and read and write to it without issues. The contention is that the program understands that other instances of the program can do that. If other instances of the application reading or writing to the same file while the first one has it opens causes problems, the application shouldn't have passed the sharing flags. This is actually quite common; the developers ASSUME that the OS handles everything with regard to sharing files simply by virtue of passing the flag, but the flag really means the application is saying "Yes, it's ok for other people to open, read, and write the file, I know how to deal with those situations and am programmed in such a way to deal with it". I'm mildly surprised that a program that has such a high price point and support contract would be riddled with such an obvious issue that even I know about (I guess that's what you get when you have a bunch of enterprise developers, haha). As you might have guessed I have very low tolerance for ill-written software that can't even take advantage of something that was pretty much a solved problem by about 1993 (that is, networked file sharing), especially when said software is so expensive. But when you carve out a niche software market I guess you can set your own standards. So how can you fix the issue? Well, the way I see it, you can't, really. The issue boils down to the applications use of the dwShareMode parameter when it calls CreateFile() to open the file, setting it to READ/WRITE when the application in fact cannot deal with the contingencies that allowing other applications to do that represents. So the "fix" would be some sort of patch to make it so all the calls to CreateFile pass in 0 for the dwShareMode parameter, and then hoping the application at least handles a Permission denied error. For contrast, the way the Office apps (probably) do it, is they pass in FILE_SHARE_READ to CreateFile(), which allows other users and applications to read the file, but not write (or delete) it. Attempts to do that raise a error, and The office application has extra LOGIC in that case to DETERMINE who/what has the file open and where they are and display that message (for example if you try to change a document and save it when somebody has it open already, you get a prompt). BC I'm sorry that I did not get back sooner to read your reply. I hope to address this with Virtual Gibbs sometime soon. We are working on our management here to spend the bucks and reinstate our support with Gibbs. That may take a few months(knowing management here), but hopefully less. It's possible that Gibbs has already resolved the problem, but we have not received the fix because we are too far behind. Anyway, I do appreciate your explanation and will likely use your information in my future discussions with Gibbs. Thanks for the explanation! |
|