/images/profile.png

Async Programming

Async Porgramming What is async programming? Async programming is about non-blocking execution between functions. It enables your program to start a potentially long-running task and still be able to be responsive to other events while that task runs, So we don’t have to wait our time waiting for that long task to be finished Example Data may take long a long time to submit to/retrieve from a database. With asynchronous programming, the user can move to another screen while the function continues to execute.

Ssr vs Csr

When user sends a request to a server, different server responses differently depending on the implementations. Server side rendering Whenever you visit a website, your browser makes a request to the server. Once the request is done processing, your browser gets back the fully rendered HTML and displays it on the screen. If you then decide to visit a different page on the website, your browser will once again make another request for the new information.

How are blogs built

How are most of the websites/blogs built? Really? Typically, there are two layers of website building: Pull content from local file system (md files) or third party CMS Render the website The first layer - Content pulling Conventional blog engines hosted on GitHub (Hexo, Hugo, Jekyll) host their “content” in files stored and managed by Git. Gatsby and Gridsome, besides supporting file-based content sourcing, also have plugins that enables them to pull “content” from a third-party CMS, whether it’s a self-hosted WordPress or Ghost, or a standalone cloud-based solution like Strapi, DatoCMS, or Contentful.

Docker & Kubernetes

Docker About Docker Problem: It works on my machine, but not works on others' Solution: VM Docker Docker is a technology for creating and running containers, so we don’t need redudent VMs! Docker allows different machines to share the same environments by using sharing docker image and create same containers Docker images DockerFile + App files –> Docker –> Image (shared to others) Docker image explains what your environment looks like Docker image contains everything a container needs to run:

Microservices vs Monolith

MicroService Take every app function and put it in its own service Runs in its own container Communicate via APIs But if each microservice is implemented in different languages/environment, how do we deploy? Deployment: Use Docker ! Put each microservice into containers Pros Flexibility (each microservice can be built in different languages/technologies) Less risk in change Independent scaling Faster release cycles Monolith Server-side systme based on single application Pros Good for small team Less complex Less duplication Run fast Cons Highly dependent (single point of failure) Language/Framework Growth Scaling issue Complex deployment Spring Boot Goal Enable quickly built applications Provide common non-functional features Not Spring boot does NOT generate code Spring boot is NOT an application server or a web server Features Quick starter projects with auto configuration

Web Service

What is web service Software system designed to support interoperable machine-to-machine interaction over a network. Three keys: machine to machine (todo service is not) Interoperable (not platform dependent) Over a network Different kinds of web services SOAP Use XML as exchange format Adhere to Structure: Envelope - Header - Body REST The format of request/response is HTTP resources A resource has an URI, it is what you want to present in your application