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
Q

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

A

XMLHttpRequest

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

Newer JS native implementation of AJAX

A

Fetch API

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

Uses promises to achieve asynchronisity

A

Fetch API

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

_____ represent the eventual completion (or failure) of an asynchronous operation and its resulting value

A

Promises

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

____ are objects in JS

A

Promises

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

what does MSA stand for?

A

Micro Service Architecture

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

Monolithic vs SOA vs MSA

A
monolithic = single unit
SOA = coarse-grained
microservices = fine-grained
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Microservice Characteristics

A

SRP (single responsibility principle)
Encapsulated
Independent

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

MSA pros

A
Scalability
Deployment
Simplicity
Fault tolerant
Testability
Language agnostic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

MSA cons

A

Complexity
Monitoring
Eventual consistency
Chattiness

35
Q

what does MVC stand for?

A

model view controller

36
Q

Design pattern used to separate concerns (yes we’re discussing this again)

A

MVC

37
Q

a web application framework developed by Microsoft that implements the model–view–controller pattern.

A

ASP.NET MVC

38
Q

MVC vs ASP.NET MVC

A

MVC is a design pattern, ASP.NET MVC is a web app framework that implements the mvc design pattern

39
Q

Send from client to server

A

HTTP request

40
Q

what are the 3 parts to and http request

A

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
Q

Describes what action the client wants the server to perform on a given resource

A

HTTP verbs/methods

42
Q

Get resource

A

HTTP GET

43
Q

Create a new resource

A

HTTP POST

44
Q

Update resource

A

HTTP PUT

45
Q

Delete resource

A

HTTP DELETE

46
Q

Returns just the headers of a get response

A

HTTP HEAD

47
Q

what are the less common http verbs?

A

connect, options, trace, patch

48
Q

A method is said to be safe if it does not change the state of the resource
(Ex: HTTP GET, HTTP HEAD)

A

Safe methods

49
Q

A method is said to be ______ if the state of the resource is only affected once by any changes implemented by this method

A

idempotent

50
Q

examples of idempotent methods

A

DELETE, PUT, HEAD, GET

51
Q

From server to client

A

HTTP Response

52
Q

what are the 3 parts to an HTTP Response

A

Status line
Headers
Body

53
Q

errors that are the client’s fault, client side errors (“Your fault”)

A

4xx

54
Q

errors that are the server’s fault, server side errors (“My bad”)

A

5xx

55
Q

redirection (“We moved that”)

A

3xx

56
Q

communicating success (“Success”)

A

2xx

57
Q

informational (“Mkay”)

A

1xx

58
Q

____ give a short description of whether an interaction is successful or not.

A

Status codes

59
Q

Bad request, generic error message

A

400

60
Q

Payment Required

A

402

61
Q

Not found

A

404

62
Q

Method not allowed (if server does not support method)

A

405

63
Q

Internal Server Error, try again later we’re having problems right now

A

500

64
Q

Not Implemented, if a method isn’t implemented (if it’s under construction)

A

501

65
Q

Bad Gateway

A

502

66
Q

what does dns stand for?

A

Domain Name System (DNS)

67
Q

_______ translates domain names to IP addresses so browsers can load Internet resources.

A

DNS

68
Q

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

A

Transactions

69
Q

Sublanguage to control Transactions

A

TCL

70
Q

TCL commands

A

Commit
Savepoint
Rollback

71
Q

what does ACID stand for?

A

Atomic
Consistent
Isolation
Durable

72
Q

All or nothing

Either the transaction completely succeeds without errors and persists to a non volatile data storage system or it fails

A

Atomic

73
Q

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.

A

Consistent

74
Q

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

A

Isolation

75
Q

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

A

Durable

76
Q

_____ define the degree to which a transaction must be isolated from the data modifications made by any other transaction in the database system

A

Isolation levels

77
Q

Ways other transactions can affect your transaction:

A

Dirty Read
non-repeatable read
phantom read

78
Q

when your transaction reads uncommitted updates done by another transaction

A

Dirty Read

79
Q

when your transaction reads committed updates done by another transaction

A

Non Repeatable Read

80
Q

some rows may be added or removed due to the updates done by another transaction

A

Phantom Read

81
Q

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

A

Read uncommitted (zero isolation)

82
Q

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

A

Read committed

83
Q

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

A

Repeatable read

84
Q

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.

A

Serializable