<span dir="rtl">الشريحة 1</span>

fortnecessityusefulΛογισμικό & κατασκευή λογ/κού

14 Δεκ 2013 (πριν από 3 χρόνια και 6 μήνες)

96 εμφανίσεις

TT284
Block 2 Part 1

Block 2

Part 1


Architectures

1

TT284
Block 2 Part 1

Architecture

The architecture of web applications in terms of
their ‘structure’, which can relate to both hardware

(the physical structure of the application) and
software (the programs making up an application).

2

TT284
Block 2 Part 1

Architecture

3

The architecture of a software system defines that
system in terms of computational components and
interactions among those components.

Shaw and
Garlan

(1996)
summarise

various
interpretations:

TT284
Block 2 Part 1

Architecture

4

‘Architecture’ is a term that lots of people try to
define, with little agreement. There are two common
elements: One is the highest
-
level breakdown of a
system into its parts; the other, decisions that are
hard to change.

In Patterns of Enterprise Application Architecture,
Fowler (2002) states:

TT284
Block 2 Part 1

Architecture

5

Architecture basically comprises of four things.

. Structure
-

the building blocks (components) and

how they relate to and/or interact with one another.

. Foundations
-

a stable basis on which to build

something.

In ‘Software architecture for developers’, Brown
(2012) describes architecture more widely

TT284
Block 2 Part 1

Architecture

6

. Infrastructure services
-

the essential services

that are an integral part of whatever is being

built. With a building, this might be power, water,

cooling, etc. With software, this might be security,
configuration, error handling, etc.

. Vision


it's crucial that you understand what it is
you are building and how that process will be

undertaken. Vision can take the form of blueprints,
guidelines, leadership, etc.

TT284
Block 2 Part 1

Architecture

7

It is important to
recognise

that here we are
examining different approaches to architecture but
not the actual architecture of a system.

You will be asked to apply what you have learned
and to consider an appropriate approach for the
Open University Running Club (OURC) case study.

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

8

client
-
server architecture divides an application

into two parts, ‘client’ and ‘server

Two
-
tier architecture

The server part provides functionality:

Clients connect to the server and request that it
performs a task. The server performs its task and
returns any results to the client,

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

9

In client

server architecture is also commonly

called ‘two
-
tier architecture’, the application is
splitted

into two parts. The client part (‘presentation’
layer or tier) provides the interface for users, displays
information, and passes information to the server for
searching. The server part can be kept and run on
the company’s own server machine, it processes the
requests and sends the response to the client that
originated the request.

Two
-
tier architecture

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

10

A common client used to access applications is a
web browser that accesses server applications using
HTTP.

The web browser is provided by a third party, this
means that application builders must rely on agreed
standards for the
behaviour

of the client component.

Two
-
tier architecture

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

11

The web browser (thin client) simply displays the
information that the server provides.

The ‘more intelligent’ (thick client) allows you to take
the information the server provides and to
manipulate and display it in various ways according
to your own personal needs.

Two
-
tier architecture

In general, users can use any web browser as a
client, in spite that different web browsers do have

different
behaviours

in a few specific circumstances

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

12

Two
-
tier architecture

Example of two
-
tier architecture

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

13

Both the client and the server parts can be further
subdivided if this is appropriate to the application.

Multi
-
tier architecture

The client may be responsible for some processing of
data and for the presentation of information.

These two functions might be separated into two
tiers at the client end. While the server software
might include one or more data stores

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

14

An architecture used over the internet might use
two more tiers on the server side: a data tier and
another tier that handles interactions with the data
tier, such as retrieving and validating data.

Multi
-
tier architecture

This tier, between the data tier and the web server
application, is sometimes termed the ‘middle tier’ or
middleware. An application that uses middleware is
said to employ multi
-
tier architecture.


TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

15

Multi
-
tier architecture

Example of multi
-
tier architecture

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

16

‘multi
-
tier architecture’ refers to what should more

specifically be called three
-
tier architecture (client,
server and data tiers).

Multi
-
tier architecture

However, more tiers than this can be used and so the
term ‘N
-
tier architecture’ is used generally to mean
any architecture that has more than two tiers.

TT284
Block 2 Part 1

Client

server and multi
-
tier architecture

17

There are advantages to breaking down the
application into tiers. Each tier can be changed more

easily as it is less dependent on the precise details of
the other components with which it interacts.

Multi
-
tier architecture

We need to adopt standards, and specify precise and
limited interactions between the tiers.

TT284
Block 2 Part 1

Network and distributed architectures

18

