Moving an application to the cloud (C# .NET)

Associate
Joined
22 May 2011
Posts
1,445
Location
Edinburgh
Hey all,

Basically I'm looking to see if there is anyone here who has any experience with WCF and Web Services. I'm looking for some guidance for a final year programming module (only pointers etc!) at Uni which I am kinda struggling with :/
 
Soldato
Joined
18 Oct 2002
Posts
3,926
Location
SW London
What exactly are you trying to do?

Do you have an application at the moment that you're trying to make cloud based?
Does it actually need to run in the cloud or do you just want to separate things into a client and server?
 
Associate
OP
Joined
22 May 2011
Posts
1,445
Location
Edinburgh
What exactly are you trying to do?

Do you have an application at the moment that you're trying to make cloud based?

Yes, a monitoring program which takes a text file and loads it into a list of class objects, which then polls at pre-defined intervals and returns an integer on the health of the data.

Does it actually need to run in the cloud or do you just want to separate things into a client and server?

One of the requirements is to move part of the program to Windows Azure and invoke the program as a reference to the web service.
 
Soldato
Joined
27 Mar 2003
Posts
2,710
I have been using azure now for almost a year now and it's dead easy to spin up a website/ webservice. It's even easier if you are using visual studio 2013 as that can do it all for you.

You can either configure it via the azure portal and then download the publishing profile or just log into your "azure" account via Vis Studio 2013 and create/publish in one go.
 
Associate
Joined
1 Dec 2005
Posts
803
Which bit do you want to offload to Azure, the reading of the text file or the polling - or something else? Does your application currently have any WCF involved at all?

If it wasn't for the polling aspect I'd suggest using the Cloud Services option and having a little WCF endpoint on there to receive instructions about which things to poll. However, web worker processes aren't really designed for long running tasks or tasks which need to run indefinitely, because typically they're often recycled or shutdown for other reasons outside of your control (as the developer).

You could get away with an extra-small Windows VM and a small Windows service with a self-hosted WCF endpoint, which can take care of receiving your instructions (e.g. from your file, submitted over the wire) and handling the polling itself. How much you care about recovery when the service restarts (e.g. due to OS patching) is up to you and probably outside of the scope of your assignment.

What you'll end up with, as Haircut has alluded to, is a client-server application where your server component (in Azure) is doing the real work and your client application is just feeding it instructions, having referenced the .svc endpoint hosted by your server application.

I'm a big fan of WCF and do a lot of work with distributed applications, but haven't done a great deal with Azure. Feel free to hit me up with any questions :)
 
Associate
Joined
15 Mar 2010
Posts
449
WCF is old hat - can you use web api instead? If so you could configure a self hosted web api service through OWIN and host it in a persistent worker role with an external HTTP endpoint.
 
Soldato
Joined
27 Mar 2003
Posts
2,710
WCF is old hat - can you use web api instead? If so you could configure a self hosted web api service through OWIN and host it in a persistent worker role with an external HTTP endpoint.

Although WCF is a little old school now it may be a requirement of the project. Also WCF still has its place in the service layer world where non-http based solutions are required.
 
Back
Top Bottom