Guillaume “Zifro” Desrat’s former blog

uKR : a framework for developing modular Ruby applications

Filed under: code, Ruby — Zifro September 19, 2006 @ 1:55 pm

As I wrote in this previous post, I’ve started working again on some Ruby code.

I’m currently extracting the micro-kernel part of YAIB to turn it into a framework for developing modular Ruby applications.

The goals of the project (simply called “uKR” until I find a good name) are to provide a complete-but-expandable, clear and clean, well-documented and well-commented, framework for event-driven modular applications.

A modular architecture based on an applicative micro-kernel allows the developers to share the tasks between each others, code separate stuff with a common communication message (read about it on OSNews).

It also allows to intercept crashes : if the sound module of an application has unexpectedly terminated, the micro-kernel is up to detect it, and rerun it a number of time.
It can also handle updating running applications : a module downloads its update, ask the micro-kernel for being reloaded ; its message queue is saved, the module is reloaded, given back its message queue, and run.
Other idea : a module can choose to offer many services to other, like authentication ; it sends messages to other modules anytime someone logs in, like “hey, this one is approved, you can process his/her requests”.

Truly, there are many applications of the micro-kernel paradigm to software applications, not only operating systems. Of course, I haven’t detailed why some people *HATE* them, I’ve just explained why I’ve used it for YAIB and why I’m about to write this framework.
Want examples ?

A multimedia player : one module for the user interface, sending events like “play”, “pause”, “next”, “stop” events to the module playing the music or the video, while another one is downloading the new version of the UI module.

An IRC bot : one module handle the connection to the server while other focus on dealing with channels managements, authentification, serving news to chatters, …

The first work is to clean the code from what hasn’t to be in, and re-design some of the internals, with the developer needs in mind. If you have any idea about it, please leave a comment or email me (zifro@).

I might release it (in an early version) by December (at last !).

YAIB will be based on it - sort of “hey, look, it works” application - as soon as it becomes usable.

PS : thanks anamorph for having motivated me yesterday. You’re a friend to me.

WordPress database error: [Table 'hazzard.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '43' AND comment_approved = '1' ORDER BY comment_date

2 Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment