Hosting java web application with oracle database - oracle11g

I have been trying to find out how best I can host a JavaEE5 web application with Oracle11g database. I have got my domain registered and currently pointing to my Jboss web application on my laptop.
I would like to host it for a while untill my application gets finished and ideally would like to go on hosting on a professional company server when I start getting increased traffic.
Firstly, to host at my home I want to use a separate dedicated server. Can you please let me know what options I have? Because I have no clue on what to purchase.
Secondly, when I want to go with a professional company server, which ones should I consider that supports JavaEE5 deployments and Oracle11g databases? Let me know if you need more details.

Personally I have experience with OpenShift. Free plan offers JBoss AS 7.1.1 and MySQL or PostgreSQL, but it's very slow (you might want to try these two my demo applications: personal site and e-shop). Paid plans looks for me too expensive here. This solution might be appropriate if you don't wanna configure application server and database.
Another possible solution is Amazon Web Services. There are such services as Elastic Beanstalk that offers you different servers including Tomcat, Amazon Relational Database Service that offers you Oracle Database as well as other RDMSes, and Amazon Elastic Compute Cloud that enable you install JBoss AS yourself even if Beanstalk with Tomcat doesn't work for you. It looks like AWS is cheaper than OpenShift, but as for me, EC2 is still expensive. Check if price works for you. Buy the way AWS has a free tier the first year of usage that includes EC2 instance. So if you're sure that your project will long less than a year, it might be a good choice. ASW would be appropriate for you if you are ok with Tomcat instead of application server and you don't wanna configure application server and database.
Also I heard positive comments about Digital Ocean, but never tried it. It looks like it offers only infrastructure as service (like AWS EC2) so you will have to install and configure all servers yourself.

Related

Host nodejs app and Wordpress website

I need to host 2 solutions. The first is a nodejs app which should be consumed using sockets from various client apps (mobile, website...). Then, a Wordpress website. Both must have the same database because data has to be shared between the website and the nodejs application.
So, which cloud provider can be the best to host these two projects ? Something like AWS or Azure (Websites, cloudservice, VM, ... ?), or OVH or Ikoula which are really less expansive.
Thanks!
I know AWS will work. I haven't really dealt with the others yet. I use AWS for quite a few projects and so far I've had no issues.

Run aspx site backed by MySQL on Azure

I'm completely new on Azure, I have a aspx.net site that talks to a MySQL db, I would like to run both, site and db on Azure, what would be the bext way to do so? Thanks
There are a number of options here depending on the load and bandwidth you expect, what kind of service level agreement you need, the amount of control you want over the application, etc. Let me start by saying you can try all these options out - free - for 90 days with a trial account.
The easiest (and cheapest) entry point would be Windows Azure Web Sites Depending on your bandwidth requirements, you could actually run this completely free (along with a MySQL DB on Azure for a year). Web Sites are shared infrastructure, though there is a higher tier (reserved) which can give you a more consistent availability and throughput. At this time, Web Sites are in a preview mode, so there is no SLA. For a walkthrough see this tutorial.
Via Windows Azure Cloud Services (Platform-as-a-Service) you could deploy your ASP.NET site to a Web Role and use the ClearDB offering (their free offering is what you get as part of Web Sites above). Cloud Services give you a lot more flexibility to scale your application and couple it with other enterprise-grade services in the cloud, and it's covered by a 99.95 SLA. You are charged an hourly rate depending on the configuration and number of virtual machines running your app. With Cloud Services, you'd use Visual Studio and simply deploy your application as a Cloud Service - the management of the underlying resources (virtual machines, etc.) is handled for you by Windows Azure - hence "Platform-as-a-Service"
Lastly there's the newly released Virtual Machines option (Infrastructure-as-a-Service) where you take complete control of the VM that hosts your application. Unlike, Cloud Services you own your VM, so it's up to you to apply operating system patches, install your application and any other ancillary software, and apply any necessary configuration steps. It's a lot of power with a lot of responsibility. In general, I'd only consider Virtual Machines for your scenario if there's a specific technical reason Cloud Services won't work. For the MySQL side, you could also use a Virtual Machine to run MySQL on your own, but again you would own the administration of that service, have to apply patches, clear logs, etc.

IIS, EC2, Web Farm, Web Deploy and ELB

I'm a developer now developing my startup. I really don't know much about IIS setup. I will host my startup on Amazon EC2. And I want to know how can I scale my application if my traffic increase. I been reading about MS Deploy and Web Farm Framework here: https://serverfault.com/questions/127409/iis-configuration-synchronization-for-web-server-farm . And I want a simple architecture, with not to much configuration. So I been looking an experience with an IIS web farm and Amazon ELBs. And I did not find any one.
So the question is:
It is possible to make a IIS web farm with Amazon ELBs?
Any experience on Ec2? IIS web deploy or WFF and/or without ELBs?
What you recommend for an easy web farm setup?
You can do almost anything you want with IIS on EC2. They are full servers (well window 2k8 datacenter edition) and you can open any ports you need to communicate between servers. Here is an explicit tutorial on how to set up WFF, for example, on EC2.
The question is, are you sure you need to build a web farm? If you simply want to have multiple servers running your code then you can accomplish this without anything more than IIS and the tools that EC2 provides.
You build your app so it uses shared resources (like a session state server, central location for storing user uploaded content), configure a server the way you like it, and capture a server image (AMI). You use this image when you configure AutoScaling to launch new instances based on server metrics (like CPU usage), and they would be automatically added to the load balancer when launched.
The last challenge is ensuring servers launched automatically are running your latest code. You can write a custom program to get the latest code from somewhere (like SVN) on server startup, or you can use something much simpler like Dropbox to handle the synchronization.

