How to choose a server for Web applications - deployment

Sorry for this stupid question but I really don't know how can I choose a server for my web-application or my backend. You can always see something like "2 vCPU, 8 gib" but I don't know anything about this. How do you take this decision? If there is something that I could study... Please could you say to me what?
I have seen a lot of cloud services.

Related

Which server setup would be easiest to send a photo/text from an iOS app (swift) to a place where I can download/access them?

I'm using swift — and the app needs to send a photo and matching text (that a user submits) to a server so that I can download the photo/text.
Would an existing FTP server that I have setup for my website be possible for this application? Or would it make more sense to do something with a web portal?
During my research, I'm finding options like Backendless, Alamofire, Gold Racoon, and various others. They seem like overkill for the simple task I'm looking to accomplish. Is there some minimal service out there that can automate my simple need? If not, which of these options would you recommend for my situation?
Ideally the setup would be free, but I'd be willing to spend up to $100 or $10/month if the service fits.
I'm new to app development so I'm feeling overwhelmed with the options and not sure how to begin researching. I hope beginner questions aren't frowned upon here — I would really appreciate any advise on what I should begin learning to achieve my goal of sending a photo+text from an iOS app to a place where I can access them.
If there are other questions I should be asking to achieve this, please let me know.
For your case there are two main routes to consider
1. BYOS (Bring Your Own Server)
With this option, you are responsible for creating and maintenance of your own server.
Now you can use various services such as Digital Ocean and Amazon for this.
On top of this, you would be responsible for creating your own database and maintaining it as well. Plus, you would need to write server side code along with client side code (the app) in order to instantiate communication between the two.
The advantage of this is that you virtually have control of everything but I think it is pretty clear how painful this task is.
2: BAS (Backend As a Service) Highly recommended
With this route, you simply have to write the app and let another service handle the server side of things. One of the most common ones is Firebase. Most folks including startups go down this route.
There are a bunch of other services out there.
Two Cents:
Whatever option or service you decide to use, I would recommend you make sure that:
a. The service has a good track record.
You do not want something that might end up getting shutdown in the next couple months. I know it is hard to predict this but certain initial guesses/probabilities can be made.
b. Make sure its community is vibrant.
The last thing you as a newbie wants is to be stuck and have no one to help you. Research around and see the different questions people ask and whether or not answers exist.

Google cloud VMs and Cloud SQL

Basically, I'm confused after looking at so many Google Cloud products. I'm starting up a new project that includes a website, an iOS app, and an android app. I've decided to move forward with the Compute Engine as I'll have the flexiblility to do a lot stuff.
I'm thinking of using Cloud SQL for database service. I know that I can install MySQL on my VM. But I'm not sure what's the pros and cons. I'm still researching on this but in the mean time some experts opinion would be greatly appreciated.
TL;DR: Go with managed Cloud SQL. Better than doing it yourself and it doesn't cost much.
I'm no expert but I can tell you from previous experience that a managed database solution feels like much less of a hassle than doing it from scratch. Installing and configuring MySQL isn't especially hard, but it can get tedious (especially for devs like me who have done this many times over).
Also, when your app begins to grow, it'll just be a matter of pushing a few sliders to make your DB respond better to all the traffic. Trust me, you can enjoy a higher quality of life with words like "sharding" and "replication" not being part of your technical vocabulary.
Lastly, I don't remember Cloud SQL to be very expensive.

Is it possible to know if automated tools are used

Just wanted to know if it is possible to know from server that a webserver like Jboss is being accessd by a human being or by a automated tool from a remote system.
This is a huge question that many people have been trying to solve for years, and the problem is not specific to JBoss.
If the automated tool is "good intentioned" it would usually provide a distinctive "User-Agent" header in its requests, by which one easily knows "who's asking". But if the automated tool is trying to pretend to be a human, things can get complicated. That's why CAPTCHA was invented, for example (see a discussion here).
Usually this type of question is considered "not constructive" here, so you'd need to be more specific about your situation.
Please also note that JBoss is more of an "application server" than "webserver".

Can I use Couchdb as a webserver and the only backend?

I'm studying Couchdb right now. It looks like I could use Couchdb as a backend and web server without needing anything else. Am I correct? Do people use Couchdb as a only backend? Are there any disadvantages doing so?
The core team seems to have pulled back from this in recent versions, but a few years ago there was a lot more of a push to run standalone apps straight out of the CouchDB, these standalone apps are called "Couch Apps".
I don't know it was ever really more than a proof-of-concept (ie. I don't know that any significant web app is actually running on this platform), but if you're interested, apparently the tools do all still work, and there's still the http://couchapp.org/ site with a lot of good information.
Update
I want to add that if the problem you're trying to solve is the problem of javascript origin security, then you should know that recent CouchDB supports CORS

Playframework 2 in the cloud

I started with python on google app engine 3 months ago.
Then I switched to Play2! on Heroku + mongodb and it is a breeze to work with.
I am really far in my project and I want to release the website in the next couple of days. But I just saw the pricing for SSL on heroku, which is really high.
And I don't want to launch my website without SSL. SSL on heroku costs $20/month without the certificate.
I saw some alternatives in this post What cloud platform supports playframework 2.x deployments?
But I am still not too happy. I want to pay as little as possible to start my website.
So at the moment I am looking on Google App Engine again. This would mean that I have to rewrite my whole DB.
Does GAE restrict some features of play2?
I also saw dotcloud but their pricing page is really confusing. I don't know how far I can go with the sandbox mode, and there is a mark on SSL so I think its somehow included but there is also an SSL addon which doubles the price.
I am okay if my website will cost me more then I will get out of it for a few months, but with the ssl on heroku is just too much.
What would you recommend me?
Edit:
Currently I am looking at openshift which looks kinda interesting. They implemented SSL for free to all users, but I am still not sure if I can use this with my custom domain.
Edit2:
Okay it is only shared ssl. Which means I would have to get "Megashift" which costs $42/month
Edit3:
It seems that I can only deploy war files to GAE, which destroys the purpose of play2.
So I would have to choose between heroku, dotcloud and openshift. And all of them are expensive if you want to use SSL.
I would advice you to give openshift a try
It's free, red hat has stated that it will keep a free offering (it's not just during the beta...)
Here's a screencast:
http://playlatam.wordpress.com/2012/05/21/deploying-play-framework-2-apps-with-java-and-scala-to-openshift/
a github repo
https://github.com/opensas/play2-openshift-quickstart
and an article at red hat
https://openshift.redhat.com/community/blogs/supporting-play-framework-on-openshift-with-the-diy-application-type
I doubt that GAE will work properly with Play. The blacklisting of some classes will impact your project with several limitations that you won't have in another environment, and you have the issue of deploying war files (there are plugins for that in Play 2, but still).
Look at it from another point of view:
if your project is a personal "for fun" project with no other aim than trying something, you probably don't need SSL. Even if you really need (or want) SSL, 20$/month is not so much for a hobby, people pay close to that in games like WoW (subscription + extras) each month.
if your project is serious (startup, aiming to get money) you should stop worrying about expenses like 20$. They are investments to get the cash coming. If as a business you are willing to rewrite your code to save just 20$, you are doomed to fail.
I can recommend you Jelastic.
Besides it offers Jelastic SSL and Custom SSL as well at a reasonable price.
Some hosting Providers allow SSL for free for their customers and the price actually varies depending on the Hosting Provider you choose. So you have alternative here.
Jelastic has recently provided a tutorial on how to deploy Play 2 web framework application to the cloud. So you can freely use it as a basis.