Web Services Flashcards

(44 cards)

1
Q

API

A

Application Programming Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • Set of clearly defined methods of communication between various components.
  • Is also used to refer to a published document that defines how these methods of communication can be used.
A

API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • Refers to the actual implementation of an interface that other app/programs can call on.
  • It is also used informally to refer to the document that describes the usage of this interface.
A

API

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

True or False

Airline websites offer an API/Web Service for other apps (like CheapFlights) to access their data.

A

True

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

Web Services vs API

A

Web Services involve network communication.
APIs can use any means of communication.

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

True or False

Web Services are APIs designed to support interoperable machine-to-machine interaction over a network.

A

True

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

True or False

WS expose services to clients over a network, using a uniform interface.

A

True

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

True or False

Many systems inherently interoperate well, thus APIs/web services are uncommonly used.

A

False

Many systems do not inherently interoperate well, thus the need for APIs/web services.

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

2 types of Web Service Implementations

A
  1. Simple Object Access Protocol (SOAP)
  2. Representational State Transfer (REST)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • ________ Web Services usage revolves around the exchange of XML messages.
  • Is transport agnostic.
  • Messages can be exchanged using SMTP, FTP, HTTP, or any network protocol.
A

SOAP

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

True or False

In designing web services, the format of the request/response messages is defined by the developer, and usually published somewhere.

A

True

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

In SOAP web services, these formats are formally defined in ________________ files.

A

Web Service Definition (WSD)

These WSD files function similarly to the DTD in HTML files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • ____ are written in Web Service Definition Language (WSDL), which has an XML-like structure.
  • ____ define the structure of the SOAP Request and Response messages.
  • It is the API, or interface definition for SOAP.
A

WSDs

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

__________ use the Universal Description, Discovery, and Integration (UDDI) framework for sharing and finding WSDs.

A

Discovery services

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

REST stands for

A

Representational State Transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • Introduced and defined by Roy Fielding in 2000 for his PhD dissertation.
  • Is a software architectural style.
A

REST

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

Design Principles

A

Transport, Data Formats, Stateless

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

REST uses the HTTP/HTTPS protocol for message __________

19
Q
  • Request/response payloads for RESTful web services can use any __________
  • Text, XML, JSON, CSV, etc.
20
Q

RESTful web services are __________. Each exchange between service and client is self-contained.

21
Q

True or False

The design of RESTful web services are guided by 7 constraints, which limit the ways the server can process and respond to requests.

22
Q
  • RESTful WS use _____, and thus use _____ urls.
  • These urls are usually designed in a self-descriptive, directory-like pattern.

Same Answer

23
Q

By sticking to these constraints, the system will more easily be able achieve desired performance, scalability, and other architectural goals. What are the constraints?

A
  1. Client-Server
  2. Stateless
  3. Cache
  4. Uniform Contract
  5. Layered System
  6. Code-on-Demand* (optional)
24
Q

True or False

These constraints produce an architecture similar to that of the Web.
Architectures that don’t conform to these are not considered RESTful architectures.

25
_\_\_\_\_\_\_\_\_\_ is separated into consumer and service logic.
Solution Logic
26
# True or False * Consumers invoke services using a published ‘technical contract’. * Services passively wait for consumers to invoke them. * This allows for independent evolution of client and server-side logic.
True
27
* Each request sent and processed is self contained. * It doesn’t depend on context from an earlier message. * This frees up server storage space and processing power that would otherwise be used to store and read earlier messages.
Stateless
28
# True or False Response messages are implicitly labeled as cacheable or non-cacheable for potential reuse.
False ## Footnote Response messages are **explicitly** (not implicitly) labeled as cacheable or non-cacheable for potential reuse.
29
Cache-Control
* Ways to tell if request messages are equivalent or not. * Ways to label if a response is cacheable or not, by whom, and for how long.
30
Improves runtime efficiency by eliminating the need to send duplicate responses.
Cache
31
Service consumers and service providers share a common, general technical contract.
Uniform Contract
32
# True or False Clients of a RESTful WS need to know: * The URL and HTTP method for a particular operation * The required inputs * The returned outputs
True
33
* A common general contract standardizes the interaction between different entities, making interoperability possible. * It is in the interest of all parties that this uniform contract change as little as possible.
Uniform Contract
34
* Solutions can be comprised of multiple architectural layers. * Each layer can’t ‘see’ past the next layer. Each service is only concerned about interacting with the next layer. * Each layer’s logic can evolve independently of the others, as long as the general contract (the API) between them remains the same.
Layered System
35
* Service consumers can support the execution of deferred service logic. * Disadvantage: Consumers need an execution environment for the deferred process. * May prevent server bottlenecks. But requires additional features on the consumer’s part.
Code-on-Demand
36
REST Architectural Goals
1. Performance 2. Scalability 3. Simplicity 4. Modifiability 5. Visibility 6. Portability 7. Reliability ## Footnote Note that these aren’t unique to web services. These are common goals for many software development projects.
37
Factors to consider: * Throughput & latency of request and responses * Resource utilization in the server
Performance
38
* What data actually needs to be sent? * How much overhead can be eliminated (either in processing, or in the messages exchanged)? * Can the order of data being sent be rearranged to make it seem fast? * User perception is important. Sometimes the order of messages/data sent can be tweaked to make the response seem faster without actually changing the actual time to process.
Performance
39
* Addresses an architecture’s need to support a varying number of concurrent connections. * Must be able to easily scale-up to serve sudden a influx of clients. * Conversely, it should be easy to scale down (to cut down costs) if client numbers are reduced.
Scalability
40
* Reduce the complexity of the app by separating functionalities into modules. Each unit must be distinct. * Benefits: Easier debugging/refactoring.
Simplicity
41
* Required for an app that will change over time. * New functionality might be needed, or obsolete ones removed. It should be easy to make these changes.
Modifiability
42
* Self monitoring and regulating parts of the architecture, with the goal of optimizing performance. * To some extent, it benefits different modules to know the inner workings of the others (though it may seem contradictory to the Layered System requirement, or the modularity approach). * This can have benefits in the form of optimization of outputs or processing.
Visibility
43
Refers to the ease of moving applications from deployed location to another. From one software server to another in the same machine? Or the same network? Or a different network altogether? e.g live migration
Portability
44
The degree of the service’s susceptibility to failure. Downtimes must be kept to a minimum even in cases of partial or complete failure. This can be addressed by using redundant servers.
Reliability