I have finally finished building my Play! Framework 2.4 app and now I'm ready for deployment I think. On my local machine every works well and tests are green. Question is now, on what IaaS/PaaS do I deploy?
My domain logic in my application is completely separate from my persistence layer so switching to an alternative database driver is not a problem for me.
I've checked out multiple services and don't know what would be the best option in terms of cost effectiveness, scaleability and usability. Let me sum up what services I've already taken a look at:
Heroku - Definitely seems like a really streamlined work flow. Push to your git repo of choice and have Heroku handle the rest. The service should be pretty easy to integrate with the persistence backend because of their plethora of add-ons. I'd go for MongoDB if I went for Heroku. They seem to be really integrated with the whole scala-play ecosystem too which is a huge plus. They even have their own SBT plugin. Downsides are their high prices and limited "automated" scaling options. I find it weird that they still have a charge per dyno system in place and the fact that you have to manually scale your application is a big minus for me. One thing that is not yet clear to me is how they handle stuff like routing, failover and deployment. I also heard that they are running on basic AWS micro instances. Which brings me to my second option.
AWS - This is a more bare metal approach, I find. AWS is a bit in the middle in terms of "aaS". EC2 is definitely IaaS but they recently introduced stuff like Lambda and CloudDeploy which make everything a whole lot easier for me. The pricing is also a lot better I find. They only charge for the resources you actually use (this is what is advertised, could somebody give me some insight into this?). They currently host a lot of well known sites and well known for their cloud hosting expertise. One thing that is still a bit fuzzy for me, is how I'd do my persistence backend on AWS. I know the preferred way is to DynamoDB but I can't find any scala persistence framework compatible with the service (Are there any compatible with Play! Framework 2.4?). Scaleability is really important for me and I don't know if their standard RDS scales well enough so that my applications latency won't increase (Could somebody give me some insight into this). Integrating RDS would be a lot easier since I could just use Slick (Are there any suitable and viable alternatives?). The fact that AWS has a lot of services that might come in handy later on the road is also a huge bonus. Because configuration can be difficult
Google App Engine (Google Compute Cloud) - Google certainly has an edge on their competitors when it comes to their ability to handle big handle. Now I think my application won't be handling with these large quantities of data, so this would be unnecessary. Services I'm interested in however, is their App Engine. I have been reading quite a lot about it and I'm not sure this is even compatible with Play! Framework. In their docs, they only mention Java (my application is entirely in Scala) and also only mention the servlet container (which Play! Framework doesn't use). Are these two even compatible? I haven't been able to find the answer yet. I saw a lot of GitHub projects that claim to enable compatibility between the two but they always say that some import stuff doesn't work (like body mappers). Meaning, I'd have to switch to something like Compute Cloud which would raise costs by a lot. Also, their Google Datastore, which is mainly the reason I'm considering Google, doesn't seem to be compatibly either (not yet anyway). I haven't been able to find a good persistence framework built around Google Datastore.
Digital Ocean / Linode / etc. - This would certainly be the cheapest options but would require the most work. Every single piece of configuration needs to be done by hand. Security is very much my own concern and to be honest that is something that scares me in this world filled with dangers. Scaling would be a pain as well. Provisioning these servers would have to be done by hand (unless I use something like Chef or Vagrant, which requires more configuration). Load balancing could be handled by AWS in this case.
Did I miss something? If you have any suggestions, please leave a comment! I'd love some feedback on this issue so I can make a well educated decision in the near future and not focus my scarce development time on implementing a service or infrastructure only to find out that it isn't going to work because there is some magic piece of the puzzle missing.
Part two of this would be taking CI and CD into consideration but firstly I want to make the application running smoothly and having it scale at peak times without outages and headaches.
The application itself is in simple terms a sort of content publishing site. It requires a stable database connection and some sort of caching. Right now, it uses the disk as a cache but I'd like to move to something memory based as soon as I've chosen a suitable infrastructure. The application is stateless so it could easily be deployed on multiple instances and run side by side. The database is responsible for the links between them and keeping them all in sync. NoSQL would be preferred because of it's scaleability but if you guys have other recommendations or personal experience, please, by all means, do tell.
I hope my questions and intentions are clear (enough). If not, leave a comment please.
I know this question is regarded opinion based but I'm asking, not only for myself, but for the community. These things are stuff that needs to be figured out with new technology like Play! Framework. Languages like PHP and Ruby have a lot of support on this matter already and I think Play! definitely lacks in this compartment.
Aucun commentaire:
Enregistrer un commentaire