views:

208

answers:

6

We need to have documents shared between clients (CRM-like functionality). Users need to be able to:

  • Edit the documents and save them again
  • Attach new documents

Our application is coded in WPF with WCF for data-transport and NHibernate/SQL for data on the server.

what we're thinking is to use SVN and have the app create a local check-out of parts of the repository (when they click a document, it is checked out by SVN in the background and opened from the local path) - When saved it will silently (using monitoring of the path) be committed back to the repository.

Question: Is this feasible - or are there better solutions to this?

EDIT 1: Summary so far:

  • I'll look into using Git/Mercurial instead of SVN
  • Document size (revisions) might be prohibitive pending tests
  • SharePoint is an option (although not viable in my case as the cost alone is prohibitive) - I will look into the alternatives for SharePoint, tho.
  • Not much experience out there about using repositories for many users although it works for small teams..
  • Wiki software might be an alternative to SVN.

Thanks for all the feedback - I'll keep it open a bit longer.

EDIT 2: Summary after a few days of work - I have a client working - see my progress here.

+3  A: 

Based on the heavy .NET references, are you all set up with MSDN? Perhaps you can make use of SharePoint...which may already be included within your MSDN account.

Aaron
It is for us - but not for our clients - and the price-tag is pretty hefty, sadly :/. Also, we've had really bad experiences with the performance of the versioning/corruption in SharePoint
Goblin
Gotcha...we used SVN for our Tech Pubs team for each project, it was not automated however it worked without hitch. Had some minor issues when they published the documents in an automatic fashion as it purged the .svn directories...however that was identified and corrected. No issues going forward...
Aaron
Ah nice - How many clients in the Tech Pubs team? And did the data-consumption climb exponentially or proportionately?
Goblin
Team was small...3 people at max capacity. Never had any data consumption issues but that is contingent on what is being created of course.
Aaron
Okay thanks for information!
Goblin
+2  A: 

I wouldn't use SVN for this, SVN is not very efficient when dealing with binary files. By using SVN as a back channel for some content in your application you just complicate things by adding another technology and dependency, but you will not use much of its real potential.

I would store the documents as blobs in the database and get/store them through WCF.

Albin Sunnanbo
It would kill the database in our scenario just from the amount of data plus it scales really poorly. But thanks for the suggestion.
Goblin
This is only a problem if you have lots of changing binary files. Things are different if the document are in an open format like a Wiki language, LaTeX or uncompressed ODF. Also, make sure you check some more recent version control systems like Mercurial and Git before sticking to SVN.
vog
@Vog - I'll be sure to check out those too, thanks!
Goblin
+2  A: 

Generally I don't think that SVN or any version control system is a good thing to use for sharing documents. Main disadvantage is the diff system on binary files... Your SVN repo will grow rapidly..

Maybe you should try using some of the commercial tools designed for document sharing (eg. Microsoft Sharepoint). Or some Open Source alternatives... Perhaps you should read this post...

Miljenko Barbir
How do you mean the diff system on binary files is particularly bad? Does it save the full bit-stream for every commit?
Goblin
Binary document files are not that well structured (as opposed to source code files), so doing many small revisions of documents, would modify a few different chunks of the file, and some diff systems might not recognize for example 3 words changes as few characters diff, but rather a few blocks diffs, and the SVN commit would be larger than those few characters. Some diff systems would even detect 30% file diff, while you changed just a few sentences and images...
Miljenko Barbir
Ahh, I see - thanks for the heads-up!
Goblin
-1: See (http://help.collab.net/index.jsp?topic=/faq/svnbinary.html): "Note that whether or not a file is binary does not affect the amount of repository space used to store changes to that file, nor does it affect the amount of traffic between client and server."
SnOrfus
@SnOrfus - Thanks for the link - that cleared up my confusion.
Goblin
I am pretty carefull (size-wise) when comitting binary files. I try to do as less as possible especially with images, because sometimes SVN made 90% diffs. Just as images some documents are encoded in a way that the previous revision is harldy simmilar to the slightly modified file (for example image)... Try changing just one pixel in an image and see the difference. And some document formats are similarly encoded...
Miljenko Barbir
+1  A: 

I think that using ready made and proven tech is great idea. Would like to see it's progress if you really go that way.

I would strongly go AGAINST SharePoint - you'll tie yourself to Microsoft in manners that are hard to describe here. From my point of view, SharePoint is a tech that needs taking care of just for itself.

Daniel Mošmondor
I'll be sure to share our progress, if we end up going this way :).
Goblin
@ Daniel You're going against SharePoint for what reason...? Of course it is a technology that needs attendance, it's not something that maintains itself, hence dedicated SharePoint admins. But saying you'll not tie yourself to Microsoft as though that is always a negative..not sure I agree...
Aaron
@ Aaron: you can end up as SharePoint Maintainer, not ISV developer. Learning curve for it is something that will distract small teams of its course, and I noticed that UI and presentation layer for the Goblin's system is something that he wants to do himself. Not by means of some plug-in or something for SP.
Daniel Mošmondor
@Daniel - I've updated the question with my current progress.
Goblin
Thanx! I'm very pleased that you in fact DID use SVN! Hope you won't hit the wall later :)
Daniel Mošmondor
+1  A: 

