Why should you use dotnet core for your next AI project production?

1/5/2020 ● 3 minutes to read

Artificial intelligence (AI) is one of the hottest topics in the last few years. The fourth industrial revolution some might say, the big promise for the next years others predict. Yet, some see this as an unreachable fantasy over the following decade. Some groups even claim that we as humans should not go through this slippery road. But either way, we all agree - AI is complicated. This gets complex from the moment we need to understand the math, it doesn't get easier when we need to implement it on the computer and it is even getting harder when we need to serve it to millions of users all over the world in a manner of a hundred milliseconds. .

In the debate course 101, they teach you “tell them what you are going to talk about, talk about it, and explain what you just said”. In the article, we are going to talk about why should you serve your AI project over the internet using C# dotnet core technology. We will review a few of the technical complexities in such a task and how dotnet core makes our life much easier in the way of tackling these challenges.

First and the one more product-oriented is the fact that AI requires more computation power than other software [1]. The upscaling problem for websites and other internet services are complex enough without the additional burden of expensive mathematical calculation AI usually requires. Right resource allocation and managing the amount of calculation time a single user is able to use for AI component is significant.

Dotnet Core contains 'out of the box" user management module with flexible logic allowing to design user resource allocation as complex as needed which serves a critical foundation of heavy AI projects. This allows us to build a service allowing profitable users to use the AI product more than less profitable users. In addition, C# core implements a state of the art garbage collector which frees really needed memory from the application - that makes each machine more efficient without the additional need of memory management by the R&D team.

Second, multi-process, multi-thread, multi-machine…. When you go production, you go big and therefore you need to squeeze out all the computational power your IT available to give you. Deploying a deep learning (DL) or machine learning (ML) model which utilizes all levels of multi-something is not an easy task.

By taking advantage of in-time compilation, native optimization, early binding, and caching service out-of-the-box dotnet core applications offers state of the art performance for web application. The technology basic package contains Task Parallel Library which minimizes the complexity of using threads by pooling them from the Threadpool and provides an abstraction through a set of APIs that help developers focus more on the application program instead of focusing on how the threads will be provisioned.

Third, your service lives in the cloud (and if it is not, it probably should be) and as a result, your AI module \ component \ service will be in the cloud as well. In this case, you have two bad problematic options. Either spending a lot of money on ML and AI service the cloud providers offer and spare the need in the integration of multiple machines and service of the cloud or use the more basic services but spend a lot of time-solving integration-related problems. Either way, this is indeed a challenge that can not be taken lightly.

Microsoft is developing dotnet Core to give developers the ability to write cross-platform code for cloud-optimized workloads. dotnet Core not only supports Windows systems, but rather multiple distributed systems of Linux. With this, programmers can develop complex web API's on Linux operation systems using C# which highly encourages Multithreading, OOP, asynchronous programming, and concise and clean written code. In addition, Azure (Microsoft’s cloud platform) is providing native and almost automatic deployment, scaling and monitoring service for dot net core reducing development and supporting time while keeping cutting-edge cloud performance.

It is safe to say that indeed C# dotnet core is currently one of the leading technologies available to handle AI-related projects in production. The growing amount of open source packages related to machine learning to ease the development of the AI itself and the growing community for SaaS (solution as a service) products written on dotnet core is making this technology a promising leader of the field in the visible future.



Continue Reading