Pages: 1
Author Topic: Collaboration by Timestamps  (35,686 Views)
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Posted on: March 27, 2010, 02:50:48 AM
Serp remarks that GM is unsuitable for collaboration due to resources all being in one file.

I think a nice fix for this would be to store a time of creation (milliseconds-since-Jan-1970 style) as well as a time of last modification and time of last splice in with every resource.

LGM could then offer a splice function that would check each of the three things, like so:
If the resource exists in A (true, we're iterating)
{
  If it doesn't in B (!B)
  {
    Keep A
  }
  else, it does exist in B (B)
  {
    If the time stamps of creation are the same (A.created == B.created)
    {
      If the time stamp of modification of A matches the time stamp of last splice of A (A.modified == A.spliced)
      {
        If the time stamp of modification of B does NOT match the timestamp of splice of B (B.modified != B.spliced)
          Assume B is newer, and copy B to A
        Else
          Continue to the next resource; they should be the same.
      }
      else
      {
        If the time stamp of modification of B matches the timestamp of splice of B (B.modified == B.spliced)
          Assume A is newer; keep it
        Else (B.modified != B.spliced and A.modified != A.spliced)
          I have no idea what to do here. Ask the user, show a Diff somehow. This is what requires work.
      }
    }
    else, they are different resources entirely (A.created != B.created)
    {
      If the names are the same, both users may have been thinking the same thing (A.name == B.name)
        If on prompt for action the user says to skip it
          Continue to next resource
      Increment the id of B to the next available resource ID.
    }
  }
}
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #1 Posted on: March 27, 2010, 02:33:32 PM
There is a little-known project/plugin going on that I'm working on called LgmScm. For those of you unfamiliar, SCM stands for a few different things:
S: Software/Source
C: Configuration/Control/Code
M: Management
The usual term is Software Configuration Management. It refers to revision control and such, for example, SVN, CVS, GIT, BZR, and a few others.

The idea behind LgmScm is three-fold.
1) Team management
2) Thus, Separate files
3) Thus, version control/SCM

The first step of LgmScm is to separate your GM file into a bunch of XML files, or data files for non-textual data (like images) - such as png, wav, etc.
The next step is to pass those files off to some SCM program, such as SVN.

Of course, you can take the process backwards as well:

First, obtain the separated XML/etc files by some means such as SVN checkout/update.
Then, import the xml files into LGM as 1 GM file.



Passing the files off to a/an SCM saves me the trouble of having to deal with the timestamps, splicing, and most of the merging/diff stuff, and gives the added benefits that those systems already have. Basically, I wouldn't be recoding what's already out there.


Now I get asked where it can be downloaded. At this time, it's not public. I was basically waiting for LGM1.6 to be released or to at least stabilize in the backend before I made it publicly available, because at this time, I doubt it even works, although i did get it mostly working at one point. If anybody wants to help with it (which I highly doubt, judging by the influx of help with LGM and other related plugins...), I'll certainly share it with them. If anybody's really really desperate to get their grubby hands on it, I can also share. But like I said, I doubt it works, and it certainly doesn't interface with any SCM system yet.
Offline (Unknown gender) luiscubal

Member
Joined: Jun 2009
Posts: 452
View profile
Reply #2 Posted on: March 27, 2010, 10:05:02 PM
I think Ism's idea is better than Josh's, not to mention that systems like SVN/HG/etc will interface better with it.
Offline (Unknown gender) notachair

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299
View profile
Reply #3 Posted on: March 27, 2010, 10:13:13 PM
Something that allows for SCM integration definitely would be nice
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #4 Posted on: March 27, 2010, 10:58:50 PM
Quite.
Pages: 1