• Nu S-Au Găsit Rezultate

• Distributed Systems Architectures – Client-Server architectures

N/A
N/A
Protected

Academic year: 2022

Share "• Distributed Systems Architectures – Client-Server architectures"

Copied!
43
0
0

Text complet

(1)

Distributed Systems (III) - overview-

Lenuța Alboaie [email protected]

“Alexandru Ioan Cuza” University of Iasi Faculty of Computer Science

Course Master

I+II

(2)

Summary

Distributed Systems ArchitecturesClient-Server architectures

Peer-to-Peer (P2P) architecturesCloud Computing ArchitecturesEmerging Trends

(3)

Vision

Figure. Vision over centralised and distributed architecture over time [Lev16]

(4)

Application Architectures |Software Layers

 The term software architecture referred originally to the structuring of software as layers or modules in a single computer and recently in terms of services offered and

requested between processes located in the same or different computers

 This process- and service-oriented view can be

expressed in terms of service layers

(5)

Application Architectures Centralized model

• No network

• Time-sharing system

• Usually a single workstation/PC

• One or several CPUs

• Not easy scalable

• Limiting Factor: CPUs number for the same

resources (memory, network, devices)

(6)

Layered application architecture

Presentation layer (UI)

Concerned with presenting the results of a computation to system users and with collecting user

inputs

Application processing layer

Concerned with providing

application specific functionality e.g., in a banking system, banking functions such as open account, close account, etc.

Data management layer

Concerned with managing the system databases

Presentation layer

Application processing layer

Data management layer

(7)

Application Architectures |Software Layers in DS

Tiered (multi-tier) architectures| Example: Internet Search Engine – general organization

(8)

Application Architectures |Software Layers in DS

Tiered (multi-tier) architectures

– Distributed systems analogy to a layered architecture – Each tier(layer) runs as a network service

– “classic” client server architecture is a two-tier model

Alternative client-server organizations (a) – (e).

(9)

Application Architectures |Software Layers in DS

Tiered (multi-tier) architectures| Examples

(10)

Software Layers in DS

Layered architectures

Break functionalities into multiple layers

Each layer hides implementation details, network abstractions, data encoding et.al.

Middleware Representation

processes or objects interacting with each other to implement communication and resource sharing

Middleware Function

provides building blocks for developing components that can interact in a DS an important goal is to hide the heterogeneity of the underlying platforms from

applications

Mask the heterogeneity &

to provide a convenient Programming model

(11)

Application Architectures |Software Layers in DS

Middleware| Examples

– Earliest middlewares: Sun RPC

– OO middlewares: CORBA (naming, security, transaction, persistent storage, event notification), DCOM, Java RMI

Middleware| Limitations

– distributed applications rely entirely on middleware services for communication and data sharing

– assuring all dependability attributes (availability, reliability, safety, integrity, maintainability) require support at the application level

• “End-to-end Arguments in System Design”, (Salzer et, al, 1984), ACM

“Some communication related functions can be completely and reliably implemented only with the knowledge and help of the application standing at the end points of the communication system. Therefore, providing that function as a feature of the communication system itself is not always sensible.“

(12)

Distributed Systems Architectures Client-Server architectures

• A server is a program that provide a service.

• A client is a program that uses a resource

• The server is always on and processes requests from clients

• Clients do not communicate with other clients

• Servers may in turn be clients

• Examples: FTP, web, email

(13)

Distributed Systems Architectures Client-Server architectures

• Servers may in turn be clients

Server Client

Client

invocation result

Server invocation

result

Process:

Key:

Computer/Node:

(14)

Distributed Systems Architectures

Client-Server architectures

A service can be provided by multiple servers

Server

Server

Server Client

Client

Data replication using multiple servers

(15)

Distributed Systems Architectures

Client-Server architectures

Proxy server:

improves availability and performance (caching of data)

Proxy servers may be used to access remote web servers through a firewall

Client

Proxy

Web

server

Web server

server Client

(16)

Distributed Systems Architectures

Client-Server architectures – Mobile Code

• A running program that travels from one machine to other in a network carrying out task on someone’s behalf, eventually returning with the result

– It is a common practice in distributed systems to require the movement of code or processes between parts of the system, instead of data

Examples of code mobility (scripts downloaded over network): JavaScript, Java applets, ActiveX controls, Flash animations, macros embedded in

Microsoft Office

Architectural styles:

Remote evaluation - A client sends code to a remote machine for execution

