Javascript client syncronization and cloning Pivotal Tracker
Cloning Pivotal Tracker
Simple is good
At regular intervals I tend to think "There must be a better way to manage what we do on a day to day basis" which always leads to a google search "Open Source project Management".
We use "redmine" at Ylly, which is good for vaugue tasks but not usable for managing work on a daily or hourly basis. I need to note down everything that comes into my head before it is forever forgotten. I have tried the TODO list plugin but this doesn't work for tickets that last more than a week.
I recently started writing everything down in ReStructuredText format in VIM using a screened session on my server.
Extensions
==========
- [DONE] Steelsheet - typo bigLargeSlider.html.twig
Bugs
====
- [CANNOT REPRODUCE ON LOCAL] site_id parameter missing from route "templates" on base site -- SOMETIMES - first time. Don't know why, doesn't appear to be session or cache.
- [DONE] Create new page doesnt work for original engine
- [DONE] Export with layers > ThemeController .. getParent call to method oin non object -- SITE ENFANT
- [CANNOT REPRODUCE] Template includes do not work in _dev mode
- [FIXED] yprox:theme:restore: Always adds theme, never updates
- [DONE] Thumbnails do not survive context transplant (context not changed in thumbnail path .. refactor to simply generate the thumbnail path?)
- [DONE] edit icon missing from page layout edit
This simple approach has been incredibly productive and because it is in a screened session, I can access it from any computer at anytime. Everytime I feel I have reached a milestone I simply create a new file, copying any remaining tasks from the previous file to the next. And... the milestones tend to come around every week.
Pivotal Tracker
I briefly came accross Pivotal Tracker years ago, but I only revisted it in more detail recently. It is actually exactly what I want. Unfortunately its closed source and for whatever reasons I don't like using closed source cloud applications. So, google "alternatives to pivotal tracker" and I find Falcrum.

Falcrum is infact very good. And is built as a clone of Pivotal Tracker. Its made with Ruby on Rails and I got it running in about 10 minutes or less. It is still in an early stage of development and lacks features, but it looks very promising.
But I thought ...
How hard can it be?
To build a basic clone of pivotal tracker sounds quite easy. 3 columns on a web page, a list of tasks, some jQueryUI sortable goodness and a bit of server side code to handle the data.
So I thought about it. The first "oh shit, that looks difficult" thought that came into my head was when I considered that if there were two clients modifying the same work flow, then the changes from one client should appear on the screen of the other, and vice versa. I had a few stupd ideas, like loading the entire JSON data structure from the server each time one user updated, but then I looked at the Pivotal Tracker requests, they were very lean.
The Pivotal Tracker pings the server a few times every minute. Each time the server responds with "OK" or a list of commands to effectuate the changes made by the other users. The changes are roughly as follows:
{
'version': 12,
'command': 'AddStory',
'data':
'after': 12313
'story': {'title': 'My story', 'ownedBy': {'name': Daniel Leech [...]
}
Immediately I started thinking, so how should I do this? Visions of building the complete document structure on the server and diffing it against a cached version of the last known state of the client and then writing some crazy javascript to process the diff on the client side, things like that.
The very simple answer lies in the "version" parameter. Its actually brilliant.
Each time a user executes an action on the Pivotal Tracker story board an ajax request is sent to the server. This ajax request is logged and the ID of this log corresponds to the version above. So with this historical list of commands at our disposal the task of updating an out=of-date client becomes remarkably simple.
The client is on version "5" the latest version on the server is version "10":: Find all the commands logged from version 5 to version 10 and send them to the client to be processed in bulk.
Easy :)
Comments
Post new comment
Tags
- DropBox
- XMPP
- android
- apache
- archos
- audacious
- awesome
- bash
- bootstrap
- bristol
- diagramming
- doctrine
- doctrine2
- git
- gloucester
- graphs
- gt540
- jack
- javascript
- manchester
- mapdroyd
- markdown
- mongodb
- paris
- php
- profiling
- projectm
- running
- scripting
- sed
- software design
- ssh
- symfony
- symfony2
- thonon-les-bains
- trainer
- travel
- twig
- ubnutu
- vim
- weymouth
- workflow
- xdebug
- xml
- ylly
- yprox
10 Latest Items
-
08
Maytrainer [Velo] paris - compiègne 153.00km / 05:48:32 / 00:02:16mpkm Fois.
-
06
Maytrainer [Velo] Vincennes Hippodrome 1hr 34.34km / 01:00:00 / 00:01:44mpkm Solo effort. Did interfals (sprinting from zebra crossing to hairpin turn).
-
05
Maytrainer [Run] Diderot > Pnt. Alx III > Rue de Charonne 13.96km / 01:08:40 / 00:04:55mpkm Good to run in the rain. Lots of traffic.
-
04
Maytrainer [Velo] Vincennes Hippodrome 1hr 32.20km / 01:00:00 / 00:01:51mpkm Rode apace a peloton, but tried not to get in the draft. Sprinted for a few minutes on every lap.
-
03
Maytrainer [Run] Dumas > P. Auguste > Belleville > Prc. de Villette > Pt. de Lilas > Pt. Vincennces 14.48km / 01:07:00 / 00:04:37mpkm Kept up a reasonably good pace. No problems from calf muscle as was the case yesterday.
-
02
Maytrainer [Run] Dumas > Diderot > Trocadero > Basitlle 14.48km / 01:10:00 / 00:04:49mpkm Experienced pain in the back of my calf and stopped a few times towards the end.
-
01
Maytrainer [Velo] Dumas > Rambouillet 123.31km / 05:06:00 / 00:02:28mpkm Paris Rambouillet. Sunny day. Ate a bakery pizza, tarte au pomme and drank a cola then lay down on a bench in the châte...
-
29
Aprtrainer [Run] 14 - 15 miles 23.34km / 01:50:00 / 00:04:42mpkm Run down the Rue Charonne, down Boulevard Henri IV, round le Ile St-Louis, along the Seine, crossing the Pont d'lén...
-
28
Aprtrainer [Velo] Vincennes Hippodrome 1hr 34.12km / 01:00:00 / 00:01:45mpkm Actually 45 minutes. Rain stopped play. Also boredom. "Sprinted" up the second half of the upside at each circ...
-
27
Aprtrainer [Run] 54 minutes 11.50km / 00:54:00 / 00:04:41mpkm Ran down and around.
