14

Now before you shoot me for bringing up a duplicate question on SOF, let me first acquaint you with exactly what I'm looking for, and I will address other questions and answers and why it is insufficient.

Question #1:

I'm looking for a way to perform live collaborative edits, while the source is maintained on a centralized source control server. For example, if Me and Joe Blow are editing file X.cs at the same time, we should be able to see each-other's edits as we type. Almost as if we were sitting together at the same computer. Now take the following scenario: Me and Joe go offline, and Nimha Smith decides she wants to update some code. When I come back online the following day, I get pushed the code that Nimha updated while I was sleeping/away from the server.

This is a combination of the idea of live collaboration, and a source control system like SVN, etc.

Addressing of the possible duplicates:

There was a similar question, here: Collaborative editing for .NET development - what are the possibilities, however it does not give me anything useful and I'll explain why:

  • VsAnywhere: It runs through a central public server (right direction..?) except all parties involved need to have the exact same code on their machine before joining a session, and once you go offline the session is destroyed.
  • SourceMeet: Runs with a P2P system, so no server to keep track of changes while offline etc. Have not tried it, so I can not attest to how well it can merge code (if it can at all)
  • CollabEdit: Not VisualStudio
  • Cloud 9: Not VisualStudio

And there is obviously this question and this one that are questions directly about source control software such as SVN or GIT. Now, I tried to get VSAnywhere and SVN to play nice together, (SVN for getting changes made while offline, and VSAnywhere for the online developers) but it simply does not work.

<edit>

I recently found this bachelor thesis project named Collab, and it seems like a good idea, but I could not seem to get it working to try it. If anyone else has any success with it please let me know what you did. It looks like if I can get this collab project working it seems like it would be a good start into creating something to fit my needs.

<edit2>

I've also come across BeWeeVee which had a Visual Studio extension for it's service, but all the links for it have gone dead. And CodeALike which was probably their replacement for VS real-time collaboration has a FAQ entry explaining that it's real-time features have been removed and will be re-implemented in the "future".

Question #2:

Now this brings me to the second part of my question because I fully realise there may not be a program out there that fits my tall order. Where could I start implementing software such as this myself? Are there some existing open-source source-control / real-time editing code that I can begin to build off of to create this? Or am I pretty much stuck starting from scratch if I want to implement this. And I'm sure you can see by the tags that I would like to tackle a task like this in C#, if I have to tackle it at all.

Update 2017

As there has been some continued interest expressed in the comments I've created a gitter where we can gather anyone interested and potentially make this a reality: https://gitter.im/sof-centrailized-collab-editing/Lobby.

Community
  • 1
  • 1
caesay
  • 16,932
  • 15
  • 95
  • 160
  • If you give op on the "same file" requirement, you could put your code in a dropbox folder, and aggressively save and reload the code. – Marcel Jun 04 '12 at 12:53
  • 3
    I'm interested on hopping onto this project, do we have a repo? codeplex? I'm really interested in this. I'd love to see Microsoft tackle this with skype integration too since they own skype now. – Firoso Oct 24 '12 at 20:41
  • Hi, is this project still alive ? If so, would you consider adding a link here ? – Daniel Jan 27 '14 at 15:10
  • Not alive, no. We finished the planning stage and got through some of the implementation but never really got too far. Timwi and I could probably put together a repo of what we do have if some other people wanted a go at it... – caesay Jan 27 '14 at 17:58
  • @caesay, are you still actively developing this? I would like to help! I have been looking for something like this for a little while and to have it integrated into Visual Studio would be amazing! – DoubleDev Dec 29 '16 at 14:13
  • @DoubleDev: It was never pursued to anything of value. Some initial VS extension design, etc. I wouldn't be opposed to revisiting the project if there are some interested bodies, but its certainly out of reach and interest if its just me alone. I've created a gitter if anyone wants to hop in and discuss this possibility more: https://gitter.im/sof-centrailized-collab-editing/Lobby – caesay Dec 30 '16 at 12:16
  • @caesay It's only in preview, but Microsoft is adding **Visual Studio Live Share** https://code.visualstudio.com/blogs/2017/11/15/live-share . You can collaborate on VS2017 or VSCode or mix and match. [Video Demo](https://channel9.msdn.com/Events/Connect/2017/T254) looks sweet! – Eric D. Johnson Nov 15 '17 at 18:27

