Planet GNOME Introduction

Like Paul, I would also like to thank Jeff, Lucas, and Vincent for adding my blog to Planet GNOME.

I, too, have been a long time GNOME user. Until a month or so ago, I had been working at MySpace.com on various open-source projects including Mono. Before that, I was a Medsphere employee working on their Gtk# medical application. Recently, I quit my job at MySpace to spend as much of the summer as I can writing free software from my apartment on the beach the Santa Monica, California.

While I'm not going to mention in much detail the projects I'm prototyping over the summer (I prefer to show code, not talk) readers may be interested in the following.

Iris

Iris is a toolkit to help programmers write applications that take advantage of concurrency on multi-core platforms. Users of python-twisted will feel at home with IrisTask. It provides much of the same callback/errback concepts. Users of of Apple's NSOperation will find it comfortable as it provides object inheritance as an option. And finally, users of CRR will enjoy powerful message passing in which upon it is all built.

It includes a sprinkling of lock-free data-structures and a work-stealing scheduler that is roughly 8x faster than GThreadPool in my test-cases performed on quad-core and dual quad-core machines. Bindings are in the works for JavaScript, Python, Vala, and Mono. One of my goals is to have fully asynchronous applications that cross the language vm barrier.

Ethos

Ethos is a LGPL-2 library for adding plug-ins to your application. It is modeled similar to the plug-in infrastructure of GEdit since they have had incredible success at converting users into application extenders.

Ethos has two main purposes. First, it should simplify the effort required to have plug-ins in an application. But more importantly, it should give a consistent way to add plug-ins for any application using it. If we can leverage the application scripters for one application for much more of the desktop, I think we can see applications get new features faster. Ethos includes bindings for JavaScript, Python, and Vala. Mono bindings are almost complete.

There is an additional library, ethos-ui, which provides a re-usable GtkWidget for managing plug-ins during runtime.

Marina

Marina is a RSS and Syndication reader I started writing a while back when the Liferea authors mentioned wanting to do a rewrite. Unfortunately, I had gotten so busy with work and other projects that I had to put it on hold for a little while. I just started updating it to use Iris and Ethos so I have a practical test application.

Storage for marina is currently done in BerkeleyDb for better or worse. The positive is that we can use DB_RECNO keys in the b-tree resulting in row-offset to record lookups. It uses my BdbListStore which includes a LRU for fast access when attached to a GtkTreeView. This turns out useful as it allows the consumer to dial memory consumption vs. speed.

So those are my primary projects, feel free to look around my blog. There are plenty of posts on writing custom gtk+ widgets and what not. I'm on github here and you can follow me on twitter here.

Comments (18)

  1. lariq wrote:

    Cool!
    If you do a plugin with Ethos, can this plugin access the full public api of your application?
    cheers

    Friday, May 29, 2009 at 7:20 am #
  2. chergert wrote:

    Hi lariq,

    If your in C, it sure can. If you are in a higher level language, your application will most likely need to include bindings for the plug-in to be useful.

    For example, if a plug-in wanted to hook up to the applications gui, you might make an interface like FooPluginIface. Then your plug-in would implement that interface as well as inheriting from EthosPlugin.

    Then simply connect to EthosManager::plugin-loaded and call foo_plugin_baz (plugin).

    Cheers

    Friday, May 29, 2009 at 7:42 am #
  3. lariq wrote:

    thanks chergert. I’ll try it.

    Friday, May 29, 2009 at 12:20 pm #
  4. drone pimpage++

    Friday, May 29, 2009 at 12:47 pm #
  5. Vadim wrote:

    Thanks for pointing out Ethos, I think I’ll have use for it soon.

    Friday, May 29, 2009 at 1:08 pm #
  6. Livio wrote:

    I hope Marina gets a Google Reader-like interface for viewing articles.

    I hate dealing with article list and separate pane for viewing purposes.

    Friday, May 29, 2009 at 2:00 pm #
  7. Joe Shaw wrote:

    Woo hoo! Finally made it!

    Friday, May 29, 2009 at 5:16 pm #
  8. kamstrup wrote:

    I must say that I am very excited about Ethos! I started out with a similar project a while ago but never had time to really put some serious work into it. I am most happy to see how far you have come.

    I can’t find any releases of Ethos..?

    Friday, May 29, 2009 at 6:32 pm #
  9. chergert wrote:

    @kamstrup No release of ethos yet, because I just started it a week or two ago. I’d like to write a few sample apps and documentation before I make a release.

    Friday, May 29, 2009 at 7:21 pm #
  10. chergert wrote:

    @Livio Yes, a single interface would be quite nice. Long ago, I wanted to do a full clutter interface that read like a newspaper. My hope was that it could be done using plugins :-)

    Friday, May 29, 2009 at 7:22 pm #
  11. About a week ago I restarted my on-and-off-again project to do a shared plugin system. Great minds think alike, eh?

    Was your plan to basically replace the system that has been copied around Epiphany, GEdit, Rhythmbox, Totem et al, or did you have plans for other interesting features? I’d been doing some work on supporting multiple “extension points” and having desktop-wide plugins that supported multiple apps.

    I may have to steal your code to replace my less well developed low-level stuff. I also have partially-working support for JVM plugins, – I’ll see if I can the code up somewhere.

    Saturday, May 30, 2009 at 12:12 am #
  12. chergert wrote:

    @James

    I’d love to see the JVM code. That sounds like a great addition. I should really do C++ bindings too.

    After a few years of using Mono.Addins, and the MonoDevelop/SharpDevelop engine that predated it, I’ve found the extension points a bit more than what is generally needed. It certainly has its place, but I find that casual scripters are confused by it.

    That being said, it would probably still be something that could be integrated and used by developers that need it.

    Saturday, May 30, 2009 at 7:46 am #
  13. I agree that extension points can be confusing, but I blame that mostly on the application writers using them just because they can. I reckon most applications could get away with having one EP, equivalent to TotemPlugin or GeditPlugin.

    One thing I plan on doing is having the PluginLoader be an extension point, so apps can use alternate implementations. For example a Mono application could load python plugins with an IronPython-based loader rather than the CPython-based one.

    Monday, June 1, 2009 at 7:00 am #
  14. Vadim wrote:

    Is there any possible ETA on an Ethos release?

    We’re considering Vala plugin frameworks for a project and this info would help greatly.

    Saturday, June 13, 2009 at 2:13 pm #
  15. chergert wrote:

    @Vadim

    I will prepare things and get a release out soon. Documentation is mostly what is holding this back.

    I’d also like to have a sample EthosManager subclass that stores active plugins in GConf at least as sample code.

    Sunday, June 14, 2009 at 1:56 am #
  16. Vadim wrote:

    Ah. We’ve went ahead anyway as you have the Python bindings + UI available, and it would’ve made sense to write something from scratch.

    I don’t know of a better way to get in touch with you (we’re at #giftwrap on freenode), but it seems in the default install, test4 (I think) cannot find a python something, and the .vapi is missing a set_plugin_dirs function. I’ll see if I can fix that and will let you know if I do.

    Sunday, June 14, 2009 at 9:23 pm #
  17. Vadim P. wrote:

    Think this fixes it:

    public void set_plugin_dirs (string *plugin_dirs);

    Monday, June 15, 2009 at 2:29 am #
  18. chergert wrote:

    Ethos Update:

    A bunch of work has been done over the last couple days and I think we are ready to make an initial release. 0.2 will be packaged tomorrow I believe.

    Wednesday, June 17, 2009 at 8:31 am #