Design the application architecture - Objective 1.2: Design a distributed application Flashcards

1
Q

What is a distributed application?

A

An application that runs on two or more computers.

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

Which class for Web API controller inherit from?

A

ApiController

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

Which controller should you use when creating a REST service, MVC controller or Web API controller?

A

Web API controller

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

How do you consume a web service in ASP.Net MVC?

A

Add a reference to the the web service and use the generated proxy as follows:

using (ServiceProxy proxy = new ServiceProxy())
{
    model = proxy.GetData(input);
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What class can be used to get output from a REST URL?

A

HttpService

Ex:

var host = new Uri("http://www.yourdomain.com");
var path = "your/rest/path";
var parameters = new Dictionary();
var credential = new NetworkCredential("username",
                "password");
XDocument xml = _httpService.Get(host, path, parameters, credential);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a hybrid application?

A

An application that is hosted in multiple places

Ex: Part of the application is hosted in Windows Azure and part is hosted within a company’s network.

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

What are the two primary hybrid application patterns?

A

Client-centric and system-centric

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

What is the client-centric hybrid application pattern?

A

The client application determines where the application needs to make its service calls. Easiest to code but most likely to fail since any change to the server or client might require a change to the other part.

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

What is the server-centric hybrid application pattern?

A

Uses a service-oriented architecture approach such as a service bus which will distribute service calls to a service in the cloud, on-premise or elsewhere.

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

What are some of the design concerns with using a hybrid application pattern?

A

Connection resiliency - service calls may need to retry

Latency - Latency will be higher for hybrid applications versus on-premise applications

Authorization and access - Hybrid applications will require you to either maintain duplicate user accounts or federate on-premise accounts to the cloud

Consistency and concurrency - Plan for sequential message handling and life cycles if needed.

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

How are sessions identified by the server for each browser accessing a web site?

A

A session ID is passed by the browser to the server via a cookie or appended to the query string.

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

What are the two approaches to sessions in ASP.Net MVC?

A

Using sessions to store small amounts of data or remaining stateless and not using sessions at all. ASP.Net MVC is designer to be stateless.

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

What is the surest way to manage state or session in a distributed application?

A

Passing information from the browser using cookies, hidden input fields, or the query string.

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

What are the three modes of session management available in IIS?

A

In Process, State Server, and SQL Server

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

What is the default mode of session management in IIS?

A

In Process

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

Which mode of session management in IIS can only be used with a single web server?

A

In Process

17
Q

Which modes of session management in IIS can use used in a web farm?

A

State Server and SQL Server

18
Q

Which mode of session management in IIS offers the best performance?

A

In Process

19
Q

Where does the In Process mode of session management in IIS store session information?

A

In the web server’s local memory

20
Q

Where does the State Server mode of session management in IIS store session information?

A

In the local memory of a separate server

21
Q

Where does the SQL Server mode of session management in IIS store session information?

A

In a SQL Server database

22
Q

Which mode of session management in IIS offers the best availability and redundancy?

A

SQL Server, but only if the database used is clustered or is configured for database mirroring

23
Q

What is a web farm?

A

A group of servers that share the load of handling web requests

24
Q

What is required to direct web requests to the appropriate servers in a web farm?

A

A load balancer

25
Q

How does ASP.Net MVC support running web applications in a web farm?

A

The different components of ASP.Net MVC, controllers, views and models, can be hosted a separate servers.

26
Q

What are the main advantages of using a web farm?

A

High availability and reduced server load. If a server in the farm is unavailable, incoming requests are redirected to other servers in the farm.