service
-
oriented architecture (SOA) is based around
the idea of breaking down an application into a set
of much smaller tasks that can be performed by
small independent pieces of software, each
performing a discrete task commonly called a service
such as Currency conversion and Data storage.

Service
-
oriented architecture (SOA)


When a service is made available over the internet,
it is then usually termed a web service.

TT284
Block 2 Part 1

Network and distributed architectures

19

SOA is based on three main components or roles:

Service
-
oriented architecture (SOA)

1 a requester that can both search and discover web
services and use or ‘bind’ to a web service by
communicating with XML messages

2 a directory or registry that holds the details of web
services that are available

TT284
Block 2 Part 1

Network and distributed architectures

20

Service
-
oriented architecture (SOA)

3 the services themselves. Each service has its details
published as an XML description in any number of
directories.

The description includes details of what the service
does and how to use the service in terms of how to
call it and what response to expect.

TT284
Block 2 Part 1

Network and distributed architectures

21

Outline of service
-
oriented architecture (SOA)

Service
-
oriented architecture (SOA)

TT284
Block 2 Part 1

Network and distributed architectures

22

To find a service on the Web, a requester must know
the location (ex. URL) of a directory service and then
search the directory for the type of service required.
The directory provides a description of the service
(location and how to use it). The requester makes a
connection, or ‘bind’ to the service to put a request
to the service, which the service processes before
returning any response required.

Service
-
oriented architecture (SOA)

TT284
Block 2 Part 1

Network and distributed architectures

23

Web service architecture (WSA) is a particular
realisation

of SOA that is used to provide services
over the internet.

It has four distinct layers, which are:

Service
-
oriented architecture (SOA)

Web service architecture

1) Network transport layer.

It supports the passing of messages between

components in the architecture. Common protocols
used here are HTTP, FTP and SMTP.

TT284
Block 2 Part 1

Network and distributed architectures

24

2) Message encoding layer.

It provides a standard approach to encoding
information in messages so that they can be
understood. Web service messaging approaches
such as XML
-
RPC and SOAP are based on XML.

Service
-
oriented architecture (SOA)

Web service architecture

TT284
Block 2 Part 1

Network and distributed architectures

25

3) Service description layer.

It provides a way to describe a web service so that it
can be accessed and used. The Web Services
Description Language (WSDL) is used to describe
services.

Service
-
oriented architecture (SOA)

Web service architecture

TT284
Block 2 Part 1

Network and distributed architectures

26

4) Service discovery layer.

It provides the means to publish descriptions of and
find web services in a central repository.

The Universal Description, Discovery and Integration
(UDDI) registry standard supports this layer.

Service
-
oriented architecture (SOA)

Web service architecture

These four layers are termed the web services
protocol stack

TT284
Block 2 Part 1

Network and distributed architectures

27

Service
-
oriented architecture (SOA)

Web service architecture

The upper layers build on the lower levels so, ex.
service descriptions are expressed using XML, and
SOAP messages are usually exchanged using HTTP.

TT284
Block 2 Part 1

Network and distributed architectures

28

In general the operation of web services involves the
following processes.

Service
-
oriented architecture (SOA)

Web service operation

1 Publish service description

2 Search request.

3 Service descriptions

4 Request service

5 Service response

TT284
Block 2 Part 1

Network and distributed architectures

29

Service
-
oriented architecture (SOA)

Web service operation

TT284
Block 2 Part 1

Network and distributed architectures

30

The three applications on the left (‘service
scheduling’, ‘order processing’ and ‘account
management’) are all broken into a set of ‘reusable
business services’

Service
-
oriented architecture (SOA)

Web service operation

on the right. It is these five services that would be
implemented as part of an SOA
-
based solution.

TT284
Block 2 Part 1

Network and distributed architectures

31

The SOA model (with its ‘publish’, ‘find’ and ‘bind’
operations), together with the small size of
operations embodied by services, leads to a very

flexible solution.

Service
-
oriented architecture (SOA)

SOA properties

Not all the services used in a process may be
provided by the
organisation
. Third
-
party services
can be included in a process.

TT284
Block 2 Part 1

Network and distributed architectures

32

Services are called when they are needed. This is
often termed ‘Just
-
intime
’. If the service is not used
then it is free to service other applications

Service
-
oriented architecture (SOA)

SOA properties

If the service proves to be unavailable, then it is
possible to use another such service that might be
found in a directory. This allows the application to be
robust and reliable than an application relying on the
availability of a single service.

TT284
Block 2 Part 1

Network and distributed architectures

33

