The concepts in this post were first introduced in a talk at the 2015 Cassandra Summit.

I’ve been a .NET developer for roughly 10 years now - since the summer after my freshman year in college in 2005 I’ve been developing in Visual Studio and .NET. I’ve founded three startups on .NET, worked for Microsoft, and founded multiple successful OSS projects in .NET - I say all of this in evidence to the depth of my commitment and investment in the .NET ecosystem.

But it’s time we, the .NET community, address a major elephant in the room - .NET is, and often has been, way behind in other ecosystems in terms of overall innovation, openness to new ideas, and flexibility.

The Experience of Being a .NET Developer

.NET has been, historically, an expensive ecosystem to play in.

Because to play in it, you have to do so by Microsoft’s rules.

It's Ballmer's World, Bro

  • You have to buy a license for Visual Studio, or more likely, an MSDN subscription.
  • You have to buy a license for Windows Server.
  • You have to buy a license for Windows Server.
  • You have to develop your web applications in a framework built by Microsoft, like ASP.NET or WCF.
  • You have to host your web applications in IIS.

And the list goes on - the point being that our entire way of developing our own products depends on a single company in Redmond choosing what tools it wants to make available to us at any given time and price.

The Impact of Marrying .NET to Microsoft

I want to share with you a little story from a point in my career with Microsoft during 2010-2011. By 2011 HTML5 had become mostly standardized and its APIs were rapidly being adopted by all of the major web browsers.

One of the new APIs that really, really excited developers in early 2011 was the introduction of WebSockets - everyone, including .NET developers was flipping out about the possibilties WebSockets created; with them we could develop new types of applications that never could be built with long-polling and AJAX.

But when it came to adopting WebSockets in .NET in 2011, we had a big problem: Internet Information Services, the web server built into Windows Server, had zero support for WebSockets.

Even if you managed to find a websocket library for .NET, and there really weren’t any at the time, we had to wait for the next release of IIS to come out… Which was going to be bundled with the next release of Windows Server, 2012… 12-18 months away.

Welcome to the world of developing at the pace of Microsoft.

Thus the choice .NET developers made was either:

  • Wait for 12-18 months plus $N dollars per server and do a major systems upgrade whenever Microsoft said you could; or
  • Switch to Node.JS, the new kid on the block at the time – and boasted fantastic support for WebSockets through its library, which is still immensely popular today.

I witnessed droves and droves of .NET developers make the obvious choice: abandon .NET and switch to a platform that didn’t introduce stupid tradeoffs like this.

This has been the story of our ecosystem. Play by Microsoft’s rules… Or go somewhere else.

And LOTS of our best .NET developers have, depriving our OSS ecosystem of talent and making our community increasingly populated with hardliners who aim to solve their problems by writing checks to Redmond.

In short: our ecosystem has been one where we’ve had to trade away our access to the rest of the world’s innovation for the comfort and familiarity of Visual Studio and an integrated experience. And recently, that experience has become less and less valuable on its own.

This… is what the experience of developing in .NET has been like, until the recent past.

Today and into the near future, we have an exciting opportunity to reinvent ourselves, our careers, our products, our companies, our entire ecosystem, and the experience of being a .NET developer.

A New Era for .NET

Let’s consider an exciting possibility for us…

What if we could

  • Build reliable, distributed systems in pure C# and F# that can support increasingly write-heavy workloads;
  • Using Visual Studio, Sublime Text, or any other editor or IDE we want;
  • Deploy our apps on Windows, Linux, or OS X with consistent performance and behavior; and
  • Deploy our applications nimbly using the latest containerization and configuration management technologies like Docker, Apache Mesos, and Kubernetes.

This would have been considered a pipe dream two years ago - but I’m here to tell you that this future is possible right now in .NET… Using the new .NET stack.

The New .NET Stack

Here’s what the new .NET stack looks like:

The New .NET Stack - Growth Mindset, Windows Azure, Cassandra, Spark, CoreCLR, Akka.NET, and ASP.NET vNext / Nancy

  • Growth Mindset - the first part of the new stack… Is adopting a new mindset about ourselves and our capabilities as .NET developers; moving from the old, static, fixed way of looking at the world to a dynamic, growth-oriented mindset where .NET developers radically experiment and explore new ways of solving problems, versus retreating at the first sign of trouble back to ASP.NET CRUD and SQL Server.
  • Windows Azure / Cloud Infrastructure - in order to have a growth-oriented mindset, we have to run our software in an environment where it’s easy to experiment with our infrastructure, systems design, deployment procedures, and technology choices. Nothing is better suited to this than the cloud, and with the variety of application experiences offered by Windows Azure I believe that it’s the best cloud for this new order within .NET.
  • Cassandra + Spark - changing our data layer from the crusty old SQL Server, relational, batch-processing-oriented world to one that’s linearly scalable, streaming, real-time, and open source is a radical transformation by itself. It opens up things that will never be possible with just SQL Server alone, and gives us a foundation we can use to design 21st century applications that satisfy our customer’s expectations of high availability, low latency, and ability to do more faster with more data.
  • CoreCLR / Mono + CLR - with the advent of Mono 4.0, the first version to incorporate code from the recently OSSed CLR, we now have the ability to begin running server-side .NET applications with performance that’s becoming comparable to what we can achieve on Windows. Code on Windows or Linux or OS X; deploy on Linux or Windows. And what’s perhaps even more exciting for .NET developers is the possibilty of CoreCLR - a true cross-platform .NET runtime currently under development by Microsoft. Platform independence in .NET is now a reality.
  • Akka.NET + Akka.Cluster - there’s a lot of really exciting things happening at the application layer for .NET developers; the biggest one in my mind is the emergence of an actual .NET OSS ecosytem that’s capable of delivering true distributed, network programming frameworks like Akka.NET. One of the things we can do with Akka.NET is enjoy the same scalability, distribution, and low-latency benefits offered to us at the data layer by Cassandra and Spark in our application layer too. We can even build stateful applications with Akka.NET actors which are capable of delivering the types of experiences to our users that we would have called “impossible” under the old ASP.NET CRUD + SQL Server only paradigm.
  • ASP.NET vNext / NancyFX - the last piece of the stack is the UI layer and in ASP.NET vNext, NancyFX, Web API, and SignalR we have a suite of powerful, cross-platform tools that are capable of working with the latest open source innovations in front-end development. We can finally use tools like Bower, TypeScript, Gulp, LESS, and others inside our .NET web applications… And easily integrate those tools into everything else.

