K8's/TS/Http/MVC/MSA/AJAX Flashcards
A ________ tool helps in deployment, scaling, networking, and monitoring of your containers.
container orchestration
It provides a framework for managing containers and the microservices they contain at scale.
Container Orchestration
____ is a container orchestration tool.
Kubernetes
It provides tools that help deploy and manage containers that run over a network.
Kubernetes
It lets us build application services that span multiple containers, schedule containers across a cluster, scale those containers, and manage their health over time.
Kubernetes
Similar tools to Kubernetes
Docker Swarm and Apache Mesos
K8s Architecture
Cluster
Node
Pod
Containers
Primary node agent interacts with master node
Kubelet
Software that runs containers
Container runtime
Network proxy maintains network rules on nodes
Kube-proxy
Cmd line tool for k8s
Allows you to interact with the API in the master node to deploy and manage your cluster
Kubectl
Lets you query and manipulate the state of objects in K8s
API
Local k8s
Minikube
Azure K8s Service
AKS
Container runtime
Docker
Deploying with k8s
Object config file
Pods
Deployments
Services
Superset of JS, which means that all valid JS is valid ____
JS flavor that imposes type checking and “compile” time errors
Statically typed
CANNOT IN ITSELF BE RUN IN THE BROWSER HAS TO BE TRANSPILED BEFORE IT’S EXECUTED (using node.js and tsc)
Still JS under the hood
Typescript
All valid JS types are TS types
True
(TS type) literally any type, when you assign something to any, you are resigning to JS’s type inference system (i.e. letting JS take the wheel and infer the type for you)
Any
a type safe any. Ensures someone using the type declares what the type is
Unknown
a function that returns undefined or no return value. Like how you’d use void as a return type in C#
Void
what’s the difference between js classes and ts classes
TS classes have access modifiers
Modules in ts
Works like a JS module but has some additional support
Import multiple modules from a single script file, only import types (type safe way of importing)
This helps in organizing your code in their own files and using them in different places
So you expose something for use using the export keyword and you use that something in another file using the import keyword
Any declaration (variable, function, class, type alias, interface) can be exported by adding the export keyword before the type keyword.
Stands for Asynchronous Javascript and XML, More of technique than a specific technology
AJAX
An older implementation of AJAX
Object that is used to send a request to the server and receive the response
Again the XML in its name is for traditional reasons
XMLHttpRequest
Newer JS native implementation of AJAX
Fetch API
Uses promises to achieve asynchronisity
Fetch API
_____ represent the eventual completion (or failure) of an asynchronous operation and its resulting value
Promises
____ are objects in JS
Promises
what does MSA stand for?
Micro Service Architecture
Monolithic vs SOA vs MSA
monolithic = single unit SOA = coarse-grained microservices = fine-grained
Microservice Characteristics
SRP (single responsibility principle)
Encapsulated
Independent
MSA pros
Scalability Deployment Simplicity Fault tolerant Testability Language agnostic