Tutorial 04 – Distributed systems

1. Explain the term “distributed systems”, contrasting it from “distributed computing” ?


Distributed system: a collection of independent computers that are connected with an interconnection network.
Distributed computing: a method of computer processing in which different parts of a computer program are run on two or more computers that are communicating with each other over a network.

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

A standalone device is any mechanism or system that can perform its function without the need of another device, computer, or connection. A perfect example of a standalone device is a copy or fax machine, as shown in the picture .

 Standalone system 
  • All the components are executed within a single device 
  • Do not need a network
  • Usually one or tightly coupled set of technologies are used to develop (JAVA, .NET)
Distributed system
  • The components are distributed and executed in multiple devices    
  • Need a network 
  • Multiple and loosely coupled set of technologies are used to develop(HTML +CSS + JS + PHP)     
Standalone Advantages. One advantage of a standalone computer is damage control. For example, if something goes wrong, only the standalone will be affected. Simplicity is another advantage, because it takes a lot less expertise to manage one computer than it does to setup or troubleshoot several.

 Wider customer reach. Another advantage of distribution channels is the speed at which you can distribute your products in large geographic areas. Established distributors can readily tap a network of retailers and other distributors to help with market coverage

 3. Discuss the elements of distributed systems ? 

 •Processing components
•Data networksfor components to communicate
•Including the components who are dedicated for processing the communication, called connectors •Data stores (data bases) and Data
 •The configuration of the above elements


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)  

protocols--HTTP

5. Identify examples for both browser-based and non-browser-based clients of distributed systems ?

Browser based 
 

   •Web sites 
   •Web applications 
   •Web services and client apps 
   •Rich Internet Applications (RIAs)/Rich Web based Applications (RiWAs)

Non Browser based  
  • mobile apps like facebook app
  • mobile Gmails
  • file servers 

6. Discuss the characteristics of different types of Web-based systems, including the RiWAs ? 

Mobile compatibility
Accessible to All Users
Well Planned Information Architecture
Well-Formaed Content That Is Easy to Scan
Fast Load Times
Browser Consistency
Effective Navigation
Contrasting Colour Scheme
Good Error Handling


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

client-server (or two-tier) architecture 


A two-tier client/server works when most or all of the application logic and data is hosted on a server. The client integrates with the presentation layer and accesses the server for application specific tasks and processing.

For example, the core application and data are installed at a central server. One or more client devices uses its client-end application to request data or processes from the server. The server sends the required data or performs a process to fulfill the query. In another two-tier client/server instance, such as a data backup architecture, the application access and logic may be with the client device, whereas the server stores and provides the core data.


 Three-tier architecture

Three-tier architecture is a client–server software architecture pattern in which the user interface (presentation), functional process logic ("business rules"), computer data storage and data access are developed and maintained as independent modules, most often on separate platforms 
Advantages. Maintainability - Because each tier is independent of the other tiers, updates or changes can be carried out without affecting the application as a whole. Scalability - Because tiers are based on the deployment of layers, scaling out an application is reasonably straightforward 

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

Monolithic architecture

The monolithic architecture is considered to be a traditional way of building applications. A monolithic application is built as a single and indivisible unit. Usually, such a solution comprises a client-side user interface, a server side-application, and a database. It is unified and all the functions are managed and served in one place.
Normally, monolithic applications have one large code base and lack modularity. If developers want to update or change something, they access the same code base. So, they make changes in the whole stack at once. 




 Microservices architecture


While a monolithic application is a single unified unit, a microservices architecture breaks it down into a collection of smaller independent units. These units carry out every application process as a separate service. So all the services have their own logic and the database as well as perform the specific functions.
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
Martin Fowler
Within a microservices architecture, the entire functionality is split up into independently deployable modules which communicate with each other through defined methods called APIs (Application Programming Interfaces). Each service covers its own scope and can be updated, deployed, and scaled independently.



 






 







9. Explain the MVC style, indicating the limitations of it in the context of web-based systems?

Model–View–Controller (usually known as MVC or Model WC for the MVVC variant) is an architectural pattern commonly used for developing user interfaces that divides an application into three interconnected parts. This is done to separate internal representations of information from the ways information is presented to and accepted from the user. The MVC design pattern decouples these major components allowing for efficient code reuse and parallel development.
Traditionally used for desktop graphical user interfaces (GUIs), this architecture has become popular for designing web applications. Popular programming languages like Java, C#, Python, Ruby, PHP have MVC frameworks that are used in web application development straight out of the box