Code on demand - A client downloads code from a remote machine to execute locally. (e.g. Mobility-RPC)

Mobile agents: Objects or code with the ability to migrate between machines autonomously (e.g. Aglets , Mobile-C, Java Agent

Development Framework)

A potential security threat

(17)

Distributed Systems Architectures

Peer-to-Peer (P2P) Model

Code in the peer process maintains consistency and synchronization

No designated clients or servers

All play similar roles interacting cooperatively as peers

Goals examples:

Robustness Self-scalability

See details in Computer Network Course (2nd Year, Faculty Of Computer Science, UAIC)

(18)

IPFS

• “ IPFS is the Distributed Web” - https://ipfs.io/

A peer-to-peer hypermedia protocol to make the web faster, safer, and more open

(19)

IPFS

• “ IPFS is the Distributed Web” - https://ipfs.io/

–A peer-to-peer hypermedia protocol to make the web faster, safer, and more open

(20)

• “ IPFS is the Distributed Web” - IPFS https://ipfs.io/

• https://github.com/ipfs/papers/raw/master/ipfs-cap2pfs/ipfs-

p2p-file-system.pdf

(21)

Distributed Systems Architectures

Cluster/Grid Computing systems architectures

Cloud Computing: Resources are provided as a network service

• Software as a Service (SaaS): Remotely hosted software Salesforce.com, Google Apps, Microsoft Office 365

• Infrastructure as a Service (IaaS): Compute + storage + networking Microsoft Azure, Google Compute Engine, Amazon Web

Services

• Platform as a Service (PaaS): Deploy & run web applications without setting up the infrastructure

Google App Engine, AWS Elastic Beanstalk

• Storage : Remote file storage

(22)

Emerging Trends|Containers

• Containers originate in the dotCloud project initiated on March 2013 by Solomon Hyke and colleagues

– Fedora, Red Hat Enterprise Linux and OpenShift, adopted containers in September 2013

– October 2014 Microsoft announced the integration of a Docker engine in Windows Server, while in November 2014 Amazon published the integration of a Docker container in EC2 (Amazon Elastic Compute Cloud)

• Docker is a tool that allows virtualization at operating system level, thus allowing the accomplishment of the easy package of an

application and its dependencies in a container that can run

anywhere on a server.

(23)

Docker

