Search code examples
databaseamazon-web-servicescouchbaseeucalyptus

how to use Couchbase as a database in the cloud?


I need to make a database stored in the cloud for an application. i just need to store and retrieve images from that database to the application. i found Couchbase and i think that's the way to go for me, but im not really sure of how to start.

I suppose that if i want to use Couchbase as a database i need to install it in my computer and it will use my computer as the server. but i need to do that on the cloud, because i don't have a computer that i could use 24/7 as a server. so im not really sure of how i could install Couchbase in the cloud.

I have the vague idea (from reading the AWS page) that some hosting servers out there have the option of using them as a computer where i can install linux or any other operative system, and then install couchbase there, but im not really sure if that's true.

  1. So, if that's the case, is there any cloud (or web) hosting service that you recomend that could do what i need? it would be better if its free, because its a class project, but i don't mind if its paid if it has a 30/60/90 days of free trial. could amazon's AWS or HP's Helion Eucalyptus do the job?

  2. How do i install the Couchbase database in that hosting service?

  3. If using Couchbase in the cloud doesn't work like i think it works, how can i do what i need?

I'm really confused, thank you in advance.


Solution

  • Using a database to store images (or any large binary data) is usually a terrible idea. They already invented a database for storing files - it's called a filesystem.

    Glib replies aside, you really should consider using the built-in mechanisms you get from cloud providers for storing binary objects; if you're using AWS, then S3 would be my first choice. You get all the benefits of a distributed database: reliability, scalability, etc., but without the unnecessary complexity of using a database for something as simple as storing binary blobs. Some further reading on using S3 for object storage: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html

    Now, there are some use-cases where it might make sense to use Couchbase for storing images, mostly if you need the high performance that you get from the built-in cache in Couchbase to retrieve the images very quickly. In such a case, here is a short list of steps to get you started:

    1. Sign up for the AWS free tier: https://aws.amazon.com/free/
    2. Get set up for AWS EC2: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html
    3. Follow the getting started guide to create an AWS VM instance: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html
    4. Install Couchbase: http://developer.couchbase.com/documentation/server/4.0/getting-started/installing.html