I consider myself a Java developer first but during my time at Microsoft and Skype, I had the chance to learn about C# and .NET. Over time, I started liking the advanced features in C# (that Java just recently started having) and the great ecosystem and tooling around .NET.
When I moved to Google and started working on Google Cloud Platform, I was naturally very happy to learn that Google Cloud Platform supports .NET applications.
In this blog post, I want to provide an overview of .NET support on Google Cloud Platform and talk about .NET client library.
If you want more details, .NET on Google Cloud Platform is the best page to get started, it includes quickstarts, code samples, tutorials and more.
Windows Server and ASP.NET
First question you probably have is: What kind of .NET applications can I host on Google Cloud and how? You can host ASP.NET applications on Windows Server running on Compute Engine.
The easiest way to get started is to use Cloud Launcher ASP.NET Framework to deploy Windows Server 2012, Microsoft IIS, ASP.NET, and SQL Express on a Compute Engine instance.
Once the ASP.NET stack is installed, ASP.NET apps can be deployed from Visual Studio using the regular Web Deployer (no special plugin needed) to your Compute Engine instance.
.NET on Google Cloud Platform page includes a Hello World with .NET sample on details on how to deploy .NET apps on Google Cloud. There is also a How to get your ASP.NET app up on Google Cloud the easy way post on Google Cloud Platform blog that you might find useful.
.NET Library for Google Cloud Platform
Once you have your basic ASP.NET app running, you probably want to know what .NET APIs and libraries exist for which part of Google Cloud Platform.
Currently, there are 2 different .NET libraries for Google Cloud Platform: Google API Client Library for .NET and Google Cloud Platform Client Libraries for .NET. The latter libraries are currently in Alpha and Beta stages, so I won’t talk about them in detail here but stay tuned for more details in a future post.
Google API Client Library for .NET is currently the official library for many Google services, including Google Cloud Platform. It includes .NET APIs for many Google Cloud services such as Cloud Storage, BigQuery, Pub/Sub, Dataflow and more. The full list is on their APIs page (search for “cloud” for Google Cloud related APIs).
I want to outline some of the main .NET APIs for storing data, messaging, BigQuery and point to their NuGet packages and source code for easy reference.
Every application needs some kind of structured data and you have 2 options to store structured application data:
- Google Cloud SQL can be used with regular Entity Framework (no special API needed).
- Google Cloud Datastore (NoSQL) can be used with Google Cloud Datastore API Client Library for .NET (NuGet | Source).
There is also a GitHub repository called dotnet-doc-samples where more and more samples are being added for .NET on Google Cloud Platform.
As you can see, .NET is a fully supported framework and it’s only going to get better, so I’m very excited to see how .NET support will evolve going forward on Google Cloud Platform.