Tuesday, March 5, 2019

Tutorial 04 – Distributed systems

1. Explain the term “distributed systems”, contrasting it from “distributed computing”
Distributed systems
A distributed system is a network that consists of autonomous computers that are connected using a distribution middleware. They help in sharing different resources and capabilities to provide users with a single and integrated coherent network.

Distributed computing
A distributed computer system consists of multiple software components that are on multiple computers, but run as a single system. The computers that are in a distributed system can be physically close together and connected by a local network, or they can be geographically distant and connected by a wide area network. A distributed system can consist of any number of possible configurations, such as mainframes, personal computers, workstations, minicomputers, and so on. The goal of distributed computing is to make such a network work as a single computer.


Distributed computing is a field of computer science that studies distributed systems. A distributed system is a system whose components are located on different networked computers, which communicate and coordinate their actions by passing messages to one another.

2. Compare and contrast the standalone systems with distributed systems, providing examples for advantageous use of both

Standalone systems
Advantages:
  • Security – users cannot see other users’ files unlike on stand-alone machines.
  • Files can easily be shared between users.
  • Data is easy to back-up as all the data is stored to a file server.
  • Network users can communicate by email and instant messaging.
  • Sharing devices, as printers can save money.
  • Software licences are likely to be cheaper than buying several standalone licences.
  • One internet connection can be used by many computers on the network.
  • Often computers for use on a network can be cheaper than standalone computers.

Disadvantages:
  • Purchasing the network cabling and file servers can be expensive.
  • If the file server breaks down the files on the file server become inaccessible.
  • Email might still work if it is on a separate server.
  • The computers can still be used but are isolated.
  • Viruses can spread easily to other computers throughout a computer network.
  • There is danger of hacking, particularly with wide area networks.
  • Managing a large network is complicated, requires training and a network manager usually needs to be employed.
  • It can be expensive to install cables, routers, and hubs, also servers and other networking components can be expensive and complicated to install and maintain.

Distributed systems
Advantages :
  • Scalability and Modular Growth
  • Fault Tolerance and Redundancy
  • Low Latency
  • Cost Effectiveness
  • Efficiency
Disadvantages : 
  • Complexity
  • Higher Initial Cost
  • Security Concerns
  • Conclusion
3. Discuss the elements of distributed systems 
  • Processing components 
  • Data networksfor components to communicate
  • Data stores (data bases) and Data 
  • Theconfiguration of the above elements
  • The components to share the computing resources ,increasing the processing power ,provide better user experience 
  • The users to share data and other resources, such as documents and files 
  • The engineers to have a centralized control
4. Identify different types of services, which can be gained from distributed systems, specifying the protocols used for them 
  • Mail service SMTP, POP3, IMAP
  • File transferring and sharing FTP
  • Remote logging (telnet) 
  • Games and multimedia RTP, SIP,H.26x
  • Web HTTP
5. Identify examples for both browser-based and non-browser-based clients of distributed systems 
  • The world wide web – information, resource sharing
  • Clusters, Network of workstations
  • Distributed manufacturing system (e.g.,automated assembly line)
  • Network of branch office computers -Information system to handle automatic
  • processing of orders
  • Network of embedded systems
  • New Cell processor (PlayStation 3)
6. Discuss the characteristics of different types of Web-based systems, including the RiWAs 
TTs  for  the  Browser-based  Client-Components  of RiWAs 
There  are  several  approaches  for  the  browser-based RiWAs, inherited  from RIAs. The  first approach, which is the proprietary plugin based approach, uses the technologies such as Adobe (former Macromedia) Flash/Flex [13], JAVA Applets,  or  MS  Silverlight  [5].  These  technologies  are enriched  with  utensils for  developing desktop  applications like rich GUIs. 

TTs for the  non-browser-based client-components of RiWAs 
The  standard desktop  application development TTs like JAVA  or  .Net  and  related libraries/frameworks  can  be utilized  for  non-browser-based  client-components development. For DC development, these frameworks  may contain  their  own  tools  or  some  third-party 
frameworks/libraries can be incorporated. 

7. Explain different architectures for distributed systems, explaining special features of each 

