Recently I have been dabbling in Ruby on Rails by learning it through Michael Hartl's tutorial and various other resources on the net. I'm quite impressed with it and have a number of ideas for applications I want to write with it.
Heroku seems like a really nice option for deploying these applications - it's smooth and extremely easy to set up, which is great. Something that I'm not clear on, however, is the type of projects Heroku is best suited for. This might seem like a subjective question, but keep in mind that I am asking from an entirely technical aspect (for instance, "Heroku is most used for X because of Y"), trying to figure out which option would work best given the type of projects I'm interested in.
With that said, I have three basic types of applications I'd like to write:
A personal site with a blog front page and several content pages
A community site that acts as a repository for Illustrator ".ai" files with forums and possibly a wiki
An image host with forums
For each of these projects, which would be best: Heroku, a traditional host with RoR support, or a different cloud host with RoR support?
Heroku is designed for any kind of webapp really. It is designed to scale well depending of your needs.
If you want to host user files you will have to use an outside service like amazon S3, because heroku is not designed to upload files directly in the application. Which is a good practice.
http://devcenter.heroku.com/articles/slug-size
http://devcenter.heroku.com/articles/s3
http://aws.amazon.com/s3/
Related
I know this is a topic which is very delicate however the simple question is.... has anyone uploaded a rails app using godaddy.com and if so how did they do it. I'm literally clueless. This is my first time. I cannot use anything else due to my clients choice.
If you're looking for shared hosting, Heroku is your best bet. Although you will need to make some minor modifications to your application to fit this environment, the benefits are considerable.
I would not recommend using regular shared hosting, which is primarily intended for PHP applications, for Rails. You need a VPS at the very least, and if you're not prepared to manage this, you need a managed environment like Heroku or you'll end up in serious trouble.
For small scale or hobby projects, a 512MB VPS is usually sufficient to get started.
If your client is insisting on GoDaddy, Rails may not be a good choice for you. It does seem possible according to the documentation but you need to have the correct account type.
I find it easy to find resources on amazon/online to learn new frameworks/programming languages. However, when it comes to web app deployment, I find it really hard to find a single resource that explains all. Most of them just tell you what to do without explaining 'why'.
I just did my second rails app deployment with unicorn and nginx. Although I 'kind of' know what is going on when reading the tutorial, I would like to know more about the 'how' and 'why' of the steps that were given.
In short, I would like to read books/articles/tutorials (hopefully all-in-one) about best practices for web app deployment, and how to scale/load-balance your app when it gets more traffic (and hopefully it the tutorial uses NGINX/unicorn setup).
Well, deployment and scaling are completely orthogonal topics, so I don't think you'll find an article/tutorial that covers both.
As for deployment, you better automate your work. When you deploy to 100+ servers, the last thing you want to do is to do it manually (fetch from git, migrate db, restart servers, etc).
Capistrano - very well known and adopted tool for deploying Rails.
Vlad - another tool that gains more attention lately.
Chef - very powerful tool for server management. Several top Russian sites use it.
We have a very simple function (We look something up from a third party database and return an answer. It's literally five lines of code.) We would like to offload this task from our main server because we expect a high volume of traffic for this one function and would like to optimize it.
We are thinking about testing the promise of many cloud/PaaS providers, where they handle scaling and performance responsibilities.
We're most interested in Rails environments, but are curious to hear experiences from others about any company in the space.
Here are the PaaS companies we found that supports Rails:
1) Heroku
2) DotCloud
3) Duostack
Questions:
1) Do you know of other Rails-specific companies? Also feel free to list non-Rails companies since we're interested in following other companies in case they eventually provide Rails support.
2) How has your experience been with these companies?
Foreword and disclaimer: I work for DotCloud; so the following might be biased. You've been warned.
DotCloud could be interesting for you if you like the following features:
run something else than Ruby (what about some Django or Pylons code talking with your SQL DB? Or even some PHP blog like WordPress or Drupal, using the same user authentication database?)
experiment with databases like Redis or MongoDB, or background ruby workers, without paying for add-ons
SSH access, crontab access (without requiring an add-on)
cheaper workers (I didn't come up with this one; some of our users coming from the Heroku world told us that workers were insanely expensive there)
Duostack is indeed very nice if you want to mix specifically Rails and Node.js. I've been told that they had awesome auto-configuration facilities.
Finally, if you only plan to do Rails and nothing else, ever, you might as well stick with Heroku since they've been in that business for a while, and are probably more mature than the first two of the batch.
Shameless plug: DotCloud is offering a beta test drive; so if you want to see what it looks like, just subscribe to the beta and you will be quickly enough be able to see for yourself. Heroku has a free tier as well.
You could add EngineYard in the mix - but i'd be inclined to use Heroku as my first choice, Dotcloud second (it's a newish product, and is very good but still in development)
If you want more control over your app/servers or want to run it on any cloud or your own infrastructure without having to download/deploy anything, you can try Cloud 66 (www.cloud66.com)
Disclaimer: I work for Cloud 66
A lot has changed on the scene since this question was asked. We recently looked into these services and settled on Heroku, but even more recently decided to continue managing my own deployments directly on EC2. Here are some points not mentioned in the other answers.
Heroku
Now supports much more than just ruby
Has really great-looking support for PostgreSQL
Uses LXC for process containers, like DotCloud
DotCloud
Is now Docker, and is putting a lot of manpower into developing docker.io
Doesn't have a free tier any more
I'm not sure if DotCloud is using Docker internally or not, since the docs say explicitly it isn't production-ready yet.
Our decision to stick with plain EC2 was motivated by the fact that it's cheaper and affords a lot more flexibility. For example, we use local-only http servers behind our public server to do some of our request processing, which doesn't really fit into the PaaS models out there. We would have had to reimplement all our back-end components as redis workers, and pay for them as additional dynos. The fact that Amazon RDS now supports PostgreSQL was also a compelling factor. Incidentally, Amazon has a full-stack PaaS offering as well, Elastic Beanstalk.
Just stumbled upon the question. There are similar ones around here. The problem is also: The PaaS scene is changing very quickly. New vendors are popping in every week or so.
Nowadays OpenShift from Red Hat might also be mentioned here as a Ruby PaaS.
OFFTOPIC + shameless plug: I have compiled a list of PHP PaaS here: http://blog.fortrabbit.com/comparing-cloud-hosting-platforms/
I know there are a lot of existing questions on Django hosting etc but my question is whether there is a technical reason why RoR hosts are easier to get by than Django hosts. Is there something in the technology itself or the architecture that makes it more of a hassle for providers to host and maintain?
It's both seemingly easier to find better free hosts for RoR than for Django (10mb from alwaysdata really doesn't allow for a lot and App Engine isn't a vanilla Django) and easier to find decent RoR hosts for 2$/month packed with features than for Django.
Is the reason technical or just because of market share/timing?
Thanks,
Xiao
Let's face it, free hosts are nowhere near good, and nor are very cheap ones.
If you want a decent host, you will have to pay a decent amount.
On the other hand, rails is nearly 1 year older than django, and started to popularize way earlier than django did. Also, php being older and popularized earlier, it seems a good reason for rails to be more popular with hosts than django.
Django it is not more difficult to host than RoR.
IMHO this offering delta is there mostly because of the market share the RoR has compared to Django.
If it is true that rails is older than Django, it's also true that Python is older (and used by more people) than Ruby.
Also a technology like WSGI that makes things easier for web applications was already there when something similar came out for Ruby (Rack).
I think it's less timing and more community push, myself. There is an extremely active and vocal community behind Rails. Just go down to your local bookstore and take a look at the books there. You'll probably find 5x the amount of Rails books that you will find over Django. As it is said, the squeeky wheel gets greased. There is a strong vocal minority of Rails users, and that means that people will cater to them on shared hosts, because otherwise they'll have to listen to a lot of requests that keep asking for it.
Not to say that time-in-market doesn't have something to do with it, I just find that the community behind any given technology has a lot to do with it's level of adoption in different business models.
Also, any host that hosts Ruby apps can host just about any of the major frameworks, as long as they are Rack compatible. So for having to deal with Rails, they usually get support for Sinatra, Ramaze, etc, for free. Instead of just supporting Django.
I am a somewhat experienced rubyist, but I am now starting to do rails development. I know rails is used to make "web applications" but what exactly does that mean? Do you build entire sites with rails or do you build a feature for a website in rails, and integrate it in to an existing website? (I know this question is kind of vague, but any answers to how ROR is used in the creation of websites would be much appreciated).
Generally speaking, you will build a full site with Rails, though you can integrate it into an existing website, as well. It is designed to provide a top-to-bottom solution for entire websites.
For standalone features or small scripts you just want to expose to the web, you might look at something like Sinatra or Camping.
What is Ruby on Rails?
I'm also build some rails applications in that I had entirely use rails to develop my web application. It's quite easy rather than using two or three languages. But when I developed I had to use Javascripts, CSS and Ajax to create more attractively
For me it's a great framework to build website and minimal knowledge is required although experience and knowledge of ruby gives you an upper hand.
I also feel that rails is good not only to build websites but to manage it.
Also the support community of rails is awesome and is complemented by guys like Ryan bates with their screen casts.
Also when we build a website using ror, we have the flexibility to concentrate on different features at different times or by different person.
This gets a great modular structure.
So you can design the basic functionality today and tell your colleague to get the views attractive using JS and friends without affecting your functionality.
Also the external support for rails (like gems and plug ins) is awesome and makes life heaven!
I would suggest that it's a great framework and the best feature is that it is a very easy to begin and learn but it always surprises you with new things.
Thus it allows you to learn a lot!
Hope it helps.
The website/web application distinction is made because there are many Rails apps in existence with no front end or 'website' to speak of. Using Rails, one could serve JSON amongst a cluster of compute nodes for data aggregation, or text to unix sockets for display on terminals. The uses for Rails are only limited by ones imagination, and you could even use Rails for single host interprocess communication if you desired. This might prove effective for a highly skilled rails programmer rather than learn a new tool to achieve similar results.