processi

about processes and engines

kotoba

I’m implementing a journaling functionality for OpenWFEru, our open source Ruby workflow and bpm engine. OpenWFEru currently uses unique ids for business process instances that are mostly plain integers.

Journaling goal is to help rebuild broken processes and when this is done manually, it involves matching various files whose names sport those “workflow instance ids”. Matching 1174038400840 among 1174137717900 might be really tiresome for the eyes especially on some platforms without a decent ‘find’ or ‘grep’ implementation.

kotoba.pngI’ve just implemented a base 10 to base 70 converter… Sounds boring ? Indeed but maybe with a look at these examples, it might get more interesting:

Kotoba uses 70 of the syllables of the Japanese language to produce strings that are [usually] easier to remember than their integer counterparts.

Of course, Kotoba is usable as a library (require ‘kotoba’) from your Ruby code (but the command line version is great for integrating into your nifty shell scripts).

Kotoba’s source is available under a BSD license as a single file download. Else, it’s currently part of OpenWFEru. I don’t plan to ‘gemify’ it for now.

update : it’s been ‘gemified’ as openwferu-kotoba. It’s available via a classic download as well.

Written by John Mettraux

March 18, 2007 at 6:02 am

Posted in coding, openwferu, ruby, shell, utils

6 Responses

Subscribe to comments with RSS.

  1. John,

    This is pretty interesting although a little japanese centric :)
    One thing I want to point out is that your wfids are not really unique (based on elapsed millis, right?). This might be a problem.
    What about using guid? You could still kotoba them !!!!

    Very interesting!
    Pat.

    cappelaere

    March 18, 2007 at 3:27 pm

  2. Hi Pat,

    until OpenWFEru 0.9.5 there were potentially non unique ids generated but it got fixed and there is a unit test just for ensuring that.

    I’m using the ‘japanese’ syllables because they are very distinct and they are few. It produces words that are (imho) easy to distinguish. The english language has fare more sounds than the japanese or the spanish languages and some of these sounds are very close.

    About guid, it’s an interesting idea, I’m always ready to switch to it if it proves a superior option. There are a few guid libs available in Ruby, I’m keeping an eye on them.
    If you can ‘break’ (induce it to produce to identical ids) the current mecha, please tell me (with a unit test).

    Thanks a lot for the feedback, see you on the dev mailing list,

    John

    John Mettraux

    March 18, 2007 at 11:08 pm

  3. Breaking current new_workflow_instance_id with a test case might be hard.
    Unless your machine restarts twice and everytime generates a workflow at the same time.

    Another issue would be if you farm out workflows to other machines and want to get the status back or want to stop them… yes, there are plenty of ruby uuids out there. I even think there is one included in ruby distribution…

    BTW, I really like the kotoba idea. Very orthogonal and since i am trying to learn Japanese, I like it a lot! :) I am not sure how much this helps since users should not really deal with those ids…
    You are too much!
    Pat.

    Pat Cappelaere

    March 19, 2007 at 12:54 am

  4. Hi Pat,

    I’m investigating those uuid libs, haven’t found one shipping with Ruby unfortunately.
    That one seems the best : http://rubyforge.org/projects/reliable-msg/

    I have had to deal with broken processes, the kotoba idea is to trying to lessen the pain in such moments. It’s only meant for process admins, not users.

    I wrote a blog post for it because other people might come up with applications in other fields (like, why not, transmitting long numbers over a crappy audio line…)

    Learning Japanese ? がんばって下さい !

    John

    John Mettraux

    March 19, 2007 at 3:33 am

  5. […] In the past, I’ve had to deal with broken processes where we had to roam through a large number of processes all designated by their integer (long) workflow instance id. As I wanted to make it easier to grasp instance ids, I implemented Kotoba. […]

  6. […] install openwferu-kotoba I’ve just released Kotoba in its own gem : […]


Comments are closed.

%d bloggers like this: