As many of you know, Meteor (www.meteor.com), a new realtime web framework was released yesterday. I am taking the time to comment about it here as I believe it is the first real 'competitor' to SocketStream.
First up I would like to congratulate Matt, Geoff and the team for the immense amount of hard work that's gone into their initial release. I am really impressed, not just with the sheer audaciousness of Meteor, but also the launch, website and screencast.
So how does Meteor stack up to SocketStream?
Let me start by addressing the subject of Models. Models are currently the greatest reason to use Meteor instead of SocketStream. Right now if your app needs Models and reactive templating today, you should be looking at Meteor as there is currently no equivalent in SocketStream.
So what is the future for Models in SocketStream?
After much thought I have decided not to integrate any Model/ORM layer into the SocketStream core. There are several reasons for this:
As may of you know, SocketStream 0.3 allows us to support different Request Responders (websocket message types). The 'event' and 'rpc' responders are the first two responders we've created and are bundled by default.
Now I am pretty much happy with the API, there will be new documentation by the end of the week allowing people to create their own Request Responders which can be written and distributed as optional modules. Thus I'm hoping others will start experimenting with different ways to approach Models whilst I focus more on developing www.socketstream.org.
So putting Models to one side, what about everything else...
Well I could spend time talking about the difference in features (there are many), or the license (SocketStream is MIT, Meteor is GPL), but these things could easily change in the future.
Instead I want to focus on what I believe to be the fundamental difference between the two: Meteor's decision to make a fullstack framework vs SocketStream's module approach.
As Apple have proved, there is something very beautiful about end-to-end integration done right.
In many ways, Meteor was the framework I *originally* wanted SocketStream to be - an end-to-end ecosystem where everything works seamlessly together, allowing developers to add new modules with commands such as 'socketstream add mongodb' and start the app up with a command such as 'socketstream start' (as we used to do in SocketStream 0.1 and 0.2).
SocketStream 0.2 was my attempt to build this idyllic fullstack solution, complete with in-built scalability, authentication, HTTP APIs and the ability to integrate with other services over ZeroMQ.
Though the feature list sounded great at first, towards the end of last year I began to realise I was heading in the wrong direction.
No matter how much functionality I added, people always wanted more. As 'more' often meant breaking existing behaviour, this led to adding more configuration options, and ultimately more complexity.
Worse still, I always knew there were other modules out there on NPM that not only did a better job, but had the passion of a dedicated person (or community) to document them and maintain them.
Consequently this led to a radical change of direction and a complete re-write of SocketStream to what we have today.
SocketStream 0.3
The result is that SocketStream 0.3 is an altogether different beast:
The temptation to implement some sort of 'smart module' system has always been there; but I've resisted the urge. Requiring modules from NPM may not be as slick as 'meteor add coffeescript', but it makes it much easier to debug your app, swap out one module with another, handle conflicts, and experiment with different versions if things go wrong.
What's next for SocketStream
Now development on 0.3 has just about finished (the next release will be 0.3.0 and pushed to NPM), I will focus on improving the areas in which SocketStream is currently horribly deficient: lack of example apps and integration code, more documentation and testing, tutorials and screencasts.
Whilst the Meteor team will be working on satisfying users insatiable appetite for new features; the SocketStream core is unlikely to change in size and features from this point onwards. If anything I hope we get smaller and leaner by better design and refactoring (the sort of code contributions I value most).
Rather than try to develop every new feature or optional module myself, I want to be able to provide developers with the tools and APIs to be creative and experiment with new ideas; as well as providing a platform (via the website) to advertise their module for others to find, rate and comment on.
In conclusion
One thing I know we can all agree on is that realtime web apps are the future and the *only* way we will be developing web apps within a few years time.
This is a very exciting time for SocketStream, Meteor and a whole host of similar frameworks which are no doubt in stealth development right now. Time will tell which approach is better. I honestly believe there is value in both and I have no doubt Meteor will be successful in their own right - they deserve to be.
But having had the luxury of trying both approaches over the last 18 months, I feel more strongly then ever that SocketStream's modular, integrative approach, designed to leverage the best of the Node community (rather than abstracting it away), is the best way forward.
Owen
P.S. I will no doubt be debating this further on NodeUp (http://nodeup.com) this Sunday. Be sure to tune in :)
To anyone wanting to know the big, although not fundamental, differences of the two projects, read below (feel free to add replies below of anything I missed, worth mentioning):
Meteor gathers all your JavaScript files, excluding anything under theclient
andpublic
subdirectories, and loads them into a Node.js server instance inside a fiber. In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node.