Best methods for developing on/from a cloud server? - database

I recently landed myself on a project that, like most projects today, relies on multiple relational databases and also, like most projects today, relies on the flexibility and security of cloud computing.
I got into cloud services a little over a month ago and since then I've tackled the basics of most the services that Amazon Web Services offers but have only tested and deployed personal projects.
Now I will be working on a clients server and its a hefty instance, therefore I need to research the best method for developing a pre-existing application on a cloud server. Also bare in mind that the data stored in the databases is also being updated 'live'/dynamically.
I assume it's still good practise to take a local copy to work on? In that case, is the best method to download the whole server using ssh? If so, are there any alternatives? I feel that just downloading the whole server and setting it all back up bit by bit (including the data 'stream') will be very time consuming for such a big application connected to such big databases.
Is there something a little more elegant?

If you are working on a cloud environment you may have developement environment.
You may have a local repository but nothing more than your IDE and your versionning tool.
All your service might be provided by the cloud and the most efficient way to test you code is to do it on a target Image.
personally ,I use cloud foundry or IBM Bluemix with my git repository. I push directly the modifications when i want to test.

you can use cloud services,you dont have to think about server setup/services.you will just need a repository like git.
you can follow below sample link for getting started on configuration on bluemix:
https://hub.jazz.net/tutorials
https://www.facebook.com/ibmswg?ref=hl&ref_type=bookmark

Related

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.
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?
How do i install the Couchbase database in that hosting service?
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.
You are correct that you need a server (somewhere) and just install Couchbase server on it by following the Couchbase instructions.
Or you could use the AWS prebuilt version.
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:
Sign up for the AWS free tier: https://aws.amazon.com/free/
Get set up for AWS EC2: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html
Follow the getting started guide to create an AWS VM instance: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html
Install Couchbase: http://developer.couchbase.com/documentation/server/4.0/getting-started/installing.html

Does it make senesce to use Amazon RDS with app hosted on other managed hosting service (not amazon)

I am developing a mobile app and I am now getting to the stage where I want to put all my back-end server code online for the production version (I actually want to release my app). The back-end consists of 2 parts:
MySQL Database
Actual PHP files for app access.
Looking for a service that is popular, highly scaleable and proven, I came across Amazon Web Services. Now while RDS seemed very straight forward to use for the database part, EC2 was way too complicated for me and I decided on using a managed solution, which puts it out of the question.
Seeing as the simple PHP pages could be moved easily to any service at any time (unlike the database which is a bit harder to move with no downtime), I have decided to use a much cheaper solution for the time being for the PHP pages.
My Question is: Does it make senesce to use Amazon RDS with app hosted on other managed service (rackspace, azure, godaddy etc...)?
While it is technically possible, it depends on your application if it is generally okay to do so. Keep in mind that there will be extra delay in the communication between the RDS instance and your server - and this will happen with every database request you do. You can for example check the network latency with simple tools like ping or traceroute. In general you are looking for the lowest latency possible for database queries.
However if your app hardly does any reads from the database, this could work. If not, I would strongly advise against this. In this case you would either have to install a MySQL database on your managed server or start using EC2.

Migrating from AppEngine

I have developed a application using GWT/AppEngine/Objectify. There are many clients who want this locally deployed in their environments as the data is sensitive.
I cannot think of a way where the data of a application is hidden from its developers in AppEngine. Even I encrypt the data there will be always question about security.
I thought of the following alternatives
a) I have now a multitenancy application in appengine. I can now have a deployment for particular clients using their individual google accounts. This way they have security of data. I am not sure how I will handle new deployments. There is nothing like sharing the application with a user.
b) Migrate to MongoDB/MYSql.
This will lead to the whole question of handling migrations when data models are changed.I have read that with MongoDB I will not face migration issues. Is this correct.
What would be the best way to solve this issue. The root issue is that we as developers have access to data in Google/AppEngine environment which the client does not want.
Any help would be appreciated.
The easiest would be for the client to create an App Engine account and you only supply the war.
If you still plan to migrate away from GAE, then you might want to take a look at AppScale and capedwarf-blue.

Alternative for Google AppEngine?

