On 3/6/15 11:10 AM, Thomas Bruederli wrote:
Dear developers and list lurkers
The Roundcube project will celebrate its 10th anniversary this year and a decade is just right to stop for a while and let your thoughts flow into new directions. Some of you may already have read my random thoughts [1] about the future or Roundcube development and since I wrote this down, the idea of a fresh new successor to Roundcube has settled in my mind and won't go away that easily. The initial responses on that were exclusively positive and this encourages us to take it one step further now. Meanwhile I looked into many other applications, libraries, frameworks, apis and programming languages to find the best set of tools that would form a new top-noch webmail application for the next decade. A loose and admittedly rather limited collection has manifested on a wiki page [2] already.
The primary goal of rethinking Roundcube and webmail in general is certainly to improve the user experience for everyday communication. The second important aspect (at least for me as a developer) is to have a slick, structured and flexible framework to build new features and applications on top of. The current Roundcube codebase comes with a variety of technological and conceptual constraints which rule the ongoing development in a rather negative manner. Therefore thinking of a successor that is completely independent and unrelated to the current software stack is a tempting exercise which I'd like to invite you to.
As already outlined in the blog post [1], the new Roundcube should move most of the application logic from the server to the client. Browsers are way more capable than they've been 10 years ago and times of server-side template rendering are definitely over. Those who are familiar with the Roundcube codebase will immediately understand that such a change in paradigms also means a complete break of compatibility with all existing components of Roundcube, including plugins.
So let's free our mind from what we know about Roundcube and start over. This can even go as far as choosing something else than PHP for the server part which is supposed to be reduced to a simple wrapper for data exchange between the backend storage (IMAP et al) and the client application. Possible candidates are PHP (still), Python, Node.js. At least these are the ones I'm currently familiar with. So let's take a deeper look into these as I'm particularly interested in your opinions, also from a deployment and hosting perspective.
- PHP
The major disadvantage of PHP that has become evident in Roundcube is its short process lifetime requiring a full startup, database and IMAP connection+authentication and closing all connections again for every single HTTP request. Even FPM and persistent socket connections (which IMO are still unreliable and should be avoided) don't really help to overcome this.
The advantage of sticking with PHP certainly is that we can re-use some of the existing parts from the Roundcube codebase, such as the IMAP library, the plugin infrastructure etc. And in terms of deployment: PHP is everywhere and lots of sysadmins are familiar with deploying and maintaing and tweaking PHP applications.
- Python
Although Python isn't perfect for running as long-term processes either, there are some well developed frameworks out there (e.g. Twisted or Flask) which could be used to manage persistent connections between the client (think websockets) and storage backends. In addition to that, its easier to implement reactive applications with an asynchronous architecture.
Regarding deployment: the Python universe has some well established package repositories which make installation and deployment pretty easy. From a sysadmin point of view, I have no idea how easy or painful the maintenance of Python applications is. But the number of hosting providers offering Python is certainly lower that for PHP.
- Node.js
The new star on the web app sky. Its architecture seems to make node.js perfect for long-living server processes and maximum throughput. Although we could use Javascript, which we're all familiar with, the number of pitfalls to use that for server applications is quite high. The learning curve here shouldn't be underestimated.
And opinions certainly go into two distinct directions when in comes to deploying and scaling node applications. Installation should come easy as there's basically only npm for all the package management and everybody doing node is familiar with that.
OK, so question #1: what's your take on the programming language choice?
The client part luckily doesn't need such a decision as there's only Javascript for this. But the variety of ways how to build a single-page web application and the number of frameworks helping you to do this is mind-boggling. I have to admit that in this regard, I'm one of the old fashioned web developers from the late 90ies and yet have to learn a lot about the brave new world of web development. I guess we can all agree that nobody wants to build a new web application framework from scratch as we did for Roundcube due to the lack of sophisticated solutions back in 2005. But choosing the right tools might be essential for the timeline and the success of Roundcube Next.
So here's question #2: what are your favorite javascript application libraries and frameworks? What experience did you make let's say with Angular or Backbone? What are the pitfalls?
Finally another big challenge we have when aiming to create the perfect webmail application is the way we make the client and the server talk together. We should carefully draft a proper data model and an according protocol for this. For the data model, I already tried to create a first draft in regards of what we already know the application should be capable of. This includes multi-account support, tagging, sharing and the extensibility for calendaring and other groupware-like tasks.
For the client-server communication, there are some interesting concepts out there but none of them actually seems to suit the purpose we're after. They either lack the concept of sharing (i.e. ACL) or do not account for collections such as multiple different address books one account my have access to. The candidates I'm referring to are: Nilas.com (former InboxApp), JMAP (by Fastmail) or the Gmail API (also to be supported by Dovecot). All are good approaches and generally point into the same direction but I couldn't say that one of them would already solve the use-cases we want to cover in Roundcube. And yes, we're seeking for a protocol and not an API [3] :-)
And this is question #3: who's willing to help us draft the perfect protocol for this? I guess this should be a highly collaborative and iterative process and I'm keen on any input from people who are experienced with this type of task.
Thank you all for reading and participating in this survey. I'm really excited to move this forward. All free and open source of course!
Best, Thomas
[1] https://roundcubeinbox.wordpress.com/2014/09/12/roundcube-next-if-we-would-s... [2] http://trac.roundcube.net/wiki/Roundcube_Next [3] https://vimeo.com/71278954 _______________________________________________ Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
#1 : They're all fine, it really boils down to which language best fits
the mold of hosting a thin backend protocol server that you described.
I prefer node.js for all of the most recent web or socket based
applications we've developed due to it's simple concurrency and the
package manager (which is awesome). Using Node you could have plugins
published as packages, which are very simple for developers to build and
deploy. Also IMO a rich plugin architecture would spring more naturally
from Javascript as it's a more ubiquitous language for the people who
are already working with RC. Since Node is also hosting its own
(web/protocol) socket you can drop many dependencies like an http server
which fits in nicely with PaaS architectures for hosting. Though we
have never built anything nearly as complex as a webmail server
framework, Node is very capable and could be molded to do just that.
You might look at the Haraka SMTP server as an example of a plugin based
architecture in Node.
#2 : Not being much of a client side aficionado I can't really comment, but most of the work I have seen is done in backbone which does not impose a structure on the developer which has actually spawned other frameworks on top of backbone (e.g. option to roll your own). Also from what I have read Angular is still evloving so fast that newer versions are breaking backwards compatibility (e.g. version 1.X -> 2.0). Don't discount Ember.js either, it's probably the closest to MVC that server side folks understand.
#3 : Sorry, very busy father.
#X : PLEASE consider incorporating support for more than just SQL backends, and look at a data model on top of a NoSQL backend such as Cassandra or MongoDB. We leverage Cassandra more and more every day for multi-site application deployments (mostly in node.js) and having state persisted between data centers. It would be fantastic to see applications like RC start looking at the future of geo-distributed services and support those of us that host managed services that require 100% uptime across geographies.
Congrats on the 10 year anniversary!