Enterprise-Rails Startup @ Cloud – A Startup Pain Relief

What’s the pain of a startup?

Adding a maximum value with minimum effort.

So regarding to hosting this means to reduce the amount of non-value adding work in order to focus on the actual product. There is a trend to PaaS products facilitating the setup and deployment of a new app significantly.

But reducing the amount of non-value adding work often means increasing the price vastly. Again nothing has been won.

So the question raises whether this is a universal fact to be accepted or it’s just a gap for a new product.

Assuming it’s the latter one what should the product look like and whats the desired service and price?


Some basic features are very obvious:

  • Robustness – Survice a failure of at least a single physical machine.
  • Scalability – Add more computational resources if needed.
  • Low maintenance – Focus on added value not on configuration files.
  • Monitoring – See when somethings is wrong.
  • Backups – Minimize trouble in case of a serious outage.
  • Server and hosting company within the EU (Germany) – Keep your company legal. No uncertainty.
  • Comprehensive server and update management incl. Opscode Chef installation automation.
  • 8/5 business support included. 24/7 support option – Get rid of all the sysop stuff.


It must be affordable.

How to do it?

  • Automate wherever useful.
  • Skip everything that’s not essential.
  • Don’t overdo it. There’s no need for a fancy UI for everything.
  • Be lean. Keep the invest low and save your customers’ money by saving write off costs for parts of your software nobody will ever use.

Oh it’s already done?


How does it work?

Load Balancing

Two L3 Load Balancers distribute incoming requests to your app instances.

Application Nodes

2 Hydra Nodes with each 2GB RAM serve a total nr of 8-12 app instances (or even more depending on your app’s memory footprint).

10 GB File Storage

Mount a shared NFS filesystem to your app to share user uploads across your Hydra Nodes.

MySQL DB @ MySQL Cluster

There’s no need to run a database service on your servers. There are two 8 core, 96 GB RAM machines serving your MySQL (default), PostgreSQL and Mongo Database.

Where to find it?

We’ve prepared a free 30 trial run of ~10 packages.

Just sign up here, fill out the form and receive your credentials, deploy your app and see whether this is what you need.


Packages will be delivered via first-come, first-served. So better get your trial now.

Questions left?

Ask via hydranodes (-at-) enterpriserails.com.

The future of Clouds – Not a big player’s game!

Coming from a research institute focused on creating distributed system the cloud computing topic attracts me a lot. However, so far I found myself more in the role of a cloud doubter.

Not because I don’t see that the presence of an additional abstraction layer covering boundaries of individual servers to create a vast “cloud” of computing resources is the future trend. No, it’s because I think that current cloud providers create new islands, new sharply delimited, zoned computing spaces. Their prices stemm from US markets and can’t compete with EU dedicated server prices.

Cloud providers did to cloud computing what Starbucks did to coffee.

From a $1 free refill to a $5 no refill pricing model. Well, that’s an achievement :-)

Although many people blindly believe the cloud marketing bullshit out there, I also feel a lot of resistance. Absolutely qualified resistance btw. Have a look at this (german) article for details about legal issues for Germany companies in US clouds, for example. Less dramatic but more profane very often – depending on individual requirements in the last end – bare metal deployments are just cheaper than cloud deployments.

However, current cloud providers ignore millions of servers running out there wasting unbelievable amounts of energy every second. Therefore, I do not like those Cloud providing gigants out there breaking with the big cloud vision. The vision that we don’t talk about individual servers any more. Where there’re just resources and resource pools. No metal, no wires, just pure and logic computational power. Across datacenter boundaries. Across company boundaries, if demanded.

But things are changing. There’re more and more cloud stacks available. Whether it’s Eucalyptus, OpenStack or even VmWare’s vCloud, just to name a few of them. They all allow the utilization of existing hardware resources in a cloudy, flexible way. And that’s the way to go!

So I think more and more smaller clouds will come up in the next years. Additional abstraction layers will then help to mesh up these smaller clouds towards a web of computing resources.

From my opinion this trend will not be affected significantly from approaches such as Opa. A new language trying to solve the distribution, hosting and deployment problem of existing infrastructures on the programming language level. A very effective approach. I just think millions of programmers are much to lazy to jump to a new technology being so different to what has been there for decades. I mean, that’s what we’ve seen with Rails as well. There’re still too many PHP and Java people out there :-) Regarding to web development, Rails has certainly demonstrated a complete new way to go. But still people resist to change.

So let’s lay back and see what the future brings. I personally make a bet on emerging tiny clouds growing together in the long term. We’ll see.

The way towards SproutCore 2.0 – A brief summary

SproutCore – The current situation

SproutCore is on the move.

And it will be awesome!

However I had the feeling that some folks are confused about SproutCore’s roadmap especially about the migration from SproutCore 1.6 to SproutCore 2.0.

