Posts

Showing posts from June, 2018

ASP.Net Core saves me $4 a month!

Image
Background It has been more than 2 years since my website www.codingsoldier.com was conceived. It was created in ASP.Net MVC. Since then the site has evolved a lot technology wise. The website is used as a repository of my studies, as a means to publish my technical thoughts and also a place where I can try out the technologies/areas that I don’t usually get to do as part of my regular office work like full time DevOps or migrating sites to newer technologies without having to convince the management. Technology Migration History Initially created in ASP.Net MVC with SQL server as the database. Site was hosted in IIS in a windows server. It was migrated to Node.Js + Express and later to Node.js + React. Database was MongoDb and site hosted in Node in a windows server. Of late, the site has been migrated to ASP.Net core with SQLite as the Database. Site runs on a Linux instance, with Kestrel as the web server and Nginx as the Reverse Proxy. Migrating to ASP.Net Core

Investments are not all about Finance!

Image
Why Invest? Often we hear the comment: “Live the present and don’t worry about the future”. Please don’t take anything for granted. The assets that we have now would be gone in the blink of an eye. Unless we plan and put enough effort to the investments, we are going to be in trouble in the future. Peace of mind is a must for an individual to lead a normal life. It is a result of the combination of the present state of mind and a sense of security of the future. Allow me to enlighten you with a simple example. For a moment, think you are millionaire in your late 30’s, with huge amounts of money in your account. You think your future is secure. Let’s say you didn’t invest enough in your health department. You are discovered with a terminal illness, that may have been avoided had you took care of your health early enough. Now all the security is gone. You may have to spend out the money that you had saved. You may not be able to go to work. You mental state goes for a toss. T

From Callbacks to Promises to AsyncAwait

Image
Single Threaded Node In spite of having a single threaded architecture, Node is not blocked while doing parallel operations. How does Node achieve this ? Even though Node is single threaded, it is event driven and makes use of background workers to complete the tasks. Tasks are pushed off to workers from the main thread. Main thread is not blocked and continues to listen to other requests. When the task is done, the result of the task(if any) is put back to the event loop for further processing which is accomplished by callback. In this write up, I will be discussing on the evolution of callbacks. The way they evolved to Promises and most recently to Async-Await. Event Loop is outside the scope of this topic, for which there are plenty of articles available online. CallBacks As I said before, callbacks are a means by which the background workers intimate the main thread of the completion of the asynchronous task they were performing. Initially when the task was invoked, w