The SOA model adopts a platform
-
neutral approach
to implementation. So, for example, the descriptions
of web services that are published in a directory are
written in XML often using Web Services Description

Language (WSDL). The messages passed between
client and service are often encoded as Simple
Object Access Protocol (SOAP), or supported more
directly by the HTTP
-
based Representational State
Transfer (REST) approach

Service
-
oriented architecture (SOA)

SOA properties

TT284
Block 2 Part 1

Network and distributed architectures

34

The establishment of such open standards means
that SOA can be adopted without making any
proprietary commitment. So the platform
-
neutral
facet allows SOA to remain fairly non
-
proprietary

Service
-
oriented architecture (SOA)

SOA properties

TT284
Block 2 Part 1

Network and distributed architectures

35

SOA is well placed to take advantage of a recent
development known as ‘cloud technology’ based on
what is often termed ‘the Cloud’.

Cloud architecture

Some definitions restrict the Cloud to mean that
virtual servers are made available and used over the
internet, but more generally the Cloud is seen as
consisting of a wide range of different resources.

TT284
Block 2 Part 1

Network and distributed architectures

36

The National Institute of Standards and Technology
(NIST) provided a wider definition of Cloud computing:

Cloud architecture

Cloud computing is a model for enabling convenient,
on
-
demand network access to a shared pool of
configurable computing resources (e.g. networks,
servers, storage, applications, and services) that can
be rapidly provisioned and released with minimal
management effort or service provider interaction.

TT284
Block 2 Part 1

Network and distributed architectures

37

The general principle behind the Cloud is that it
functions as a set of available resources and services
that can be accessed over the internet.

Cloud architecture

When an
organisation

has a requirement for
additional resources, it can expand its operations by
contracting them from the Cloud providers.

TT284
Block 2 Part 1

Network and distributed architectures

38

Web 2 and architecture

There has been a trend to enhance the user
experience on the Web by increasing the
opportunities for participation (
Facebook
,

LinkedIn, etc.) and also to improve the interactivity
of the Web. These advances have led to the
labelling

of a new era as ‘Web 2’

TT284
Block 2 Part 1

Network and distributed architectures

39

Web 2 and architecture

One important advance, relevant to architecture, is
that thin clients such as browsers are equipped with
more sophisticated functionality so that, for
example, data can be displayed in various user
-
defined ways without any communication obvious to
the user with the server.

TT284
Block 2 Part 1

Network and distributed architectures

40

Web 2 and architecture

Asynchronous JavaScript + XML (AJAX) is an
approach
utilising

an additional client
-
side layer that
sits behind the client user interface (browser

window) and manages the communication, using
HTTP requests, with the server on behalf of the
client.

TT284
Block 2 Part 1

Realising

an architecture

41

After looking at architecture then we should look at
the issue of ‘design’.

For example, in multi
-
tier architecture, we might
specify that there is a data tier and it will include
information about sales and stock levels. A design
decision has been made to put the information into
two separate databases.

TT284
Block 2 Part 1

Realising

an architecture

42

By looking at components and how they might be
used in an architecture we are moving from the high
level, more abstract architecture toward more
concrete implementation aspects in a top
-
down
fashion

TT284
Block 2 Part 1

A few products

43

Client tier

As most of the features of
FireFox

are based on the
open HTML, XML standards, then unless the
application uses some
FireFox
-
specific feature, then
it is very likely that the client tier can be
realised

by
any other standards conformant browser, such as
Internet Explorer. So the user can select which
browser they wish to use and the client tier can be
realised

as a mixture of browser

TT284
Block 2 Part 1

A few products

44

Tomcat server can run Java programs.

TT284
Block 2 Part 1

Reflecting on architecture

45

‘Why did we look at “conceptual architecture” when
what we really needed to produce a solution was a


realisation
” composed of real items that can be
downloaded and used?’.

1) We now have a common language and
understanding. Knowledge of terminologies such

as ‘client’, ‘data tier’, middle tier’, ‘business logic’.

TT284
Block 2 Part 1

Reflecting on architecture

46

2) The conceptual architecture is not a commitment
to any product and allows a solution to be planned
and justified in isolation without the clutter of
details.

3) Once the architecture is settled, then it serves as a
design against which to plot the progress of the
implementation.

TT284
Block 2 Part 1

Reflecting on architecture

47

4) After implementation, the conceptual architecture
serves as the starting point for understanding what
has been implemented.

The level of abstraction of the architecture means
that changing aspects at this level will be unusual
and usually will be the most costly.

TT284
Block 2 Part 1

48

Look at Block 2 Part 1 activities