Client Server Architecture

The client server architecture has two major components. The client and the server. The Server is where all the processing, computing and data handling is happening, whereas the Client is where the user can access the services and resources given by the Server (Remote Server). The clients can make requests from the Server, and the Server will respond accordingly. Generally, there is only one server that handles the remote side. But to be on the safe side, we do use multiple servers will load balancing techniques.

As one common design feature, the Client Server architecture has a centralized security database. This database contains security details like credentials and access details. Users can't log in to a server, without the security credentials. So, it makes this architecture a bit more stable and secure than Peer to Peer. The stability comes where the security database can allow resource usage in a much more meaningful way.  But on the other hand, the system might get low, as the server only can handle a limited amount of workload at a given time.
Advantages:
  • Easier to Build and Maintain
  • Better Security
  • Stable
Disadvantages:
  • Single point of failure
  • Less scalable
Peer to Peer (P2P)

The general idea behind peer to peer is where there is no central control in a distributed system. The basic idea is that, each node can either be a client or a server at a given time. If the node is requesting something, it can be known as a client, and if some node is providing something, it can be known as a server. In general, each node is referred to as a Peer.

In this network, any new node has to first join the network. After joining in, they can either request a service or provide a service. The initiation phase of a node (Joining of a node), can vary according to implementation of a network. There are two ways in how a new node can get to know, what other nodes are providing.

Centralized Lookup Server - The new node has to register with the centralized look up server an mention the services it will be providing, on the network. So, whenever you want to have a service, you simply have to contact the centralized look up server and it will direct you to the relevant service provider.
Decentralized System - A node desiring for specific services must, broadcast and ask every other node in the network, so that whoever is providing the service will respond.

8. Compare and contrast the micro-service architecture from monolithic architecture

Monolithic Architecture
Monolith means composed all in one piece. The Monolithic application describes a single-tiered software application in which different components combined into a single program from a single platform. Components can be:
  • Authorization — responsible for authorizing a user
  • Presentation — responsible for handling HTTP requests and responding with either HTML or JSON/XML (for web services APIs).
  • Business logic — the application’s business logic.
  • Database layer — data access objects responsible for accessing the database.
  • Application integration — integration with other services (e.g. via messaging or REST API). Or integration with any other Data sources.
  • Notification module — responsible for sending email notifications whenever needed.
Benefits:
  • Simple to develop — At the beginning of a project it is much easier to go with Monolithic Architecture.
  • Simple to test. For example, you can implement end-to-end testing by simply launching the application and testing the UI with Selenium.
  • Simple to deploy. You have to copy the packaged application to a server.
  • Simple to scale horizontally by running multiple copies behind a load balance.
Microservices Architecture
Microservices are an approach to application development in which a large application is built as a suite of modular services (i.e. loosely coupled modules/components). Each module supports a specific business goal and uses a simple, well-defined interface to communicate with other sets of services.
Instead of sharing a single database as in Monolithic application, each microservice has its own database. Having a database per service is essential if you want to benefit from microservices, because it ensures loose coupling. Each of the services has its own database. Moreover, a service can use a type of database that is best suited to its needs.
Consider the same example of the e-commerce application, which consists of several components/modules. Define each component/module as a separate loosely coupled service depending on the requirement, which may collaborate with each other based on the scenario. We can have following services for a complete application:

  • Authorization Service — Responsible for authorizing customer.
  • Order Service — takes an order and process it.
  • Catalog Service — Manage products and check products inventory.
  • Cart Service — Manage user cart, this service can utilize Catalog service as a data source.
  • Payment Service — Manage and Authorize payments.
  • Shipping Service — Ships ordered products.
Benefits:
  • Microservices Enables the continuous delivery and deployment of large, complex applications.
  • Better testability — services are smaller and faster to test.
  • Better deployability — services can be deployed independently.
  • It enables you to organize the development effort around multiple teams. Each team is responsible for one or more single service. Each team can develop, deploy and scale their services independently of all of the other teams.
  • Each microservice is relatively small
