GTG

[Needs backend] Couchdb backend for integration with Ubuntu One

Bug #490042 reported by Michael Budde
184
This bug affects 32 people
Affects Status Importance Assigned to Milestone
GTG
Invalid
Critical
Unassigned

Bug Description

GTG should be able to store and sync its tasks through Ubuntu One similar to Tomboy.

Changed in gtg:
importance: Undecided → Wishlist
Revision history for this message
Ryan Paul (segphault) wrote :

I have implemented a Desktop CouchDB backend for GTG that enables UbuntuOne synchronization. It's included in the attached branch.

Changed in gtg:
assignee: nobody → Ryan Paul (segphault)
status: New → In Progress
Changed in gtg:
milestone: none → 0.3
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Any suggestions on how to test this? i.e. is any setup needed? I've got two computers and an UbuntuOne account.

Revision history for this message
Ryan Paul (segphault) wrote :

To test the CouchDB backend in this branch, edit ~/.local/share/gtg/projects.xml and change the backend tag so that the value of the module attribute is "couchdb". The next time you open GTG, it will automatically start using the CouchDB backend. If you have UbuntuOne synchronization enabled on your computer, your tasks will be synchronized automatically.

Please note that the program will *not* import your existing tasks into CouchDB. It will leave your existing notes intact on the filesystem.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

...and I get the following error when creating a new task with the fuzzy due date (later, now, soon) or no due date:

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/khaeru/Projects/gtg/GTG/core/datastore.py", line 280, in __write
    self.backend.set_task(task)
  File "/home/khaeru/Projects/gtg/GTG/backends/couchdb.py", line 47, in set_task
    self.database.put_record(rec)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server_base.py", line 155, in put_record
    self.db[record_id] = record_data
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 327, in __setitem__
    resp, data = self.resource.put(id, content=content)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 989, in put
    **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1000, in _request
    body = json.encode(content).encode('utf-8')
  File "/usr/lib/pymodules/python2.6/couchdb/json.py", line 66, in encode
    return _encode(obj)
  File "/usr/lib/pymodules/python2.6/couchdb/json.py", line 114, in <lambda>
    dumps(obj, allow_nan=False, ensure_ascii=False)
  File "/usr/lib/pymodules/python2.6/simplejson/__init__.py", line 237, in dumps
    **kw).encode(obj)
  File "/usr/lib/pymodules/python2.6/simplejson/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/pymodules/python2.6/simplejson/encoder.py", line 260, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/pymodules/python2.6/simplejson/encoder.py", line 177, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <GTG.tools.dates.NoDate object at 0xa36e0cc> is not JSON serializable

summary: - Integration with Ubuntu One
+ Couchdb backend for integration with Ubuntu One
Revision history for this message
Jeff Craig (foxxtrot) wrote : Re: Couchdb backend for integration with Ubuntu One

I've attached a branch which brings this function into sync with the current state of GTG.

tags: added: backends
Revision history for this message
szczym (szczym) wrote :

i could not get the data to sync:

1 On my desktop i branched the foxxtrot`s code, changed settings in project.xml, started the aplication and added 3 tasks. i have ubuntu one running.
2 On my laptop i branched foxxtrot, stuff, changed settings in project.xml, started the aplication and waited.. no sync.
3 I logged in to ubuntu one website on desktop and laptop. no change.
4 i checked if my local client of "ubuntu one" is running on desktop and laptop. it did.
5 i restarted ./gtg and still no data on laptop.
6 changed to segphault branch, still no change.

Revision history for this message
Eduardo Pérez Ureta (edpeur) wrote :

Will this Couchdb backend replace the current not scalable XML local backend?

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

We still have to gauge its performances. The gwibber people have told me that they are having speed issues with couchdb. We will see.

Revision history for this message
Eduardo Pérez Ureta (edpeur) wrote :

So, if the performance problems of Couchdb are fixed, will the Couchdb backend replace the current not scalable XML local backend? or will you substitute it with another scalable backend like SQLite?

Bryce Harrington (bryce)
summary: - Couchdb backend for integration with Ubuntu One
+ [Needs backend] Couchdb backend for integration with Ubuntu One
Changed in gtg:
status: In Progress → Triaged
assignee: Ryan Paul (segphault) → Luca Invernizzi (invernizzi)
importance: Wishlist → Critical
tags: added: release-critical
Changed in gtg:
status: Triaged → In Progress
Revision history for this message
Shenja Sosna (pumbaeo) wrote :

Whether you work on this task?

Izidor Matušov (izidor)
Changed in gtg:
status: In Progress → Confirmed
Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

Seems this bug is no longer even feasible:
"EOL for couchdb and desktopcouch" https://lists.ubuntu.com/archives/ubuntu-desktop/2011-November/003474.html

Closing as invalid.

Changed in gtg:
status: Confirmed → Invalid
Izidor Matušov (izidor)
Changed in gtg:
assignee: Luca Invernizzi (invernizzi) → nobody
milestone: 0.3 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.