This blog post tries to answer a few questions related to the SproutCore rebirth.

SproutCore 2.0 is not SproutCore 1.6 with new Features!

It is something new. And it is good.

So what comes with SproutCore 2.0?

Desktop vs. Web-Style Apps

One major paradigm change of SproutCore in version 2.0 is to loosen the exclusive focus on desktop-style applications (such as me.com) by introducing a second type of application called web-style applications (such as twitter.com). Especially SproutCore’s soul – the MVC architecture along with it’s bindings-concept – also helps to build those rich web-style apps [1].

More Modularity

For those who have observed the Rails framework evolving from 2.x to 3.0 the current SproutCore situation looks pretty familiar. Starting from a nice featured but monolithic framework towards a modern, modular, opt-in-what-you-need state of the art kick ass framework! And again, Yehuda Katz is around. He’s well equipped with refactoring skills on both the technical and social side. So I am pretty sure SproutCore’s modularity will be improved to a healthy maximum.

Use HTML to describe UIs

Since SproutCore 1.5 you can use the Handlebars template language to describe parts of your UI. SproutCore 2.0 – and later on SproutCore UI – will improve this even further. This takes away the pain of previous SproutCore versions when trying to integrate custom HTML.


The SproutCore team is much aware of the need for good documentation. It is a high priority task on the SproutCore roadmap to provide a detailed documentation. From my point of view, recent changes to SproutCore guides reflect this very well.

Improved SproutCore Mobile Support

Maybe this is not so obvious from recent SproutCore blog posts but from personal discussions with SproutCore people the vision is clearly to provide a full featured framework to build rich-cross-plattform-cross-formfactor-web-style-apps. Have a look at Facebook (altough I am sure there even better examples out there). You can use it on every device. On your desktop computer, your mobile phone, your tablet pc and whatever internet enabled piece of technology you got. What happens is that you don’t think of a website any more. You think of a service. You focus on the people instead of messing around with the medium. It’s just there. That’s the future. That’s where SproutCore goes [2].

Towards this direction there are many things to be done. Improving modularity and providing HTML UIs are good examples for refactoring tasks needed to further improve mobile device support. There is still a way to go. Think about all those features modern mobile devices provide: gps, orientation change, the variety of screen resolutions, touch gestures and so on. All those aspects require attention.

Thinking about touch gestures is a good example to show what challenging tasks need to be done in SproutCore UI. I am sure every developer ever used a modern UI framework has a certain expectation about what he will have to cope with and what will be handled by the framework. For me it is a clear requirement that I don’t want to handle with layouting issues for structural views such as split views, for example. I want to be able to nest them as needed and to bind controllers directly to them. I am expecting a proper event management providing callbacks to respond to gestures. So the list of expectations is long.

What doesn’t ship with SproutCore 2.0?

SproutCore 2.0 does not ship with a feature complete UI framework as it is provided by SproutCore 1.x. For a good reason.

As mentioned above SproutCore 2.0 has become way more modular. Additionally, SproutCore 2.0 now also supports the creation of highly responsive web style applications. Following the opt-in paradigm it doesn’t make sense to provide a full UI framework for those who won’t use it.

So instead of baking the UI framework right into the framework core it has been moved to a separate project called SproutCore UI.

So when to start using SproutCore 2.0?


Since the SproutCore 2.0 developer preview [1] only few API changes happened [2], [5]. One of the main API changes was replacing didCreateElement with a pair of callbacks insertElement and didInsertElement. Not a big deal, I guess. So the SproutCore 2.0 API can be considered as fairly stable.

But what else happened? A lot of the work done since the SproutCore 2.0 developer preview has been put into making the developer experience of the framework more enjoyable.

Among others this includes

  • Bugfixes. Find an eliminate framework bugs [2], [5].
  • Improved debugging. More detailed error messages will be provided to give developers hint about what exactly is wrong [5].
  • Hide complexity related to asynchronous tasks going on behind the scenes. The framework should behave as developers expect as close as possible.

I am starting a new project. Which SproutCore version shall I use? 1.6 or 2.0?

The official statement from Strobe about this issue is:

 “SproutCore 1.6 is still the best way to write desktop-style apps, and will continue to be maintained and developed by the core team and contributors. Right now, SproutCore 2.0 is the best choice only if you are building web-style apps, or want to augment an existing application.” [1]

So SproutCore is more than just building desktop style apps and if you’re aiming to create a rich web-style application then you definitely want to use SproutCore 2.0.

Personally, I wouldn’t stick to 1.6; even although it has been announced that SproutCore 1.x will be maintained. I’d prefer an early use of SproutCore UI. I am sure SproutCoure UI will the much better choice. It’s based on a much better architecture and hence will be more flexible. I guess it’s just a matter of time, now.

What is SproutCore UI about?