I recently had to realize a project on Google AppEngine. At the beginning I was sceptic. But there a some really nice approaches on Appengine:
No server setup. Everything works out of the box. Gzip, libraries, etc.
One-Click-Deployment. Fire up GAE Launcher on the Mac and click DEPLOY. Done.
Low costs
Easy in-production-logging
But there are some things I don't like if I'm thinking about professional projects
The blobstore. It's just... weird. And non-backupable
All the 1 MB restrictions
The feeling that your code will only run on AppEngine. (BigTable)
Do you know any similar alternatives to AppEngine? And I don't mean services like EC2.
You can have a look at AppScale
Its an open-source implementation of AppEngine which you can deploy on your own machines, with a host of databases to choose from.
I think Heroku is a great alternative.
It can run most of GAE existing apps, since it supports django, but also:
It supports Ruby (w or w/o Rails), Java (w or w/o Spring), Node.js, Clojure,...
It has a strong CLI support (git push for publishing, creation of apps, scaling, log, ps,...)
It supports MySql and PostgreSQL (and, so on, MongoDB, Amazon RDS, etc.)
It has a free tier for 750 hours a month (~1 machine always up) for every app.
It has a collection of addons for providing cloud services as a resources for the apps
It has an add-on program to develop your own add-ons.
Really, it is a good alternative.
If you want your application is not binded to GAE, the best approach is to use well-known langs and well-known persistence providers. Ruby+PostgreSQL, for instance, could be a combination very portable. Django as well, but w/o BigTable...
AppScale and TyphoonAE are both third-party implementations of the App Engine platform. TyphoonAE is targeted at small-to-medium scale, while AppScale is targeted at the large-scale end of things.
As far as backing up the blobstore goes, this is quite doable: just use the built in handler to serve blobs, and, in conjunction with remote_api, you can download your blobs just fine.
I almost hate to mention Microsoft in a Google-related question, but I'm completely vendor-agnostic. So, I'll offer Microsoft's Azure as a platform that offers many similarities to AppEngine but enough differences that it might fit as a good answer to your question.
Azure and AppEngine are similar in that they are both designed to allow you to build easily scalable applications. Azure gives you Microsoft's standard web toolkit options: C#, VB.NET, ASP.NET ASP.NET MVC, but also offers PHP. It has a NoSQL, document database like AppEngine but also gives you the option of choosing a more standard instance of SQL Server. Although I haven't used it myself, it looks like AppEngine for Business now offers SQL, too.
Azure gives you a ready means of having long-running background processes. AppEngine does not to the best of my knowledge.
From my perspective, AppEngine has the huge advantage of charging you for usage only when a request is actually being processed. An Azure instance causes you to get billed even for time that it is completely idle. That's entirely typical, but the fact that Google doesn't so it that way makes me choose AppEngine every time. My budget is too tight to allow me to spend money for idle CPU hours.
There's a port of django to non-relational databases that works with app engine or mongodb.
google for django non-rel
documentation is a bit sparse though

