This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Ok, here is my dilemma. I have a single BINARY file that needs to be edited by myself and one other. We live hundreds of miles away from each other. We do not want this binary file to be located on our local PCs but instead somewhere we have access to anywhere there is an Internet connection. We want the ability to "lock" or "check out" the file to prevent parallel editing. We don't want to have to merge the file. Most importantly we want this to be free.
Here is my proposed solution. I have access to a bit of hard-drive space provided by my school. We use SSH via Putty to gain access. This is where I would like to store this binary file so we both have access to it. Then, I want to write a Java program that uses Putty to retrieve the file and to rename the "school" copy to [name].out. If my partner tries to use his version of this program, it will see that there is a file named [name].out and will return a message that the file is checked out thus denying access. When the file is checked in, it checks the upload was successful and if true deletes the [name].old. Now my partner can check the file out and that would mean I would be denied access.
Here is my problem. How in the heck can I get java to start Putty, log in via SSH, check a file name extension to check fo "checked out" status and if able, use commands to download a file from a specific directory and then rename the remote file?
I could get a scripting language to do it but then I have to get him setup with that engine (like ruby). I want to be able to give this to anyone as an executable (or Jar) and they would have the ability to check out this file.
David Newton wrote:Geez, just put it in a Dropbox public folder and use a lock file.
While you might know what that string of words means, I do not.
I guess that wasn't a question, so I won't answer.
Joined: Jun 05, 2009
While your statement is that you will not provide an answer to a non-question, your actions were to reply to the post and make the written statement of your unwillingness to answer a statement and that in an of itself qualifies as a response A.K.A an answer. Bazinga.