Event Sourcing with ASP.NET Core - 01 Store

07.11.2022

1. Introduction

I recommend you to read the article below before applying this example tutorial.

What is Event Sourcing?
Previously, our services would be as follows. This service consisted of hundreds of lines of code. To get rid of this confusion, we split our…

In the article I have mentioned above, I had formed a sentence as follows.

In this article, we will deal with the store section of the Event Store. In other words, we will deal with the database feature where we can save events. In the next article, we will deal with the messaging part.

As an sample application, I chose the classic Kanban Board sample.

Our RESTful API endpoints will be as follows.

[POST] api/tasks/{id}/create
[PATCH] api/tasks/{id}/assign
[PATCH] api/tasks/{id}/move
[PATCH] api/tasks/{id}/complete

Read more

Couchbase GeoSearch with ASP.NET Core

26.03.2022

The subject of this article will be about how to do "GeoSearch" by using Couchbase.

1. Installing the Couchbase

For this purpose, we create Couchbase cluster with the docker by running the command below.

    docker run -d --name couchbase -p 8091-8094:8091-8094 -p 11210:11210 couchbase

When Couchbase is up, it will start broadcasting at the address below.

http://localhost:8091/

We create the cluster by clicking the "Setup New Cluster" button. We define the password as "123456".

Create New Cluster
Create New Cluster

You can make adjustment according to your current memory status. You can turn off "Analytics". We complete the cluster installation by clicking the "Save & Finish" button.

Read more

What is Event Sourcing?

26.03.2022

Previously, our services would be as follows.

Application Services 01
Application Services 01

This service consisted of hundreds of lines of code. To get rid of this confusion, we split our services into two parts as "Command" and "Query" with CQRS. We performed our CRUD operations with "Command" services and our query operations with "Query" services. Two separate services appeared as follows.

Read more

Publishing Docker Image as Serverless on GCP

12.07.2022

1. Introduction

With the serverless approach, the problem about the server that the software developer confronts with has disappeared. Now we write our code and call the provider to run it. We are not dealing with server configurations, scalings etc. And pay as you go. This is a great opportunity.

AWS's Lambda, GCP's Cloud Function, Azure's Azure Function etc., these services provide us this service. But this time, different kind of problem appears. These services do not support all languages. Even if it supports the language we want, it may not support the version we want. For example, AWS Lambda does not support the upper versions of .NET Core 2.1 yet. This is a problem. Nobody can restrict us :)

The Cloud Run service that Google built on Knative completely solves this problem. We give Cloud Run a docker image and Cloud Run runs our serverless service from this image. So whether we develop in PHP or .NET Core, it doesn't matter. There is no limit as long as we can make dockerize. This is awesome.

Read more

Developing AWS Serverless Messaging System

26.03.2022
1. Introduction

This article will be about how to develop the messaging system with the serverless approach. We will use AWS as a cloud provider. We will prefer .NET Core as the language.

In this part, I will set up the scenario and give preliminary information about what will be the result.

Our RESTful API endpoints will be as follows.

[POST] api/comments
[GET] api/comments

We will use the AWS services below.

Read more

Publishing the ASP.NET Core Application in GCP Kubernetes

26.03.2022

1. Introduction

The subject of this article series is about how to publish API, which we developed with ASP:NET Core, in Kubernetes. We will use GCP(Google Cloud Platform) as a cloud provider.

In this part, i will show the scenario and give preliminary information about what will be the result. Also i will mention briefly some concepts in Kubernetes.

We will develop an API containing single endpoint.
We will dockerize that API. For this, we will create a dockerfile.
We will send the image we have created with the dockerfile to GCR(Google Cloud Container Registry).
We will start three containers from this image.
We will create "Load Balancer" service, which will distribute the requests coming to the application to the containers.

I want to mention five concepts in Kubernetes.

Read more

Developing AWS Serverless RESTful API

29.03.2022

1. Introduction

This article series is about how to develop RestfulAPI with a serverless approach. We will use AWS as a cloud provider.

In this part, i will show the scenario and give information about what will be the result.

Our RESTful API endpoints will be like below.

[POST] api/ads
[PUT] api/ads/{id}
[DELETE] api/ads/{id}
[GET] api/ads
[GET] api/ads/{id}

Read more

How to publish ASP.NET Core application by using Jenkins

26.03.2022

In this article, i will describe how to publish ASP.NET Core application by using Jenkins. Since the subject of the article is about preparing pipeline, you can benefit the link below for the installation of Jenkins.

How to Install Jenkins on Windows | BlazeMeter

Learn to install Jenkins with this easy guide. This tutorial will take you step by step to installing the Jenkins CI server on Windows. Start automating today.

Because the target machine on which we will make deployment in our scenerio and the machine in which Jenkins has been installed will be different , we need to arrange a dedicated server for Jenkins. The reason is that the Jobs could deplete your resources while they are working.

The pipeline is made of the following 4 steps.

Checkout: Pull the source code from the Github
Build: Build the source code
Deploy: Deployment to the target machine

Read more
Made with ASP.NET Core