[https://www.docker.com/what-docker]

"Docker is a tool that can package an

application and its dependencies in a

virtual container that can run on any

server. This helps enable flexibility and

portability on where the application can

run, whether on premise, public cloud,

private cloud, bare metal, etc."

(24)

Docker

• Implements a high level API that enables the creation of containers ensuring isolated processed running

• It is built over the facilities provided by the operating system (initially Linux kernel) => does not require a discrete operating system, as is the case of virtualization

=> different containers are sharing the same kernel, but are limited by the available resources (CPU, memory, I/O)

• Docker also accesses various virtualization facilities through a series of libraries

• Pros: the containers’ creation and management supports seamless work with distributed systems (e.g. multiple

applications, distributed tasks may autonomously run on a single or a range of virtual machines)

24

(25)

Docker

(26)

Docker or Virtualization

26

(27)

Docker or Virtualization

• They are used togheter

• Most providers are running bare-metal virtualization

technologies(e.g. XEN) and Docker that runs over a virtualized instance (e.g. Ubuntu)

• Containers have not replaced the virtualisation mechanism and the two are often used together new services category, namely the Container as a Service (CaaS)

• http://sleekd.com/servers/docker-vs-virtualization/

• http://www.serverwatch.com/server-trends/the-benefits-of- docker-vs.-server-virtualization.html

• http://searchservervirtualization.techtarget.com/feature/Docker- containers-virtualization-can-work-in-harmony

• https://tech.yandex.com/events/yac/2013/talks/14/

(28)

Emerging Trends|Containers

• Virtualisation: each machine includes the applications, the libraries and the host operating system

• Docker containers include the applications and their dependencies

• The containers run as independent processes in the host operating system and are not connected by a certain infrastructure

Figure: A Use Case Before and After Containers

(29)

Emerging Trends|Containers

• The generation and management of containers contribute to easier work with distributed task workflows that may autonomously run on a single machine or on a range of virtual machines

• Containers management (“containers orchestration engines”): Kubernetes, Docker Swarm, Nomad, Mesos

– Kubernetes allows: automating deployment, scaling, and management of applications that use containers.

– Features: service discovery (Kubernetes assigns a DNS name and IPs for multiple containers), load balancing, storage orchestration (Kubernetes allows managing of on-premise storage, cloud storage or network storage (NFS, iSCSIm, Cinder et.al.), fail-recovery (Kubernetes restarts/replaces containers when nodes die), Batch execution (with a replacing mechanism for potential failed containers), flexible management (e.g. updating some configuration is performed without rebuilding the application image),

horizontal scaling (automatically according to CPU use or manually through a simple command or UI)

(30)

Emerging Trends|Serverless Computing

• Metaphor: “Focus on your application development, not the infrastructure”

– PaaS ? IaaS?

• Serverless computing is an application execution model

• A serverless system runs in stateless containers that are event- triggered and the deployment represents a specific combination of client-side logic, cloud-hosted remote procedure calls (Function as a Service) and often third-party services (Backend as a Service - BaaS)

• Providers: AWS Lambda, Google Cloud Functions, Azure

Functions, IBM OpenWhisk, Oracle Fn Project, Kubeless

(31)

Emerging Trends|Serverless Computing

• Example: client desires to watch a film on a tablet from a provider that use the Amazon services.

• Serverless architectures

– the client will host a part of logic - the front-end logic.

– for the authentication service, a Backend as a Service supplier may be contracted

– deliver the film in a database (let’s say S3) in an appropriate device format, a FaaS (Function as a Service) may be called. This may be a AWS Lambda Function service that converts the movie file in a format suited to the

client’s device and places it in a temporary storage area in the geographical

Figure. Traditional architectures

(32)

Emerging Trends|Serverless Computing

Figure: Serverless Architecture example

(33)

Emerging Trends|Serverless Computing

FaaS are small, separate, units of logic that have an input and return an output. They are similar with usual functions and have a set of

properties:

Are managed by a cloud vendor: we have mentioned before that there are FaaS suppliers (AWS Lambda, Google Cloud Functions,

Azure Functions) which offer a large range of environments allowing function programming in Node.js, Python, Java, .Net et.al.

Are event-triggered: even though they can be called directly, they can be triggered by HTTP requests or notifications

Are ephemeral and stateless: after a FaaS runs, it stops automatically.

More than two calls of the same FaaS may run on different containers.

Assures scalability: due to previous characteristics, multiple

containers can be initialised in order to address the current requests.

(34)

Emerging Trends|Serverless Computing

Pros and cons

Pricing: Serverless is an execution model, meaning no provisioning or not maintaining 24 hours per day a server are needed. Instead, the charge is performed depending on the number of executions.

Networking : In the case of a long-running function that exceeds the timeout limit established or which have variable execution times, the final user experience is lacking because of latency and as such, it is probably best to use traditional

architectures.

Configuration: For serverless architectures, it is not necessary to manage

production machines or to set up various environments. Pay per execution saves your effort, therefore a serverless architecture is a better solution.

Third-party dependencies: When the application has many dependencies, then a traditional architecture can be used. Otherwise, for simple applications, serverless can be employed.

Although serverless is a start-up technology, without many “best-practice” models available, we have an intuition that it may well represent an important step in the history of conceiving distributed systems architectures.

(35)

Emerging Trends|Fog Computing and Edge Computing

• Fog Computing and Edge Computing appeared to address the need for

optimisation of Cloud Computing systems by processing at the “edge of the network”, as close as possible to the data source.

• “edge” and “fog” do not stand for a new infrastructure, but rather an idea of conducting local processing using the infrastructure present as near as possible to the data source

• Edge Computing the actual processing is made by the IoT devices

– Edge computing is a novel trend, and although there are currently no

standards for complete integration between IoT devices and API, the idea not to transmit massive amounts of data (which is an expensive and time consumer process)

– Examples of Edge computing may be observed on IoT level (e.g. mobile devices, traffic lights, motor vehicles or home appliances) or on Industrial Internet of Things level (e.g. automated industrial machines or smart power grid technology)

• Fog Computing, computing resources are placed near data sources

(36)

Emerging Trends|Fog Computing and Edge Computing

• Fog Computing, computing resources are placed near data sources

• Fog Computing plays a bridge role among edge devices and cloud data centers

• According to [FvE16] “The key difference between the two

architectures is exactly where that intelligence and computing power is placed”, obviously as close as possible to the data

sources:

– “Fog computing pushes intelligence down to the local area

network level of network architecture, processing data in a fog node or IoT gateway.”

– “Edge computing pushes the intelligence, processing power and communication capabilities of an edge gateway or

appliance directly into devices like programmable automation

controllers (PACs).”

(37)

Emerging Trends|Fog Computing and Edge Computing

• Figure: Relation: Cloud Computing- Fog Computing - Edge Computing

(38)

Emerging Trends|Fog Computing and Edge Computing

Number of devices at EDGE Computing level will reach billions, the number of nodes at Fog Computing level will be of millions and, of course, the number of DataCenters will be of thousands [Pub17]

In this ecosystem, realtime is the main characteristic of modern application

5G technologies have started to play an essential role in ensuring the necessary connectivity for Edge Computing.

comparing 4G with 3G, the main difference represented the speed of transmission,

for 5G, besides the speed as high as 10Gbps, they offer low latency and network support for massive increases in data traffic.

More at FII-Orange SpringSchool:

https://profs.info.uaic.ro/~springschool/

(39)

Emerging Trends|Fog Computing and Edge Computing

https://profs.info.uaic.ro/~springschool/index.php/school-program/

(40)

Bibliography

• Andrew S. Tanenbaum, Maarten van Steen, Distributed Systems, Principles and Paradigms, Second Edition, 2007

• Ajay D. Kshemkalyani , Mukesh Singhal , Distributed Computing - Principles, Algorithms, and Systems, © Cambridge University Press 2008

• Gray, J. and Reuter, A. Transaction Processing: Concepts and Techniques.

San Mateo, CA: Morgan Kaufmann, 1993.

• https://en.wikipedia.org/wiki/Parallel_computing

• https://en.wikipedia.org/wiki/SPMD

Fuggetta, Alfonso; Gian Pietro Picco; Giovanni Vigna (1998). "Understanding Code Mobility". IEEE Transactions on Software Engineering. NJ, USA: IEEE Press Piscataway. 24 (5): 342–361. doi:10.1109/32.685258. ISSN 0098-5589.

Retrieved 29 July 2009.

Dr Lawrie Brown. "Mobile Code Security". Australian Defence Force Academy. Retrieved 23 April 2012.

(41)

Bibliography

IIT Guwahati, Topics in Distributed Systems, 2013

Coulouris, Dollimore, Kindberg: Distributed Systems: Concepts and Design, Pearson Education.

Singhal and Shivaratri: Advanced Concepts in Operating Systems, Tata McGraw Hill

https://en.wikipedia.org/wiki/Code_mobility#cite_note- Understanding_Code_Mobility-1

https://howdoesinternetwork.com/2013/jitter

Peter Levine, The End of Cloud Computing.

Available: https://a16z.com/2016/12/16/the-end-of-cloud-computing/ (2016)

[Pub17] Moving the Cloud to the Edge,.

Available:https://www.pubnub.com/blog/moving-the-cloud-to-the-edge- computing/ (2017)

[FvE16] Fog Computing vs. Edge Computing: What’s the Difference? Available:

https://www.automationworld.com/fog-computing-vs-edge-computing-whats- difference (2016)

(42)

Summary

Distributed Systems ArchitecturesClient-Server architectures

Peer-to-Peer (P2P) architecturesCloud Computing ArchitecturesEmerging Trends

(43)

Questions?

Referințe

DOCUMENTE SIMILARE

Dynamic configuration means, that the host leases its IP address from a common address pool when it starts Dynamic configuration is the most interesting one of these

combinarea – la nivel de client și/sau server – a datelor ce provin din surse (situri) multiple, oferindu-se o funcționalitate/experiență nouă conform „curentului”

● Existing security mechanisms like JACC (Java Authorization Contract for Containers) were tricky to implement, and JASPIC (Java Authentication Service Provider Interface

limbaj de programare pentru HHVM, extinzând PHP scop: creșterea productivității dezvoltatorului Web facilități: tipuri de date explicite (type annotations), programare

New Architectures in Body Control Modules Automotive Software Architecture Electronic Control Unit (ECU) – communication between components.. Continental Automotive

• Oracle iPaas solutions are integrated with: “Oracle Self Service Automation for citizen integrators, Oracle Process Cloud Service for improved orchestration, Oracle Real-Time

This philosophy, called user-centered design, incorporates user concerns and advocacy from the beginning of the design process and dictates.. the needs of the user should be foremost

– Creates socket to address clients: socket() – Prepares data structures (sockaddr_in). – Attaches the socket to the local address