This stack gives us a realm of possibility we’ve never had access to as .NET developers before.

What’s Possible with the New .NET Stack

This stack is radically different from what we’ve done in the past - it gives us a range of potential choices and possibilities that have never been available to us before… And it has a tremendous set of benefits.

High Scalability, Responsiveness, and Recovery from Errors

The databases and tools that we’ve used over the past ~15 years in .NET aren’t going to be the same ones that carry us into the next 15, and the reason is because our old technology stack is immensely brittle and fails to meet users’ increasing demand for availability (“always on”) and responiveness.

Nowhere is this pain more widely felt than with SQL Server.

If you’re actively committing to using SQL Server in new projects for your organization, then you’re gambling with your career and the success of the project. The number of cases where SQL Server is actually the “right tool for the job” is quickly decreasing in number, because its scalability model (master-slave with sharding and failover) is inherently weak, includes built-in downtime, lacks partition tolerance, and was never designed to handle the increasigly write-heavy workloads that modern applications are expected to do.

Instead with the new .NET stack, we’re able to take advantage of open source, NoSQL databases like Cassandra and data warehousing / analysis tools like Apache Spark and HDFS. These systems are linearly scalable - which means consistently responsive performance relative to hardware and load. These tools also have the added benefit more robust availability and recovery models than their predecessors.

And at the application layer using technologies like Akka.Cluster .NET developers enjoy the same distributed, fault-tolerant, and responsive behavior they get from their data layer with Cassandra and Spark.

Total Platform and Tool Choice

The most exciting benefit of the new .NET stack is the ability to develop your enterprise .NET applications on Windows with Visual Studio and deploy them onto Ubuntu or CentOS with the expectation of consistent behavior and performance. Ditto for developing .NET apps with Sublime Text on OS X and deploying them on Windows!

We now have the freedom to develop .NET applications fully independent of Windows if we wish - which gives us access to a whole range of Linux-based tools and options that we’ve never been able to fully explore before. Beyond that, we can scale our applications however we wish without having to factor licensing costs into our scaling model - that’s a luxury we’ve never had.

Agility and Speed

.NET has suffered from a lack of tooling when it comes to deployment and DevOps infrastructure, as Windows has never really been given the same level of support as Linux when it comes to configuration management and DevOps tools.

With the coming support Windows Server 2015 will have for Docker and the ability to run .NET natively on POSIX-based systems, this is now a thing of the past! We can use the best-in-breed tools like Apache Mesos and Google’s Kubernetes to rapidly deploy and experiment with our applications across any public cloud like Windows Azure, Amazon Web Services, or Google Cloud.

This possibility gives .NET developers access to a type of product iteration and development agility that has never been possibile with on-premise Windows Servers and IIS with ASP.NET WebDeploy. The entire way we develop our applications can be built around rapid experimentation and growth - learning how to consistently provide a better and better experience for our users and customers.

The new .NET stack makes this possible.

Fall in Love with .NET Again

Perhaps the benefit that will touch most of you… Is the ability to breathe some fresh air into the simple pleasure of developing in .NET again.

We can enjoy all of the awesome tooling of Visual Studio, but use Akka.NET to develop types of applications that would have been impossible to build with just ASP.NET CRUD. And then we can deploy on Linux, with Docker, on a cloud, and so on.

Access to choice, innovation, and personal growth have been long since missing in .NET… And with the new .NET stack, we have it back again.

Experience Developing with the New .NET Stack

As a closing thought here, I want to share some metrics from my time at MarkedUp where we actually used the new .NET stack in production.

  • 30,000,000 devices per month - total number of unique devices each month who connected to MarkedUp’s services on average.
  • 500mb of event data per second - the amount of data per second that passed through our applications before being written to our database at peak hours.
  • 100,000,000 database transactions per day - total amount of writes, including batch writes, that our application handled every day.
  • 30 servers - the total number of servers (on average, we used auto-scaling) that ran this worklaod.
  • 3 developers - the total size of our team that built these applications using this stack.
  • 6 months - the total amount of time it took this team to develop our in-app marketing automation product from concept to delivery, while still supporting our other production workloads.

These are amazing numbers - and that’s what you can achieve with this stack.

But here’s the most impressive one, from Syncromatics’ Joshua Benjamin during our Akka.NET Virtual Meetup in August.

With this stack, it took 85% less code to do the same thing than the previous, traditional OO model.

Imagine how much faster your organization will be at debugging code, deploying it, and training new developers on it when there’s 85% less of it. Orders of magnitude faster.

And so that’s what we want to leave you with here - a sense for what could be possible for you and your career in .NET. And if you need some help getting started with this possibility, start by learning Akka.NET.

If you liked this post, you can share it with your followers or follow us on Twitter!
Written by Aaron Stannard on September 23, 2015



Observe and Monitor Your Akka.NET Applications with Phobos

Did you know that Phobos can automatically instrument your Akka.NET applications with OpenTelemetry?

Click here to learn more.