Cloud Flashcards

1
Q

Struktura OCI (6)

A

OS
docker - virtualni kontejner
kubernetes - orchestrator dockeru
jvm - v kazdem dockeru
java server - automatizace
java kod

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

Http request - metody (4) + metody pro metadata (2)

A

get (default)
post (insert)
put (update)
delete

head, options

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

Http response - statusy (5)

A

100 - info
200 - success
300 - redirect
400 - client error
500 - server error

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

Http response syntax pro zpravu “This,is,message” v UTF-8

A

header + nepovinne body
HTTP/1.1 200 OK
Content-Type: “text/plain; charset=UTF-8”
Content-Length: 123
Date: … GMT
This,is,message

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

Http request syntax pro www.sample.com/product/1

A

GET /product/1 HTTP/1.1
Host: www.sample.com

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

REST co to je, jake muzou byt formaty message

A

Resource based application; kazdy resource ma svoji entitu s url a operacemi
plain text, json, xml, …

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

REST handler syntax: nacti parametr “id” a posli zpet message “processing {id}”

A

Handler handler = (ServerRequest req, ServerResponse res) -> {
String id = req.path().param(“id”);
res.status(Http.Status.OK_200);
res.headers().put(“Content-Type”, “text/plain; charset=UTF-8”);
res.send(“processing “ + id);
};

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

REST routing syntax pro prirazeni handleru:
“/” - welcome()
“/products” - DELETE - deleteProducts()

A

Routing routing = Rounting.builder()
.any(“/”, welcome())
.delete(“/products”, deleteProducts())
.build();

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

REST routing - any - jak zapises lambdou poslani “message”

A

.any((req, res) -> res.status(200).send(“message”))

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

REST server configuration pro localhost:8080 syntax

A

ServerConfiguration config = ServerConfiguration.builder()
.bindAddress(InetAddress.getLocalHost())
.port(8080)
.build();

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

REST web server - vyrob a spust

A

WebServer ws = new WebServer(serverConfiguration, routing);
ws.start();

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