What alternatives are there to Google App Engine? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
What alternatives are there to GAE, given that I already have a good bit of code working that I would like to keep. In other words, I'm digging python. However, my use case is more of a low number of requests, higher CPU usage type use case, and I'm worried that I may not be able to stay with App Engine forever. I have heard a lot of people talking about Amazon Web Services and other sorts of cloud providers, but I am having a hard time seeing where most of these other offerings provide the range of services (data querying, user authentication, automatic scaling) that App Engine provides. What are my options here?
AppScale
AppScale is a platform that allows users to deploy and host their own Google App Engine applications. It executes automatically over Amazon EC2 and Eucalyptus as well as Xen and KVM. It has been developed and is maintained by AppScale Systems. It supports the Python, Go, PHP, and Java Google App Engine platforms.
http://github.com/AppScale/appscale
In the mean time...
...it is amost 2015 and it seems that containers are the way to go forward. Alternatives to GAE are emerging:
Google has released Kubernetes, container scheduling software developed by them to manage GCE containers, but can be used on other clusters as well.
There are some upcoming PaaS on Docker such as
http://deis.io/
http://www.tsuru.io/
even Appscale themselves are supporting Docker
Interesting stuff to keep an eye on.
I don't think there is another alternative (with regards to code portability) to GAE right now since GAE is in a class of its own. Sure GAE is cloud computing, but I see GAE as a subset of cloud computing. Amazon's EC2 is also cloud computing (as well as Joyent Accelerators, Slicehost Slices), but obviously they are two different beasts as well. So right now you're in a situation that requires rethinking your architecture depending on your needs.
The immediate benefits of GAE is that its essentially maintenance free as it relates to infrastructure (scalable web server and database administration). GAE is more tailored to those developers that only want to focus on their applications and not the underlying system.In a way you can consider that developer friendly. Now it should also be said that these other cloud computing solutions also try to allow you to only worry about your application as much as you like by providing VM images/templates. Ultimately your needs will dictate the approach you should take.
Now with all this in mind we can also construct hybrid solutions and workarounds that might fulfill our needs as well. For example, GAE doesn't seem directly suited to this specific app needs you describe. In other words, GAE offers relatively high number of requests, low number of cpu cycles (not sure if paid version will be any different).
However, one way to tackle this challenge is by building a customized solution involving GAE as the front end and Amazon AWS (EC2, S3, and SQS) as the backend. Some will say you might as well build your entire stack on AWS, but that may involve rewriting lots of existing code as well. Furthermore, as a workaround a previous stackoverflow post describes a method of simulating background tasks in GAE. Furthermore, you can look into HTTP Map/Reduce to distribute workload as well.
As of 2016, if you're willing to lump PaaS (platform as a service) and FaaS (function as a service) in the same serverless computing category, then you have a few FaaS options.
Proprietary
AWS Lambda
AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.
AWS Step Functions complements AWS Lambda.
AWS Step Functions makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Building applications from individual components that each perform a discrete function lets you scale and change applications quickly. Step Functions is a reliable way to coordinate components and step through the functions of your application. Step Functions provides a graphical console to arrange and visualize the components of your application as a series of steps. This makes it simple to build and run multi-step applications. Step Functions automatically triggers and tracks each step, and retries when there are errors, so your application executes in order and as expected. Step Functions logs the state of each step, so when things do go wrong, you can diagnose and debug problems quickly. You can change and add steps without even writing code
Google Cloud Functions
As of 2016 it is in alpha.
Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions that respond to cloud events without the need to manage a server or a runtime environment. Events from Google Cloud Storage and Google Cloud Pub/Sub can trigger Cloud Functions asynchronously, or you can use HTTP invocation for synchronous execution.
Azure Functions
An event-based serverless compute experience to accelerate your development. It can scale based on demand and you pay only for the resources you consume.
Open
Serverless
The Serverless Framework allows you to deploy auto-scaling, pay-per-execution, event-driven functions to any cloud. We currently support Amazon Web Service's Lambda, and are expanding to support other cloud providers.
IronFunctions
IronFunctions is an open source serverless computing platform for any cloud - private, public, or hybrid.
It remains to seen how well FaaS competes with CaaS (container as a service). The former seems more lightweight. Both seem suited to microservices architectures.
I anticipate that functions (as in FaaS) are not the end of the line, and that many years forward we'll see further service abstractions, e.g. test-only development, followed by plain-language scenarios.
Alternatives:
1. AppScale
2. Heroku.
Ref: Alternative for Google AppEngine?
Amazon's Elastic Compute Cloud or EC2 is a good option. You basically run Linux VMs on their servers that you can control via a web interface (for powering up and down) and of course access via SSH or whatever you normally set up...
And as it's a linux install that you control, you can of course run python if you wish.
Microsoft Windows Azure might be worth consideration. I'm afraid I haven't used it so can't say if it's any good and you should bear in mind that it's a CTP at the moment.
Check it out here.
A bit late, but I would give Heroku a go:
Heroku is a polyglot cloud application platform. With Heroku, you
don’t need to think about servers at all. You can write apps using
modern development practices in the programming language of your
choice, back it with add-on resources such as SQL and NoSQL databases,
Memcached, and many others. You manage your app using the Heroku
command-line tool and you deploy code using the Git revision control
system, all running on the Heroku infrastructure.
https://www.heroku.com/about
You may also want to take a look at AWS Elastic Beanstalk - it has a closer equivalence to GAE functionality, in that it is designed to be PaaS, rather than an IaaS (i.e. EC2)
If you're interested in the cloud, and maybe want to create your own for production and/or testing you have to look at Eucalyptus. It's allegedly code compatible with EC2 but open source.
I'd be more interested in seeing how App Engine can be easily coupled with another server used for CPU intensive requests.
TyphoonAE is trying to do this. I haven't tested it, but while it is still in beta, it looks like it's atleast in active development.
The shift to cloud computing is happening so rapidly that you have no time to waste for testing different platforms.
I suggest you trying out Jelastic if you are interested in Java as well.
One of the greatest things about Jelastic is that you do not need to make any changes in the code of your application, except the changes for your application functionality, but not for the reason the chosen platform demands this. With reference to this you do not actually waste your time.The deployment process is just flawless, and you can deploy your .war file anywhere further.Using GAE requires you to modify the app around their system needs. In case if you happen to get working with Java and start looking for a more flexible platform, Jelastic is a compatible alternative.
You can also use Red Hat's Cape Dwarf project, to run GAE apps on top of the Wildfly appserver (previously JBoss) without modification.
You can check it out here:
http://capedwarf.org/

Resources