It depends on the kind of documents you are using. If you have lots of changing, compressed binary files, then don't use it.

However, if the documents are in an open format like a Wiki language, (X)HTML, LaTeX or uncompressed ODF, then using a version control system makes absolutely sense. Also, a bunch of compressed ODF files or PDF files are handled very well, especially if the files are mostly smaller than 5 MB or so.

In addition, make sure to check some more recent version control systems like Mercurial and Git before sticking to the conceptually outdated SVN. In your scenario, you won't profit much from the "distributed" part of Mercurial and Git, but they are nevertheless easier to setup - at least to my experience. And they provide very advanced version control features which can save your day in the rare cases when you need them.

In case you stick to SVN, and if your client software runs under a modern Unix system, you can also try SVN-FS. This is a filesystem that uses a remote SVN server. Each read goes to the latest revision. Each write creates a new commit. This seems to be exactly what you wanted to build around SVN.

vog
Subversion is not "conceptually outdated" because it operates on a different paradigm than Mercurial and Git. Subversion is a "centralized" system, where Mercurial and Git are "decentralized". In many enterprise environments, decentralized systems are not desirable for a whole set of reasons.
Mark
@vog: Why should it matter whether the documents are in an open format or not? I'd say that SVN or another SCM is very useful for any document format *unless* you have really huge documents that have many revisions.
the_mandrill
thanks for the input. The client is støtten in wpf so svn fs isn't really an option
Goblin
støtten = written (stupid spelling-suggester on Andriod :))
Goblin
@Mark: It's not about decentralization. Mercurial and Git are even preferable in centralized scenarios. While Subversion has still problems with basic things like making branching/merging easier, the modern VCS build lots of incredibly useful features that would be even harder to implement in Subversion. That's why I call Subversion not just outdated, but conceptually outdated. Regarding modern VCS, I strongly recommend you to give them a try, especially in centralized as well as single-developer scenarios.
vog
@the_mandrill: In non-obfuscated, uncompressed document formats, very small (binary or text) diffs are possible. And usually even automatic merging usually works quite well (at least in HTML, LaTeX, etc). So you can manage even huge documents with lots of changes in an efficient manner. On the other hand, proprietary formats are usually obfuscated and contain unnecessary complexity. Efficient diffs are almost impossible, so you have to hope that documents don't become too big and don't change too often.
vog
@vog: If decentralized VCS were always clearly "better" in all situations, wouldn't centralized systems have either gone decentralized or been phased out? The truth is that the development world is bigger than one paradigm can cover. For those situations, we have options, and options are good.
Mark
@vog: I really don't see what open or closed formats have to do with it. HTML, LaTeX are text formats so naturally you'll get a small diff. If you produce a .dvi file then you won't, despite being an open format.
the_mandrill
@Mark: Centralized systems did become decentralized - not by changing them, but by rewriting them from scratch. :-) Also, CVS and Subversion aren't that bad. Switching to a new VCS and reeducating the developers is expensive, so people are reluctant to do that - which is a perfectly rational choice for existing projects. However, for new projects I recommend the modern VCS without a doubt. People did try to fix Subversion (merge tracking, svk, etc) and they utterly failed, compared to the modern VCS.
vog
@the_mandrill: I disagree. Note that Subversion and maybe other VCS tools internally use binary diffs. So this is not about text vs. binary, but about simple vs. obfuscated.
vog
@vog: You may be jumping the gun a bit on declaring the death of the centralized VCS. Earlier this year I left a rather large and wealthy company (fortune 50, in fact) and they're still using CVS. They've got some smallish projects on Subversion as well. While I agree that decentralized systems are popular in the OSS world, the enterprise has chosen, and they've chosen centralized (so far). Furthermore, the development of Subversion is hardly over...
Mark
@Mark: So we agree. I never declared death on CVS/SVN. I like them and hope they'll receive further development. I also never said people should switch the VCS of their existing projects. (In fact I stated the exact opposite!) I'm just saying that CVS/SVN fell far behind the modern VCS and I explained why this gap will grow rather than shrink. So if you start a new project, and your people are willing to learn something new, consider using one of the modern VCS as those provide remarkable advantages.
vog
@vog: *sigh* I bore of this. You're arguing opinion as fact. The only thing you've proven is that the VCS holy wars are alive and well.
Mark
@Mark: I'm also bored of reading fights against straw man arguments. I still don't see what you're trying to say, and in particular, at what concrete points you disagree with me.
vog
It's not about binary vs text it's about being well diffable. Most compressed formats, in particular .zip are not well diffable since small changes in the uncompressed data lead to big changes in the compressed data.
CodeInChaos
+3  A: 

You might also want to consider using a Wiki for document management - I've seen this done and do it myself for my own organisation. We're using Atlassian's Confluence Wiki. Confluence provides for the versioning and general management of documents.

Christopher Hunt
Thanks, I'll take a look at the wiki as well.
Goblin
There are some interesting Wikis that use a VCS (like Subversion or Git) internally to store the pages. This has that advantage of having a mature backend, and you can access to them with external tools. For instance, you could edit the wiki pages with your favorite editor offline in your local working copy.
vog