As mentioned before, SproutCore UI is a framework build on top of SproutCore to allow the creation of highly responsive rich plattform independent web applications.

What makes SproutCore UI different to UIs in SproutCore 1.6?

In contrast to SproutCore 1.6 SproutCore UI is not limited to desktop style applications. More than that SproutCore UI allows to applications to scale across different devices of different form factors such as smart phones, tablet devices and desktop systems.

“For example, a master/detail UI on a phone involves a navigation view, but on a tablet device, will translate to a split view with the master list on the left pane, and the detail view on the right pane.” [3]

So SproutCore UI helps you to create rich UIs without taking away the control over HTML.
Learn more about SproutCore UI reading this blogpost [3] and watching the meetup videos here [4].

When to start using SproutCore UI?

SproutCore UI will not be released as a final version along with SproutCore 2.0 final. This is because SproutCore UI is a much younger project and is still under heavy development and thus in an earlier stage than SproutCore (2.0) itself.

Nevertheless, it would be very helpful if people invested the time to into SproutCore UI and give feedback to the SproutCore UI developers or even better: participate.

More about SproutCore

Related Blog Posts

Conferencia Rails 2011 – A motorcycle journey from Germany to Madrid

olla conferencia rails

I am Julian Fischer CEO of the Avarteq GmbH.
After speaking in 2009 and enjoying an awesome conference I was very interessted to come back again.
This time it will happen at this wonderful park.

It’s a wonderful conference at a wonderful location. So why not having a wonderful journey to it as well?
So I took my motorcycle and a good friend and drove all the way from Germany through France crossing the Pyrenees heading
to Spain’s capitol Madrid.

Once there two of our Avarteq Team will join us.

Our journey was a hard piece of work but also a hell lot of fun.

We planned two days to get from Saarbrücken through France to the french side of the pyrenees.
The idea was to make around 500 km a day.

Our first day: getting everything together turned out to be a more time consuming task than expected.
Especially because the decision to really do this trip has been made very late.
However we started with the sun shining.

After 50 km it started raining. And it rained and rained and … rained.
Completely frozen we had to abort after around 250 km.
Luckily we found a nice hotel.
With this loss of time we had the choice: either loose a day at the Pyrenees, which is surely the most exciting part of the journey, or burn the road on day two.

So we burned the road. At day two we did 1.000 km and reached a village right next to the Pyrenees.
Unable to find any hotel we had to drive over fairly uncomfortable small winding roads. We were tired and exhausted.
At 22.20 we arrived at this small hotel somewhere in /dev/null.
It was an amazing place. Just so authentic and real french. They served cheese and wine so that we felt like real french people :-)

Day three we started a trip crossing the most significant pyreneean pass roads.
Wonderful, beautiful, awesome, exciting! That’s what motorcycles are build for!

Day four we continued the pass road trip heading through Andorra.
On the pass road just before the border a car has crashed into a caravan. Sadly at least one person died.
Strange things have gone through my mind when we passed the bloody roads.
However the beauty of the nature helped to reenjoy the trip.

Day five marked the end of the mountain part of our tour. We started with a beautiful pass road heading towards Zaragoza.
From Zaragozza on we blasted towards Madrid where we arrived 590 kilometers later.

It has been a wonderful trip. Energy consuming but absolutely awesome.
Now conferencia rails can begin. I am very looking forward to see all you great ruby guys again.
I hope we can have a chat and grab a beer in the evening.
So see there guys!

Hope to see you at Conferencia Rails Madrid 2011

I am very pleased that my talk at Conferencia Rails has been accepted. Spain has one of europe’s strongest Ruby and Rails communities so shouldn’t miss this awesome conference happening in Madrid July 13 – July 15 2011. I’ve been speaking at a prior Conferencia Rails event and it was a great event.

This year’s location is very special:

“Madrid’s renowned Parque del Buen Retiro. Normally accustomed toFlamenco dancers, Florida Park is surrounded by museums and Madrid’s beautiful Salamanca district, and just a stone’s throw away from the energetic old town. Combined with the fabulous Spanish summer weather, the Conferencia Rails 2011 will be just too hot to miss!”

As people from the org-team have told me, the event will be in english. So people from everywhere should be able to understand all of the talks without any problem.

So don’t miss this wonderful chance to get in touch to the spanish Ruby and Ruby on Rails community!

See you there!

Resources to the talk “Migrating a dev company to Rails 3″

Here are some links to facilitate the migration to Rails 3.

Rails 2

Rails 3

Rails 3 Changelogs

Essential Rails 3 training and upgrading stuff:

Nice to know training stuff:

Even more stuff on Rails 3:

Rails 3.1

Enterprise Rails Hosting – Updated Enterprise-Rails.de

