SCC 130 - Part 4

?
  • Created by: Nely16
  • Created on: 06-11-22 15:19

Packet switching

Nodes divide data into discrete "blocks" or packets, each packet is sent separately into the network, pakcets have a header containing information about their intended destination and may follow different paths from source to destination.

Link capcity shared between data streams with switches implementing the store-and-forward approch (receive a complete packet, store the packet in their internal memory, forward the complete packet to the next node), switches must deal with congestion such as too many packets arriving at a given time (packets may get dropped if buffer space is not available), packets may be lost, delayed, re-ordered or corrupted

1 of 29

Compare the two methods

Efficiency

Circuit switching us not as efficient as packet switching since resources are allocated during the entire duration of the connection. Computer to computer connection may mean other computers are deprived while voice to voice needs to terminate to release resources to the system. Resource allocation in packet switching is performed only when there are packets to be transmitted as resources can be relocated for some packets if not processed in time.

Delay

Circuit switching experiences minimal delay and this delay is based on the time needed to create the connection (set up phase), data transfer phase, tear down phase. In packet switching, there is no "set up phase" so each packet may experience a wait as a switch (router) before being forwarded and since different packets do not necessarily travel through the same router, the delay is not uniform for each packet of a message.

2 of 29

Protocol and layering

A protocol is a well-known set of rules and formats for endpoints to communicate and defines what is communicated and how it is communicated and when it is communicated (what is the format of data and what sequence of messages must be exchanged). Protocols provide accurate and timely transfer of data between different devices on the network.

3 of 29

HTTP

Hypertext Transfer Protocol is used to define how the client-server programs can be written to rertrieve web pages from the web.

HTTP client sends a request and the the HTTP server returns a response using the services of TCP.

Application layer protocol sits on top of TCP and is used primarily on the web

4 of 29

Importance of HTTP

HTTP underpins many of the transactions that take place on the web including most if not all of you use it everyday from delivery of websites, transactions within applications and sharing of multimedia such as video and audio.

HTTP is very versatile and has evolved significantly over time.

5 of 29

HTTP request message

It is in ASCII so human-readable format

HTTP response message

Principle 1 of protocol layering

For bidirectional communication, each layer needs to perform 2 opposite tasks: one in each direction.

Listen in one direction and talk in other direction

Encrypt in one direction and decrypt in the other direction

Tx: send in one direction and Rx: receive in the other direction

8 of 29

Principle 2 of protocol layering

Two objects associated with each layer at both sites should be identical.

The objects associated with each layer are identical: "plain text layer", "cipher text letter" and a "piece of mail".

9 of 29

Logical connections

There exists layer-to-lauer communication between each layer.

There exists a logical connection at each layer through which object created from that layer are sent.

10 of 29

TCP / IP and OSI model comparison

11 of 29

OSI model exchange

12 of 29

TCP / IP protocol stack

13 of 29

Layers involved

Logical connections layers

Internet and the web

The internet is a network that interconnects a set og computers (hosts)

The web is a service provided by computers distribute around the world

16 of 29

WWW and HTTP

The idea of the web was first proposed by Tim-Berners-Lee in 1989 at CERN (the european organisation for nuclear research) to allow several researchers at differet locations throughout Europe to access each others' research

The commercial web started in the early 1990s

17 of 29

Web architecture

The web in detail: HTML and HTTP

Web pages are written in HTML+ and stored on web server and transferred between server and client using HTTP

19 of 29

Example

20 of 29

Client / server request / response sequence

21 of 29

Dynamic client / server request / response sequenc

22 of 29

3 tier architecture

The 3-tier architecture is a client-server architecture and it is a general software architecture.

It consists of the presentation tier (aka the interface tier, example includes the web browser), logic tier (aka business logic tier, example include application server) and data tier (example includes database)

Presentation (interface) tier

Displays data / information and provides the user the ability to interact with the application and requires a GUI allowing the user an "appealing way" to view the data / information and interact with the application: menus, forms etc.

Accept data from the user - static data / information can be provided from within the tier (menus, calendar), dynamic data / information is provided to the tier from the business rules tier (result of a search authentication).

Can be used to prepare user input to be sent to other tiers. HTML and JavaScript input form verifiaction can be used to verify that all required data (numeric characters, email, etc. is acceptable) and verification code "validates" the inputs.

Interface needs to react to user events (submit button).

The interface tier should not directly interact with a database management system or a database itself

24 of 29

Presentation (interface) tier

25 of 29

Logic tier

Processes all the data received from the interface and data tiers, returns information requested by the interface tier, submits information to the data tier for storage and most of the actual programming code is contained in ths tier.

The logic tier code resides on an application server (as a service) or on a web server (as a web service) and some of the code is usually unique to the service provided (web search engines and their algorithms can be different).

Data passed between the tiers can be manipulated by unwanted users, this tier needs to verify the validity and proper format of the data received.

No provision of a user interface or forms; as no direct contact with the user at any time is required.

Similarly to the presentation tier, this tier does not directly update stored data in databases.

All data changes or updates occur in the data tier.

26 of 29

Logic tier

Data tier

Stores data or returns data to the logic tier

Data is stored in a database using a database management system such as MySQL.

Uses SQL statements (INSERT, DELETE, UPDATE, and SELECT) to retrieve and update data in a database.

Request for the data to be changed comes from within the logic tier. For example requesting a name change: enter the change in the interface tier, format the update request in the logic tier, change the data in the database e.g. data tier

28 of 29

Data tier

29 of 29

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Information systems resources »