3 Answers3

3

If you want to tackle this yourself, you might like to do it as a Visual Studio extension. Notice that there are two different types of plug-ins: “add-ons” and “extensions”. Personally I think you should write an extension, but either way, you can write them in C#.

You will need to hook into Visual Studio’s text editor. You could either google for how to do this, or just look at an existing example: a Visual Studio extension for elastic tabstops. Your extension will have to monitor your changes as you make them and then send them to the server via some protocol you design. You’ll have to write the server yourself, but in the first version all it needs to be able to do is just send your edits to everyone else who is using the extension. The extension would then make everyone’s edit in everyone else’s editor.

If someone connects to the server with an older version of the code, the extension could just download the newest version from the server. However, if the user has made edits while offline (i.e. while not connected to the server), then you will need to do some clever merging. This is non-trivial, but I know how to do it because I’ve done it before. If you ask very nicely, I’ll write the merge algorithm for you. Then you’ll only need to feed it three text files: the base (the version that was last in sync with the server) and the two edited versions (the one edited offline and the newest from the server).

If you manage to get this to work, you will potentially create something invaluably useful. Please do make sure that you publicise your work! :)

Timwi
  • 65,159
  • 33
  • 165
  • 230
  • I would love to tackle this by myself, but I find myself lacking in time recently. I would love it if you would be willing to help me out and donate some merge code :) Ideally I'd like to get a group of a few developers willing to work together on this - make an opensource project out of it. – caesay Jun 07 '12 at 16:58
  • also since google released their cloud api for collaboration, you could use that as mediator. – Jordan LaPrise Oct 26 '14 at 21:50
2

Well, to see other people type stuff and then have cursor wars with them in the editor has already been done by Google Wave. Iirc it got pushed out as open source or something after the project itself failed. It does take care of all your update issues though, and is built on an underlying update model that is quite robust and solid from a computer science perspective. It provides history and all kinds of things analogous to a source code system.

You could implement what you want as a special editing widget on top of that. If you do a good job you can resurrect Google Wave as a useful and re purposed collaborative editing platform.

Dirk Bester
  • 1,791
  • 19
  • 21
1

About VS Anywhere, probably, to the time you tried VSA, (around May), Software version was Release Candidate 2 (=buggy), so its normal you found some problems with SVN Integration as well as we had open issues with TFS and Git.

Currently, on latest RC3 some of those SVN problems has been solved, we expect to have everything ready for final version soon

There is a possibility to run your own VS Anywhere Server instance in your LAN, so you really do not need to use our Public Servers, if you are a Student or you have a Open Source Project, VS Anywhere Client and Server is Free for you, if not is for commercial use and there is a small fee you should pay.

As stated by Timwi resynchronisation from offline coding is non-trivial and really complex to implement, we think a SCM is the right tool to do this work and this is because we do not yet worked in this direction, our opinion is at least until we work on this area, you can use standard SCMs to pull latest changes and merge with your local copy before setup a session

VSA will simplify the process to bootstrap the sessions, allowing you to 1) check the differences from remote Visual Studio copies and 2) if any, merge them in your local copy to be in the right state, just when opening the session. ("1)" is implemented "2)" is coming)

Session management is not trivial and really complex stuff, there are lots of possible scenarios and this is because we cleanup the session when finish, however you can start the session again at any time with just one click...

Hope this information helps you and if you have more question feel free to contact VS Anywhere Support anytime

About If you want to begin a project to implement such plugin we can offer you information on how to do things, a nice starting point is to understand Operational Transformation as you will need this approach to implement concurrent editing, also you will need a P2P or Client/Server protocol to transfer data between clients.

Jesus Salas
  • 541
  • 3
  • 8
  • Timwi and I area already working on implementing our own version. We're quite far into the development already. – caesay Jun 29 '12 at 00:12
  • Hello caesay, very good news! :) if you need guidance or suggestions on how to do something within VS in your implementation do not hesitate to contact me anytime, I'd love to help you, – Jesus Salas Jun 29 '12 at 08:16
  • Sure, I do have a few questions about the VS integration. I have your email, I might shoot one off to you this weekend. – caesay Jun 29 '12 at 23:26