GSoC – Final report

GSoC 2013 is coming to an end, and in this posting I’d like to inform you about the new things that I added to Rainy since Midterm.

The second half of the GSoC was mainly about adding HTML5 interfaces. Although there are now two different interfaces – admin and user (note editing) client – they use the same technologies. After some evaluation, I setup both with AngularJS and Bootstrap. Bootstrap was especially helpful, since I am by no means a creative designer that could come up with a nice design, so using the (nowadays somewhat common) bootstrap default elements resulted in an acceptable overall look.

Single page applications – single executable

The interfaces are pure single-page applications (SPA) – that means they interact solely via JSON/REST with the backend, there is no server side HTML generation involved. So the major code parts of the interfaces are Javascript codes and HTML/Bootstrap skeletons. This has the advantage that they are just plain static files, which can be served by a tiny webserver – and directly via the HttpListener with a custom ServiceStack handler that is spawned by Rainy.

This is the part I like the most in this solution: All website files (.html, .js, .css etc.) are embedded as a resource into the Rainy.exe file and served by the builtin webserver. That means: No messy folders with assets, no setting up pathes in any configuration whatsoever. Deployment is still a single Rainy.exe file that only requires mono as a dependency.

Admin interface

The admin interface is the first thing that will pop open in your browser if you start Rainy on a system with a graphical environment (read: have a $DISPLAY variable set). It can be used to add, remove and edit users, as well as temporarily deactivate user accounts. The admin password is global, and needs to be specified in the settings.conf file prior to starting Rainy.

admin1

admin2

NOTE EDITING

The note editing client was the more difficult part, especially the WYSIWYG editor. Tomboy uses a custom note XML format, and converting this to HTML and back without messing up the markup is not that easy. The bootstrap-wysihtml5 widget was of good help, but unfortunately has some bugs and the projects seems to be abandoned (wysihtml5, which is part of bootstrap-wysihtml5) on github. As a result, the WYSIWYG sometimes messes up the note formatting when saving, but I am confident that this can be sorted out in the future.

Nonetheless, viewing notes with custom markup works now pretty good. There is also a search field which responds as you type, so no server callbacks are involved. notes1

As soon as you change a note’s text, create or delete a note, the Sync button will become available and start a timer of 300 seconds. After 300 seconds or when you manually click the sync button the notes are synced with the upstream server version. You don’t have to sync after editing every note, changes are temporarily saved. So you can switch back and forth between the notes and make changes. Sync will only happen when the timer reaches zero or you manually press the sync button. For future versions I plan a complete offline mode that syncs the notes to local storage, but I will have to figure out what is the best way to do this.

Host it for your friends and family

For smaller groups up to 20 people, the SQLite backend will perform sufficiently well. But with the PostgreSQL support added before Midterm, Rainy is now ready to serve many more users at once. That is why I added the possibility to signup for an account. In the settings.conf, you can specifiy if signup is allowed (default: off) and whether or not users need to be manually activated by an admin after signup (default: on). This allows you to invite your friends, family members or co-workers to use your custom Rainy installation – hosted in a secure environment at home or at your data center of choice (remember that storage encryption was also added as part of the GSoC). You can even host it on a RaspberryPi running Debian! (sorry, no Raspbian yet due to missing ARMHF support in mono)

signup

loginwsignup

Give it a try – the public test server

The public test server that has been in place for months is updated to the latest release, and I try to keep it aligned with the latest git master. The HTML5 note interface is available for testing, too. Head over to the public test server page in the Rainy wiki or directly go to the login.

New RELEASE: v0.5.0

I’ve just uploaded a new release which contains all new features up to today. The v0.5.0 is the unstable branch that should evolve into a v0.6 stable release later after more testing. Get it from the Rainy download page and let me know of any bugs or issues that you have in the github issue tracker.

About these ads

4 responses to “GSoC – Final report

  1. I’ve been anticipating this all summer, and it looks great!
    Now I just need to figure out how to convert SSL cert into what ever format it is that mono wants… :-\

  2. Thanks for the new version! I just updated from v0.2.3 to v0.5.0 and there seem to be LOTS of improvements! (But I had to delete the old database file and create a new one… :-( )

    There is one new problem, however: Timestamps are messed up! When I change notes, the editing time shown does not match the actual editing time anymore, there is a 2 hour mismatch. I think this may be because the clients use local time and Rainy uses UTC (or vice versa). I live in Germany, so there is a difference of 2 hours between local time and UTC.
    Before this update, timestamps were correct.
    This is not a show-stopper, but it is kind of annoying.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s