After being pretty busy for months we’ve recently made some text changes to our enterprise-rails.de site. There is still some work to do but after receiving some useful information we decided to shorten descriptions of our managed single servertwo server cluster and four server cluster. They’re all based on high end Thomas Krenn hardware and are deployed to a high quality data center in Frankfurt.

We also introduced a new section about business hosting support. This has been necessary to point out that we’re not only running arbitrary rails apps on our own servers. More than that we’re also maintaining rails apps on foreign hardware in any datacenter.

Especially for growing companies the importance of service level agreements (SLA) become more and more important. They need a competent and self-confident hosting partner offering contractual guaranteed uptime, response time and time to repair. That’s what we’re doing.

In the near future we will also release more information about our cloud services. Due to our focus on rails hosting support we will continue to be a neutral consultant suggesting the hosting plattform really matching your requirements.

So stay tuned and don’t hesitate to ask if any hosting related question comes to your mind.

Rails 2.3.5 – Add routes to your app – Really useful for rails engines and plugins

Since Rails 2.3.5 you can easily load new routes to your app anytime. So using


to load a separate route file can me extremly useful when creating a rails plugin or engine that needs to define some extra routes.

CouchDB – How to replace an SQL Auto-Value, Auto-Increment or DB-Sequence with CouchDB Views?

Learning CouchDB for a SQL educated person is sometimes a bit tricky because things are solved so different. So happened to me.

Currently I am trying to create a simple invoicing app based on CouchDB. When creating invoices you might want to have a straight integer sequence to acts as invoice numbers. In a RDBM this is a great job to use an auto increment, auto value or DB sequence.

The CouchDB FAQ says that using sequences to identify records is not necessary because CouchDB has its own way to create document uuids and optimistically postulates that you’ll find a different way for all other DB-sequence use cases as well.

And well, I did :-)

Using an integer attribute “nr” for each invoice containing its number its as simple as creating a map-reduce-maximum-search to simulate a sequence:

View function:

function(doc) {
if (doc.ruby_class = "Invoice") {
emit(null, doc.nr);

The map function simply emits the invoice’s nr resulting into an array of invoice numbers.

Emit function:

function(keys, values, rereduce) {
var max = 0;
for( i in values ) {
log( "\n\n" + values[i] + "\n\n");
if (values[i] > max) {
max = values[i];

return max;

The corresponding reduce method is also simple as pie. Just take the incoming array and look for and return the largest element. A simple maximum search.

My first idea of incrementing the return value by 1 to not only get the maximum invoice nr but also receive the next invoice number turned out to be a bad idea.

This is because the reduce function can be called multiple times. Those rereduce method calls then fold result values of prio reduce-calls.


[1,4,2,5,6,3] might be split into [1,4,2] and [5,6,3].

[1,4,2] reduces to 4.

[5,6,3] reduces to 6,

[4,6] then finally reduces to 6.

Since we don’t know when we’re in the last map invocation we pass the job to increment the result of the maximum search to the client.

Using couch_potato in a Ruby app the example looks like this:

# CouchPotato.database.view Invoice.max_nr
view :max_nr, :type => :raw,
:map => "function(doc) { if (doc.ruby_class = \"Invoice\") { emit(null, doc.nr); } }",
:reduce => "function(keys, values, rereduce) { var max = 0; for( i in values ) { if (values[i] > max) { max = values[i]; } } return max; }",
:results_filter => lambda { |result| result["rows"].first["value"].to_i }

Feedback to this article is very welcome: http://www.twitter.com/railshoster

Update 06.12.2010

As discussed with @CouchDB and @martijnthe:

  1. @martijnthe: @railshoster looking at your article on auto-increment with couchdb. I think it will fail when there are concurrent requests…
  2. @martijnthe: @railshoster because couchdb will keep on serving “older”, available data while newer data is being inserted.
  3. @CouchDB: @martijnthe @railshoster usually you wouldn’t want auto-increment with me anyway, what are you using it for?
  4. @martijnthe: @CouchDB @railshoster Need it as invoice nr. Here the tax police requires sequential nrs. Would definitely vote 4 UUIDs as invoice nr though
  5. @railshoster: @martijnthe @couchdb There’s no way around sequential invoice nrs in my case. I guess there must be some way to do this with couchdb. Right?
  6. @martijnthe: @CouchDB @railshoster Need it as invoice nr. Here the tax police requires sequential nrs. Would definitely vote 4 UUIDs as invoice nr though
  7. @benoitc: @railshoster you can use sequential uuids
  8. @CouchDB: @railshoster since creating invoice numbers is probably not a concurrent thing, you should be fine.

CouchDB – Debug CouchDB Views

In order to debug couchDB view functions you can use the log – function:

function(keys, values, rereduce) {
var max = 0;
for( i in values ) {
log( "\n\n" + values[i] + "\n\n");
if (values[i] > max) {
max = values[i];

return max;

You’ll find the output in your couchdb-Log file.