If you are still using Unicorn, Thin or Passenger open source application server in production then this blog post is for you.
Point to note that Passenger Enterprise is different from Passenger open source, this post only talks about Passenger open source.
This Blog Post has very good comparison about features provided by Unicorn, Puma & Passenger
JSON is de facto standard for exchanging data between web server and browser.
If your application is parsing large JSON data then you must consider optimising it for better performance.
I came across Simdjson which claims to parse gigabytes of JSON per second, It also claims to be over 2.5x faster than other production-grade JSON parsers. I thought this is fantastic why I am not using it.
I looked for the ways to use it and came across simdjson_ruby gem . …
Memoization is a wonderful concept in programming world. It helps in writing clean code which execute faster.
@result ||= perform_slow_method
In above code,
slow_method will cache
@result variable, therefore perform_slow_method will execute only once.
So, if memoization is wonderful then why not to use it always ? that’s the question I am going to answer in this post.
Memoization should be avoided if result of memoized function is going to change over time and your business logic relies on latest value. …
Install new ruby version on server using rvm
rvm install 2.6.3
rvm use 2.6.3
Remove already installed nginx
apt-get --purge remove nginx-*
apt-get install nginx
Fresh install nginx with passenger
Blockchain is emerging technology, it needs no introduction. By any chance if you are left behind and don’t know about blockchain then I recommend reading about blockchain first before reading this article. You can read about blockchain here or here or search on internet and you will find plenty of article to read from.
What is Ethereum ?
Launched in 2015, Ethereum is the world’s leading programmable blockchain. It is a global, open-source platform for decentralized applications. These decentralized applications (or “dapps”) gain the benefits of cryptocurrency and blockchain technology. Read more about ethereum here.
What is Truffle ?
Traefik v2 is released, published another blog to setup Traefik v2 on ECS https://dev.to/anilmaurya/traefik-v2-with-lets-encrypt-on-amazon-s-elastic-container-service-ecs-1h4h
Traefik is awesome reverse proxy & load balancer. If you are not using Traefik already then I recommend using it in your next project. I can guarantee that you will not regret.
Setting up SSL certificate on Traefik is a cakewalk. While adding SSL on traefik, I realised how it outshine other reverse proxy (Nginx , HAProxy).
Traefik use LetsEncrypt to automatically generate and renew SSL certificates.
FROM traefik:v1.7-alpineCOPY traefik_ecs.toml /etc/traefik/traefik.toml
RUN touch /etc/traefik/acme.json
RUN chmod +x /etc/traefik/acme.json
defaultEntryPoints = ["https", "http"][entryPoints]…
This blog is second part of Post .
If you have not already read it then I recommend going through it first, I have explained why we chose Service Based Architecture and how Docker helped us in setting up & starting application on local machine with just one command.
In this post we will see how to deploy our App on multiple docker container using Amazon’s ECS.
Why deploy container for each service
Deploying all service on single machine is possible but we should refrain from it. If we deploy all service on single machine then we are not utilising…
What is Service Based Architecture ?
At first Micro Service Architecture & Service Based Architecture looks similar but both are different from each other.
Micro service architecture advocates smaller components. An application can consist of hundred or thousands of micro services whereas Service based architecture advocates breaking the code apart in the domain-centric way. An application can consist of 10–12 deployable services. These services may have separate database or they may share same database.
Managing few micro services is easy but as number of micro services increases, challenges to manage them is not an easy task. …
We use database for storing application state. If we need to figure out how application reached a particular state then we have to build auditing system and store history in database.
Event Sourcing makes auditing easy.
Basically Event Sourcing means storing all changes to application state as a sequence of events in database and then using these events to derive current state of application.
Auditing is one of many benefit provided by Event Sourcing Architecture.
Other benefit includes:
1. Going back in time to correct history.
2. Regenerating current application state from history.
I will try to explain using an…
When I was growing up, Software Engineer and Programmer seems same term to me.
Now after working a couple of years as a Software Engineer I think I can distinguish between the two terms.
Programming is a small part of Software Engineering.
Software Engineering include
Writing good code is essential skill for being a Good software engineer but you can not neglect others skills as they are equally important for building good product.
I read something similar in Software Engineering subject during my graduation, but none of…
Principal Engineer @joshsoftware