K8's/TS/Http/MVC/MSA/AJAX Flashcards

1
Q

A ________ tool helps in deployment, scaling, networking, and monitoring of your containers.

A

container orchestration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It provides a framework for managing containers and the microservices they contain at scale.

A

Container Orchestration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

____ is a container orchestration tool.

A

Kubernetes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

It provides tools that help deploy and manage containers that run over a network.

A

Kubernetes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

It lets us build application services that span multiple containers, schedule containers across a cluster, scale those containers, and manage their health over time.

A

Kubernetes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Similar tools to Kubernetes

A

Docker Swarm and Apache Mesos

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

K8s Architecture

A

Cluster
Node
Pod
Containers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Primary node agent interacts with master node

A

Kubelet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Software that runs containers

A

Container runtime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Network proxy maintains network rules on nodes

A

Kube-proxy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Cmd line tool for k8s

Allows you to interact with the API in the master node to deploy and manage your cluster

A

Kubectl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Lets you query and manipulate the state of objects in K8s

A

API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Local k8s

A

Minikube

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Azure K8s Service

A

AKS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Container runtime

A

Docker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Deploying with k8s

A

Object config file
Pods
Deployments
Services

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

A

Typescript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

All valid JS types are TS types

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

(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)

A

Any

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

a type safe any. Ensures someone using the type declares what the type is

A

Unknown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

a function that returns undefined or no return value. Like how you’d use void as a return type in C#

A

Void

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

what’s the difference between js classes and ts classes

A

TS classes have access modifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Modules in ts

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Stands for Asynchronous Javascript and XML, More of technique than a specific technology

A

AJAX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
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
26
Newer JS native implementation of AJAX
Fetch API
27
Uses promises to achieve asynchronisity
Fetch API
28
_____ represent the eventual completion (or failure) of an asynchronous operation and its resulting value
Promises
29
____ are objects in JS
Promises
30
what does MSA stand for?
Micro Service Architecture
31
Monolithic vs SOA vs MSA
``` monolithic = single unit SOA = coarse-grained microservices = fine-grained ```
32
Microservice Characteristics
SRP (single responsibility principle) Encapsulated Independent
33
MSA pros
``` Scalability Deployment Simplicity Fault tolerant Testability Language agnostic ```
34
MSA cons
Complexity Monitoring Eventual consistency Chattiness
35
what does MVC stand for?
model view controller
36
Design pattern used to separate concerns (yes we’re discussing this again)
MVC
37
a web application framework developed by Microsoft that implements the model–view–controller pattern.
ASP.NET MVC
38
MVC vs ASP.NET MVC
MVC is a design pattern, ASP.NET MVC is a web app framework that implements the mvc design pattern
39
Send from client to server
HTTP request
40
what are the 3 parts to and http request
Start line Method - describes action to be performed Target - describes where to send the request Header Meta data Ex: content type - what data type the body has Body Data you want the server to process
41
Describes what action the client wants the server to perform on a given resource
HTTP verbs/methods
42
Get resource
HTTP GET
43
Create a new resource
HTTP POST
44
Update resource
HTTP PUT
45
Delete resource
HTTP DELETE
46
Returns just the headers of a get response
HTTP HEAD
47
what are the less common http verbs?
connect, options, trace, patch
48
A method is said to be safe if it does not change the state of the resource (Ex: HTTP GET, HTTP HEAD)
Safe methods
49
A method is said to be ______ if the state of the resource is only affected once by any changes implemented by this method
idempotent
50
examples of idempotent methods
DELETE, PUT, HEAD, GET
51
From server to client
HTTP Response
52
what are the 3 parts to an HTTP Response
Status line Headers Body
53
errors that are the client’s fault, client side errors (“Your fault”)
4xx
54
errors that are the server’s fault, server side errors (“My bad”)
5xx
55
redirection (“We moved that”)
3xx
56
communicating success (“Success”)
2xx
57
informational (“Mkay”)
1xx
58
____ give a short description of whether an interaction is successful or not.
Status codes
59
Bad request, generic error message
400
60
Payment Required
402
61
Not found
404
62
Method not allowed (if server does not support method)
405
63
Internal Server Error, try again later we’re having problems right now
500
64
Not Implemented, if a method isn’t implemented (if it’s under construction)
501
65
Bad Gateway
502
66
what does dns stand for?
Domain Name System (DNS)
67
_______ translates domain names to IP addresses so browsers can load Internet resources.
DNS
68
Used to describe a group of queries that are executed as a batch that should completely succeed or not have any effect on the database at all
Transactions
69
Sublanguage to control Transactions
TCL
70
TCL commands
Commit Savepoint Rollback
71
what does ACID stand for?
Atomic Consistent Isolation Durable
72
All or nothing Either the transaction completely succeeds without errors and persists to a non volatile data storage system or it fails
Atomic
73
Guarantees committed transaction state Makes sure that your transaction is not half finished Consistency is a property ensuring that only valid data following all rules and constraints is written in the database. When a transaction results in invalid data, the database reverts to its previous state, which abides by all customary rules and constraints.
Consistent
74
guarantees the individuality of each transaction, and prevents them from being affected from other transactions. It ensures that transactions are securely and independently processed at the same time without interference, but it does not ensure the order of transactions. Two transactions, affecting same data, one will have to wait
Isolation
75
A transaction isn’t considered complete until it is persisted in a non volatile data storage; by that it means your device could turn off and the data would still be saved
Durable
76
_____ define the degree to which a transaction must be isolated from the data modifications made by any other transaction in the database system
Isolation levels
77
Ways other transactions can affect your transaction:
Dirty Read non-repeatable read phantom read
78
when your transaction reads uncommitted updates done by another transaction
Dirty Read
79
when your transaction reads committed updates done by another transaction
Non Repeatable Read
80
some rows may be added or removed due to the updates done by another transaction
Phantom Read
81
Does not protect transaction from anything, your transaction can read uncommitted data from other transactions Useful for when you read and write all the time, like netflix, or if you’re tracking number of covid cases, you can just reload
Read uncommitted (zero isolation)
82
Protects transaction from dirty read but not from non repeatable read. Meaning you can still read committed data from other transactions. Locks updates unless committed SQLServer Default
Read committed
83
Protects transaction from non repeatable read but not from phantom read. When querying batches of data you’d still be able to get a different set of rows when you query the table before and after updates from another table occur Locks row
Repeatable read
84
Protects transaction from phantom read. Congratulations. You’ve reached the highest isolation level. This guarantees total isolation. It’s essentially locking the data set you’re working with from other transactions.
Serializable