9. Explain the MVC style, indicating the limitations of it in the context of web-based systems
We can simplify MVC into Model-View-Controller that is a well-known word in software engineering and web application development space. It’s a terminology or pattern that is applied in web development to separate 3 main pieces of any application into their isolated environments. Though, this was originally developed for the desktop computing but adopted widely in all programming languages as architecture for World Wide Web applications. MVC changed the whole scenario of internal representations of information. It changed the way the information is presented to or accepted from the user.
MVC pattern has become the most popular and powerful framework since it improves development process of websites, web services and interactive web applications. It can be applied to JAVA, PHP, ASP.NET and many other programming languages and also facilities customization in World Wide Web applications.
The Controller, the View and the Model are the three components of MVC that actually does everything within an application such as:
  • The Controller – In the web environment, the Controller plays a role of the traffic cop of the application. The Controller handles incoming HTTP request. It is also directing traffic to where it should go, identifying which view needs to load up and is interacting with the appropriate models.
  • The View – The View in a web-based application is the representation of the user-interface. Buttons, forms and other information visible to the user on the web are all part of View. View is implemented when controller calls up the view after having interaction with the appropriate model that gathers the particular information to display in a particular view.
  • The Model – the Model is a place where all data is stored regarding the application in separate models. This is the place where data from controller and sometimes the view is actually passed into, out of, and is manipulated. There is no link between Model and HTTP, web servers or anything like that but it is responsible to check the data against the stored information in database and then to supply it accordingly
10. Identify different approaches of use of MVC for web-based systems and discuss their strengths and weaknesses

The Benefits of using The MVC 
  • Different views and controllers can be substituted to provide alternate user interfaces for the same model.
  • Multiple simultaneous views of the same model
  • The change propagation mechanism insures that all views simultaneously reflect the current state of the model.
  • Changes affecting just the user interface of the application become easier to make.
  • With MVC it can be easier to test the core of the application, as encapsulated by the model.

The problems of MVC2
  • There’s increased complexity as an apllication may use other patterns at the same time as MVC.
  • The view and the controller are closely coupled wich makes modification to one affect the other.
  • Changes to the model interface will necessitate changes to the controller and the view.
  • When the model is active frequent changes to model can result in excessive updates of the corresponding views.
Advantages of MVC
  • Faster development process: MVC supports rapid and parallel development. With MVC, one programmer can work on the view while other can work on the controller to create business logic of the web application. The application developed using MVC can be three times faster than application developed using other development patterns.
  • Ability to provide multiple views: In the MVC Model, you can create multiple views for a model. Code duplication is very limited in MVC because it separates data and business logic from the display.
  • Support for asynchronous technique: MVC also supports asynchronous technique, which helps developers to develop an application that loads very fast.
  • Modification does not affect the entire model: Modification does not affect the entire model because model part does not depend on the views part. Therefore, any changes in the Model will not affect the entire architecture.
  • MVC model returns the data without formatting: MVC pattern returns data without applying any formatting so the same components can be used and called for use with any interface.
  • SEO friendly Development platform: Using this platform, it is very easy to develop SEO-friendly URLs to generate more visits from a specific application.
Disadvantages of MVC
  • Increased complexity
  • Inefficiency of data access in view
  • Difficulty of using MVC with modern user interface.
  • Need multiple programmers
  • Knowledge on multiple technologies is required.
  • Developer have knowledge of client side code and html code.

11. Discuss the need for very specific type of communication technologies/techniques for the distributed/web-based systems 

12. Compare and contrast RPC with RMI 
RPC and RMI are the mechanisms which enable a client to invoke the procedure or method from the server through establishing communication between client and server. The common difference between RPC and RMI is that RPC only supports procedural programming whereas RMI supports object-oriented programming.

Another major difference between the two is that the parameters passed to remote procedures call consist of ordinary data structures. On the other hand, the parameters passed to remote method consist of objects

