Auth Service This service provides endpoints to sign in/out/up as well as get current user based on the username/password. Product Service Sequence diagram shows how GET products work with authentication. Work same…
Fix rails security headers
Firstly, we check the definitions below. server This Server header seems to advertise the software being run on the server but you can remove or change this value. permissions-policy Permissions Policy is a new header…
How rails stores sessions and validate?
Devise, like any Rails application, uses Rails’ session storage mechanisms to manage user sessions. Where Devise stores session data on the server side depends on the session store configuration in your application….
Hands-on javascript refactor part 1
I. Intro We have an IoT system. The sensor’s data saved in dynamodb every minute. However, we can’t render chart every minutes if users want to show for a month or even…
Discuss coding
As a developer we tend to do two things which are coding and designing. We basically start from coding but have you ever thought that what do we do before coding? Yes,…
Chain Pattern in Ruby
Chain of Responsibility is a behavioral design pattern that lets you pass requests along a chain of handlers. Upon receiving a request, each handler decides either to process the request or to pass…
System Design at Scale
I. Why scale? When we talk about system designs. We might talk much about multiple dimensions such as availability, scalability, latency, throughput, performance etc. Scalability sometimes scares us. Why do we have…
Rails event-driven with pub/sub
As we know, Ruby on Rails is full stack framework, a monolith application. Good, there is no best architecture, only the “fit for purpose” architecture. We can find many pros and cons…
We use AWS S3 as an event bus
There are many ways to implement event bus using AWS. Whenever we talk about event bus and aws, we remember Eventbridge. That is so true to implement this kind of architecture in…