I know I'm a bit late to the conversation but I still wanted to add my two cents. While I think a fresh start for Roundcube is a good idea I think its still a bit premature to be talking about what should be used to develop the new system when there isn't a clear set of goals for what Roundcube Next should include. So far the only goals I've seen laid out are:
Those are all good development goals but in my mind that isn't necessarily enough to validate re-coding the whole system. While its been touched on we don't have any written goals like adding multi-account support, GPG/PGP encryption support, or any of the other long outstanding feature requests[1] that aren't possible with the current system. Now seems like the perfect time to define what functionality we want out of a new system so we can make better decisions about what frameworks and languages to use.
Now on to the questions at hand.
#1.
I think the question that needs to be asked is: Who is the target audience of Roundcube Next going to be? That in my mind has a profound effect on what language is used since it will limit who can simply setup and install Roundcube without advanced knowledge. Because Roundcube currently uses PHP it has allowed almost anyone to grab a copy of Roundcube and set it up on any shared host, bundle it with another system that has PHP like cPanel or to go all out and do a custom install that supports hundreds of thousands of users. That flexibility has allowed Roundcube to become ubiquitous as a webmail option. With that in mind I'll layout my opinions on each language.
PHP - While PHP is very flexible and could allow the majority of the current Roundcube users to continue using Roundcube with the next version it handles persistent connections badly. While it is improving I don't know that I'd want to bet a rebuild on it. To make matters worse all of the approaches to handling persistent connections that I've seen require a server to be setup in a special way which could make it even harder for people to be able to setup a Roundcube system that would run along side other applications.
Python - I know the least about Python out of the three language choices so I can't really comment on its capabilities. I think its fair to say that using Python would limit Roundcube to users with advanced server knowledge to be able to setup the correct Python environment.
Node.js - Unlike PHP Node is very good at handling persistent connections and would allow Roundcube a lot of flexibility since the web server could be written for the exact needs of the new system. One of my concerns with using Node is performance, while Node performs well it requires a lot of resources to do it. Some of the Node applications I've seen remind me of the early days of Roundcube where Apache would max out or hang on IMAP connections causing performance bottlenecks. While Node.js isn't as common as PHP I'm seeing it showing up in more places and I could see it becoming more ubiquitous in the coming years. In my mind Node.js is the best candidate if Roundcube Next is to have any form of persistent connection support.
#2
If Roundcube Next is going to have the overhead of persistent connections with a server side data model I would like the ability to install just the server side of Roundcube and use the data model as an API to build mail support into other applications without having to use any of the Roundcube frontend code. The data model IMO needs to sit on top of standard IMAP without any special mail server requirements, but it would be neat if parts of the data model could be switched out for special mail server components when available for better performance. As for frontend libraries I haven't had a chance to be able to play with enough of them to have any useful insight to what is best.
#3
I would love to help however possible! Although I'm not sure what the best way to collaborate on something like a data model would be, I think the first step is to defined the features that we want to include in the new system.
[1] http://trac.roundcube.net/report/10?sort=created&asc=1&page=1
Thanks, -Scott Kidder
On Mar 6, 2015, at 10: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