10. Identify different approaches of use of MVC for web-based systems and discuss their strengths and weaknesses  ?

MVC architecture helps us to control the complexity of application by dividing it into three components i.e. model, view and controller.
 MVC does not use server-based forms, that’s why it is ideal for those developers who want full control over their application behavior. 
Test driven development approach is supported by MVC architecture. 
MVC use front controller paern. Front controller paern handles the multiple incoming requests using single interface (controller).
 Front controller provides centralized control. We need to configure only one controller in web server instead of many. Front controller provides support rich routing communications to design our web application.







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

Communication techniques/technologies 

1.Functional oriented communication 
 •RPC/RMI 
 •CORBA 
2.Message Oriented communication 
 •SOAP
3.Resource oriented communication 
 •REST


 


















 12. Compare and contrast RPC with RMI ? 


RPC (Remote Procedure Call) and RMI (Remote Method Invocation) are two mechanisms that allow the user to invoke or call processes that will run on a different computer from the one the user is using. The main difference between the two is the approach or paradigm used. RMI uses an object oriented paradigm where the user needs to know the object and the method of the object he needs to invoke. In comparison, RPC isn’t object oriented and doesn’t deal with objects. Rather, it calls specific subroutines that are already established.
RPC is a relatively old protocol that is based on the C language, thus inheriting its paradigm. With RPC, you get a procedure call that looks pretty much like a local call. RPC handles the complexities involved with passing the call from the local to the remote computer. RMI does the very same thing; handling the complexities of passing along the invocation from the local to the remote computer. But instead of passing a procedural call, RMI passes a reference to the object and the method that is being called. RMI was developed by Java and uses its virtual machine. Its use is therefore exclusive to Java applications for calling methods on remote computers.
In the end, RPC and RMI are just two means of achieving the same exact thing. It all comes down to what language you are using and which paradigm you are used to. Using the object oriented RMI is the better approach between the two, especially with larger programs as it provides a cleaner code that is easier to track down once something goes wrong. Use of RPC is still widely accepted, especially when any of the alternative remote procedural protocols are not an option.


13. Explain the need for CORBA, indicating it’s use in web-based systems  ?

Common Object Request Broker Architecture
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms

The CORBA Interface Definition Language, or IDL, allows the development of language and location-independent interfaces to distributed objects. Using CORBA, application components can communicate with one another no matter where they are located, or who has designed them


14. Discuss the XML specification, highlighting the important sections such as element naming conventions  ?

  1. XML shall be straightforwardly usable over the Internet.
  2. XML shall support a wide variety of applications.
  3. XML shall be compatible with SGML.
  4. It shall be easy to write programs which process XML documents.
  5. The number of optional features in XML is to be kept to the absolute minimum, ideally zero.
  6. XML documents should be human-legible and reasonably clear.
  7. The XML design should be prepared quickly.
  8. The design of XML shall be formal and concise.
  9. XML documents shall be easy to create.
  10. Terseness in XML markup is of minimal importance

    Naming Conventions. Package names are written in all lower case to avoid conflict with the names of classes or interfaces. Companies use their reversed Internet domain name to begin their package names—for example, com.example.mypackage for a package named my package created by a programmer at example.com . 
15. Compare and contrast XML and JSON, indicating the pros and cons of both ?

 XML

Extensible Markup Language 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 W3C's XML 1.0 Specification and several other related specifications—all of them free open standards—define XML

Pro:
  • Generalized markup; it is possible to create "dialects" for any kind of purpose
  • XML Schema for datatype, structure validation. Makes it also possible to create new datatypes
  • XSLT for transformation into different output formats
  • XPath/XQuery for extracting information in deeply nested structures
  • built in support for namespaces
Con:
  • Relatively wordy compared to JSON (results in more data for the same amount of information).


JSON

JSON stands for JavaScript Object Notation
JSON is a lightweight format for storing and transporting data
JSON is often used when data is sent from a server to a web page
JSON is "self-describing" and easy to understand

Pro:
  • Simple syntax, which results in less "markup" overhead compared to XML.
  • Easy to use with JavaScript as the markup is a subset of JS object literal notation and has the same basic data types as JavaScript.
  • JSON Schema for description and datatype and structure validation
  • Json Path for extracting information in deeply nested structures
Con:
  • Simple syntax, only a handful of different data types are supported.
  • No support for comments.

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

•HTML
•CSS
•Hypertext Transfer Protocol (HTTP)
•XML



 






 


 


  

Comments

Popular posts from this blog

jQuery

Introduction to client-side development