13. Explain the need for CORBA, indicating it’s use in web-based systems 
CORBA – Common Object Request Broker Architecture
CORBA is a standard for an object request broker architecture that was developed by the Object Management Group in the 1990s. It was hoped that this would be widely adopted and that implementations of the standard would be available from competing vendors. The OMG standards are available from their website.
The OMG’s vision of a distributed application is shown in Figure 1, which I have adapted from Siegel’s diagram of the Object Management Architecture (Siegal, 1998). This proposes that a distributed application should be made up of a number of components:
  • Application objects that are designed and implemented for this application.
  • Standard objects that are defined by the OMG for a specific domain. These domain object standards cover finance/insurance, electronic commerce, healthcare, and a number of other areas.
  • Fundamental CORBA services that provide basic distributed computing services such as directories, security management, etc.
  • Horizontal CORBA facilities such as user interface facilities, system management facilities, etc. The term horizontal facilities suggests that these facilities are common to many application domains and the facilities are therefore used in many different applicatio
14. Discuss the XML specification, highlighting the important sections such as element naming conventions

XML stands for Extensible Markup Language. It is a text-based markup language derived from Standard Generalized Markup Language (SGML).

XML tags identify the data and are used to store and organize the data, rather than specifying how to display it like HTML tags, which are used to display the data. XML is not going to replace HTML in the near future, but it introduces new possibilities by adopting many successful features of HTML.

There are three important characteristics of XML that make it useful in a variety of systems and solutions −
  • XML is extensible − XML allows you to create your own self-descriptive tags, or language, that suits your application.
  • XML carries the data, does not present it − XML allows you to store the data irrespective of how it will be presented.
  • XML is a public standard − XML was developed by an organization called the World Wide Web Consortium (W3C) and is available as an open standard.
XML Usage
A short list of XML usage says it all
  • XML can work behind the scene to simplify the creation of HTML documents for large web sites.
  • XML can be used to exchange the information between organizations and systems.
  • XML can be used for offloading and reloading of databases.
  • XML can be used to store and arrange the data, which can customize your data handling needs.
  • XML can easily be merged with style sheets to create almost any desired output.
  • Virtually, any type of data can be expressed as an XML document.s
15. Compare and contrast XML and JSON, indicating the pros and cons of both 
JSON (JavaScript Object Notation) is a lightweight data-interchange format and it completely language independent. It is based on the JavaScript programming language and easy to understand and generate.

XML (Extensible markup language) was designed to carry data, not to display data. It is a W3C recommendation. Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The design goals of XML focus on simplicity, generality, and usability across the Internet. It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures such as those used in web services.

16. Identify other data formatting/structuring techniques available for the communication of web-based systems

In a web-based learning environment communication can be either:

Synchronous- communication takes place at the same time. This requires that all participants are present at the same time. This type of communication is used fairly rarely for specific purposes such as getting acquainted, changing opinions, working in small groups, brainstorming etc.

Asynchronous- communication takes place at different times or over a certain period of time. This allows more time to work on your messages and to react to other students' messages.

Communication can vary also depending on the amount of people it involves. Communication on the web can be divided into the following types, involving a different amount of participants at a time:

One to one- one person communicates with somebody else, for example a student sends an A&O e-mail message to his/her trainer
One to many- one person communicates with many others, e.g. a student posts a message in A&O's discussion forum
Many to many- many persons communicate with each other, e.g. via videoconferencing

The most relevant tools for communication in the VERT courses you are about to take are the 
following:

Internet e-mail- The regular e-mail can be sent to the instructor or other students e.g. if there is something that needs immediate attention.
A&O's mail- This e- mail is dedicated to studying and stays in A&O virtual learning environment.
A&O discussion forum- A tool for asynchronous, one-to-many communication for many purposes.

References
  • https://techdifferences.com/difference-between-rpc-and-rmi.html
  • https://medium.com/koderlabs/introduction-to-monolithic-architecture-and-microservices-architecture-b211a5955c63
  • https://ifs.host.cs.st-andrews.ac.uk/Books/SE9/Web/DistribSys/Corba.html
  • https://www.scribd.com/document/239346702/Advantages-and-Disadvantages-of-Using-a-Network-Compared-to-a-Stand-Alone-Computer

No comments:

Post a Comment

Tutorial 11 – Client-side development 2 - RiWAs

1. Distinguish the term “Rich Internet Applications” (RIAs) from “Rich Web-based Applications” (RiWAs).  Definition What does Rich Inter...