Config as Code (CaC)
Not Another Programming Blog
by Edward Goslin
1y ago
Out of all the 12 Factor App principles I struggle with Store config in the environment the most and I can see the principle is giving other teams issues as well. I think the principle over simplifies the subject and ignores how libraries use config. On the flipside however having config as code can cause config pain, resulting in config being stored in multiple places with developers unsure where to amend or append changes. That’s why I think config management is a good engineering practise that is often overlooked and if not managed correctly can have a negative impact on a te ..read more
Visit website
Agile Sprints or Mini Waterfalls?
Not Another Programming Blog
by Edward Goslin
1y ago
I think over the last couple of months I have had engagements with a similar setup. Their release pain is that they can’t release their individual services and unlike my post Oopps . . . . I have built a Distributed Monolith they have created nice separated services. When I looked further into it actually it was around how they operated. These teams were identifying as working in Agile Sprints but actually they were operating in a mini waterfall with the Analysis, Design and Testing all separated out into phases and owned by BA, Developers and QA, each throwing the sto ..read more
Visit website
Oopps . . . . I have built a Distributed Monolith
Not Another Programming Blog
by Edward Goslin
1y ago
Recently I have been deep diving into other peoples code to help establish the pain points they have been having on a daily basis. Often when we start out they identify their application as a microservice architecture. Then I start to dig into the code and although there are multiple services that run on their own, there are quite a few “smells” which makes the application actually a Distributed Monolith. What is a Distributed Monolith? Firstly, why is your team adopting a microservice architecture? The only real reason to adopt the architecture is because you want to have decoupled services ..read more
Visit website
Applying Caching to your API – Part 2
Not Another Programming Blog
by Edward Goslin
1y ago
In my previous post I talk about the general overview of caching with Microservices and their Client. In this post I explore how the Api, the owner of the data, communicates to the Client if the data can be cached and how it can be cached. Pushing Caching onto the Client Even though you are planning to have fast caching in your api often it is beneficial for the client to also cache the data, reducing the amount of trips over the wire and the serialization cost that occurs. There are two mechanisms for this Response Caching Headers This method is defined by the HTTP 1.1 Caching Specification a ..read more
Visit website
Applying Caching to your API – Part 1
Not Another Programming Blog
by Edward Goslin
1y ago
In modern software architecture where applications are distributed on the cloud we will often see challenges in performance. Traditionally we used to build monolithic applications that communicated within the process and shared everything in memory. We would host these applications on physical hardware and co located databases with them. If there was performance issues the normal reaction would be to improve the hardware. Now with applications on the cloud there is a lot more communication between process over the network and we need to design our code in a different way but also apply trick a ..read more
Visit website
ASP.Net CORE 3 and Specflow – Part 3
Not Another Programming Blog
by Edward Goslin
1y ago
Working with Visual Studio Database Projects and Deploying a Dacpac Microsoft doesn’t want you to use the Visual Studio Database Project anymore. They want you to use Entity Framework and use the Migrations technology and if I could, I would. However I keep coming up against scenarios where I can’t use it. Most noticeably… Azure Synapse (SQL Datawarehouse). When designing a datawarehouse schema I often lean towards a narrow instead of wide database design in my star schema. So for an entity I may have data spread across several rows. When reading this from the database I don’t want to load al ..read more
Visit website
ASP.Net CORE 3 and Specflow – Part 2
Not Another Programming Blog
by Edward Goslin
1y ago
Enabling Entity Framework Core In Memory Database In Part 1 I setup my application to work with Specflow. However there is a dependency on my database. If I was to run the tests again they could fail as the same data keeps getting added. Therefore it is common to teardown and restore a database. This is time consuming and often manual. We could automate this on our Build Pipeline but there could be issues with accessing the database. Another issue is because it’s time consuming they aren’t being run by users locally or they are sometimes disabled on the Build pipeline. That is where EF Core In ..read more
Visit website
ASP.Net CORE 3 and Specflow – Part 1
Not Another Programming Blog
by Edward Goslin
1y ago
Enabling Specflow to work with our System Under Test I have been a big champion of TDD and Unit Testing over the years but now with a lot of 3rd party libraries the question of what you are testing is becoming more and more common. There are many libraries now that do the heavy lifting for you. For example Entity Framework does the database access instead of you building your own DAO layer. So if I write a Unit Test, I shouldn’t be testing Entity Framework. That’s when Integration Tests still appear. You often see these tests leveraging the IoC or accessing the database. They are often bundled ..read more
Visit website
ASP.Net Core and Brotli Compression
Not Another Programming Blog
by Edward Goslin
1y ago
When looking at performance often the size of the payload will come up. In the past I have looked at different messaging formats instead of JSON such as MSGPack and Protobuff but recently instead of adding this level of complexity I looked at compression. The standard everyone has used has been GZIP and has been as far back as .Net framework 2.0. However this time I decided to explore Brotli. Enabling Brotli in ASP.Net Core Luckily for us ASP.Net Core has the ability to compress the payload thanks to the package Microsoft.AspNetCore.ResponseCompression so once you have added this to your proje ..read more
Visit website
ASP.NET Core and Non-standard Reverse Proxy Headers
Not Another Programming Blog
by Edward Goslin
1y ago
While working on a project using ASP Core on OpenShift one issue that arose was the use of a reverse proxy using non-standard headers. A reverse proxy is a server that sits in front of web servers and forwards the requests onto those web servers. They are often used for load balancing or protecting from DDOS attacks. Now there tends to be some standard headers that are used so ASP.Net core has provided some middleware that you can use https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1 However our reverse proxy doesn’t use the standard headers ..read more
Visit website

Follow Not Another Programming Blog on FeedSpot

Continue with Google
Continue with Apple
OR