This is a continuation of a discussion from private messages between
me and John Mettraux.
Here's the tail-end of the exchange before John asked me to post here
in the list as it might be a good thread to follow for anyone who
might have similar question (I've edited out the salutations):
[JG]
We wrote a small couchdb to redis ruote migration script:
source = Workflow::Engine.build_couch_storage(:host =>
'localhost', :port => 5984)
destination = Workflow::Engine.build_redis_storage
%w[configurations errors expressions msgs schedules variables
workitems].each do |type|
source.ids(type).each do |id|
item = source.get(type, id)
item.delete('_rev')
destination.put(item)
puts(" #{type}/#{item['_id']}")
end
# source.purge_type!(type)
end
You'll notice above we did not list the history database. This is
because in lib/ruote/couch/storage.rb the history db is also not
listed/included in the list dbs:
%w[ msgs configurations variables ].each do |type|
@dbs[type] = Database.new(
@host, @port, type, "#{@prefix}ruote_#{type}", @options)
end
%w[ errors expressions schedules ].each do |type|
@dbs[type] = WfidIndexedDatabase.new(
@host, @port, type, "#{@prefix}ruote_#{type}", @options)
end
@dbs['workitems'] = WorkitemDatabase.new(
@host, @port, 'workitems', "#{@prefix}ruote_workitems", @options)
Is there a reason why this is so? What's options are available for us
if we want to migrate the content of the history database?
[JM]
the reason : the history storage is optional (and was added only
recently).
The options available to you : add 'history' to the copy_to method.
Meanwhile, I will add it by myself and then close this issue.
[JG]
Ah, k.
BTW, which copy_to method? (I don't see any declaration for a copy_to
method in the ruote-couch gem)
[JM]
all the storages include StorageBase (lib/ruote/storage/base.rb)
https://github.com/jmettraux/ruote/blob/master/lib/ruote/storage/base.rb#L242-267
I've re-read your initial question. History should normally go to the
"WfidIndexed" group.
Argh, I hate ruote-couch, it was a mistake from me to implement it in
the first place. I did it for a customer, and it only brought me
misery in the form of countless unpaid maintenance hours.
I should discard it or rewrite it (couchdb has gotten better since I
wrote ruote-couch). I hope you guys are completely moving away from
it.
Probably, adding 'history' to the group of WfidIndexedDatabase
instances in the ruote/couch/storage.rb should do it.
[JG]
Ah, good to know we're not stressing out of proportion here (re: ruote-
couch). We're slowly untangling ourselves from it (unfortunately we
also are in bed with couchdb-lucene for the search feature in our app)
- we're thinking of implementing something with MongoDB (or if you
have a better recommendation, then we're open)
I've added history in the group that does WfidIndexedDatabase early
this afternoon (lucky guess on my part) - the only issue now is that
it takes so loooong for that db to load (we have a very big history
db) and it's making our stage machine crawl because of it.
On the same note (re: history) are we using it correctly? Right now we
are keeping everything and never letting go - should we have just
created something like a log or journal that is appended to with
significant even description instead of relying and parsing the
history db?
[JM]
Woah, such conversations should go in the mailing list, they get lost
here. Github, have you ever heard of the old open source adage "no
conversations in the issue tracker" ?
Wait, it's not the issue tracker... Damn, a good thread of discussion
lost...
Could you please ask again on the mailing list ? I'm sorry if I did
not notice immediately you were asking me for help privately.
[JG]
No problem. I'll post a link or transcript of this in the list - My
initial question was already answered, and it sort of naturally
progressed into a discussion of correct usage/practice in the use of
ruote/ruote features by my follow up questions.
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en