Deploy web site to azure and traditional IIS

I currently work with a legacy asp.net web application and one of the requirements going forward is that it be deployable to windows azure.
I would like to know how difficult it will be to manage deployment to both Azure and a traditional IIS web server.
Azure seems to require a specific customized version of a web applicaiton project is it possible to deploy the customized web application to a standard IIS instance once it has been converted.
EDIT:
It is a ASP.NET Web Application rather than a Web Site (compiles everything into one dll)
UPDATE:
In the end due to the amount of work involved in converting the application to work in Azure and the cost of Azure compared with other cloud solutions it was decided to go with a traditional Cloud hosted virtual server.
And thank you for the really good answers.
Whether or not you can deploy your application to Azure almost as is depends a lot on how your application works. Azure pretty much requires your application be stateless. If it's a plain vanilla web application that stores data in the session or application cache only and saves data to a database only, then you can deploy it to Azure.
If you have stateful services running like background threads (which is bad anyways), or if you save data to the file system (besides temporary caching), then you may have issues. Really, the issues moving to Azure are really the same as moving to any multi-server load balanced solution. One caveat is permanent storage.
If you need to store data in a place other than the database, then you're best off working with Azure's storage solution which has an API and client library for storing binary data, key/value data (they call it tables, but really, it's not tables), and queues. They also do have a transparent blob-as-file-system option for compatibility. If you want to use these in your app that also is used outside of Azure then you need to write an extra layer between your code and the Azure client library that supports both Azure services and standard local service. Azure SDK does include emulators for Azure services, but they're definitely not meant for production use.
As far as the mechanics of Azure-specific projects, that is actually not that difficult. Yes, you need to create an Azure-specific project in your solution that defines the Web Role and what gets deployed, but it will reference your existing Web Application, not the other way around. You can deploy the Azure Web Role to Azure or you can continue to deploy the existing application to IIS normally and concurrently.
Web Site, Web Application, MVC, really doesn't make much of a difference. Actually doesn't have to be .NET either. Can be PHP or Java or whatever you want to put on your VM. It'll all work the same as far as Azure is concerned.
MS likes to push Azure as a Platform-as-a-Service (Paas) solution where they have a ton of services they offer and you run apps on their standard platform, and contrasts that with Amazon AWS which they call Infrastructure-as-a-Service (Iaas) which is "just" a Virtual Machine. However, MS is really just as much a IaaS solution as AWS, perhaps even more so. The only difference between AWS and Azure is AWS allows you to choose what to install on your VM and with Azure you have to use Windows Server 2008 R2 as the basis for your VM (but you can customize the VM image to install custom software on top of windows). With both Azure and AWS, the hosts offer additional PaaS services you can take advantage of for data storage and message routing. AWS also offers tons of extra services like video streaming.
Also note that with Azure (and AWS I think) you can use the services they offer even in a non-hosted application. If you want to use Azure's data storage from a non-Azure application, you can do that, it's just HTTP REST calls to get/put data. The only differences you pay for data in/out between datacenter and your non-datacenter-hosted application which would be free if the app was also inside the datacenter (just the data in/out is free in-datacenter, you still have storage and transaction fees).
A few things:
Samuel Neff's answer mentioned mounting a file system in a blob (a Cloud Drive). Only one instance may lock this cloud drive for writing, so it does not behave like a network file share. You'll need to plan for this.
You'll need to integrate with the Windows Azure diagnostics subsystem, to gain visibility into your app's run state (e.g. performance counters, trace logs, etc.).
If there are 3rd-party apps that your web app depends on, you'll need to install these. These actually get installed as part of the role instance's boot process, either via your OnStart() event handler or as a startup task. The latter allows for admin-level installs (including registry changes, COM component installations, etc.). You'll need to carefully manage these installations, as they impact the boot time of the instance.
For an asp.net app, you'll need to think about session state. In-proc session state won't work, because each instance will have its own state store in memory. The SQL Azure session state provider doesn't have background cleanup agents, so you'll need to build this into your web or worker role instance (see this blog post by the SQL Azure team for the implementation). The best option is to use the AppFabric Cache, a new service that just went into production. This cache-as-a-service provides an custom session state provider for asp.net as well. Note: As of today, the AppFabric Cache service is only accessible via a .NET interface; there's no REST interface for it (all other storage services - tables, blobs, queues - have a REST interface). .NET, Java, and PHP all have storage client libraries. Ruby has one from the open source community.
You'll have to manage scaling out to more than one instance, when the need arises. This is not a built-in service today, but there are 3rd-party services such as ParaLeap's AzureWatch. There's also Microsoft's System Center Operations Manager, which now has Windows Azure monitoring support. You'll also need to handle scale-back situations, where you reduce the number of server instances.
I have some additional details in an answer for a similar StackOverflow question, here.
I have not tried Windows Azure Migration Scanner personally, but if it works as advertised, this would really come in handy.

Hosting an in-process document database on Windows

Are there any document-databases, similar to MongoDB, that run within an ASP.NET web application, and could be hosted on a server without any unique machine configuration?
I'm asking this because the hosting provider I'm currently with only support SQL Server 2008 as a database, but I'd like to run my website off a document database.
(Or am I better off going with a specialized database host, such as MongoHQ)?
I currently use MongoDB for ASP.NET apps and it works quite well ... however we have our own servers.
The question here seems more to do with the host then MongoDB, or CouchDB, etc.
In this case, yes ... I would say a good option would be to go with a hosting service like MongoHQ (they have quite reasonable rates compared to SQL Server hosts for example.)
That said why not just get a VPS that gives you total control of you Windows server?
You can find a Window VPS for reasonable prices and install whatever you want on them ... including MongoDB.

Resources