Over a million developers have joined DZone.

Java and MongoDB in PaaS

DZone's Guide to

Java and MongoDB in PaaS

· Database Zone ·
Free Resource

Self-hosted vs Managed Service?  Learn how managed enterprise graph databases reduce project costs and increase time-to-delivery.

  Short prequisites. I'm working in my spare time on personal project, for current easiness and future scalability I chose MongoDB for data, programming language is Java, it's my mother tongue :) Eclipse IDE and Tomcat as web server because of it's popularity and ease of use. To work with MongoDB from Java I chose Morphia. This choice of tools reduced my options to Heroku, AWS, CloudBees, CloudFoundry, Jelastic, OpenShift, DotCloud.

  Google app engine is nice, but it's binds you to their big data and if we are going for PaaS which should mean freedom, this is not an option.

  As I said, I work on this project in my spare time which is scarce and precious. My main requirements were, that deployment should be fast and easy, and service should be free for small development environment.

  From the start I used GitHub as my repository and thought that Heroku would be my natural choice, but my project is built from number of modules and web application is only one of those modules. Now, that I created second web app it's a necessity. While trying to deploy my app to Heroku and similar services where deployment is done by using git, I failed to do so without changing my project structure, also I haven't found any help for this issue, so I moved over.

  Removing git oriented PaaS'es left me with AWS, CloudFoundry, CloudBees and Jelastic.

  AWS is nice, but you have to do a lot of configuration and it's free only for one year for micro instances.

  Jelastic is very nice and simple, but they have free program only for a week.

  CloudFoundry was good, until I found that their version of MongoDB doesn't work with Morphia. Also plugin for Eclipse is still raw and buggy.

  Here I came to CloudBees. I came to it last, because they ask for credit card details to use extended services like MongoDB. Easiness of use and plugin for Eclipse to deploy projects from IDE made it my choice of development environment. In addition to running environment CloudBees also gives git and svn code repositories, but I haven't used it yet. Tip: to see application logs on site you have to route your logs to standard output. Onsite logs representation may be confusing for a large applications with a lot of logging, but there is useful service Papertail that helps to manage logs for those cases.

  All in all I think that PaaS is a great leap in reducing headache for developers who want to concentrate on development and not to lose time on environment maintenance.

Self-hosted vs Managed Service?  Learn how managed enterprise graph databases reduce project costs and increase time-to-delivery.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}