Saturday, July 11, 2020

Explain Architectural styles ?

there are four different architectural styles plus the hybrid architecture when it comes to distribute system the basic idea is to organised logical different components and distribute those computers over the various machines.

  • layered architecture
  •  object based architecture
  •  data centre architecture
  •  event based architecture
  •  hybrid architecture.
Layered architecture

Layered architecture separates layers of components from each other, giving it it a much more modular approach. a well-known example for this is the model that incorporates a layered architecture when interacting with each of the components, each interaction is sequential where a layer will contact the adjacent clear and this process continues until the request is being connected to but in certain cases the implementation can be made so that some layers will be skipped which is called cross-layer coordination through crosslay coordination one can obtain better result due to performance increase the layers on the bottom provide a service to the layers on the stop the request flows from top to bottom where as the response is sent from bottom to top the advantage of using this approach is that the calls always follow in predefined path and that each layer can be easily replaced or modified without affecting the entire architecture the following image is the basic idea of layered architecture style.

                                 


                                


Object-based architectures

this architecture style is based on loosely coupled arrangement of objects this has no specific architecture like players like in layers this does not have a sequential set of steps that needs to be carried out for a given call each of the components are referred to as a object where each object can interact with other objects through a given connector or interface there are much more direct where all the different components can interact directly with other components through a direct method call

as shown in the above image communication between object happen as a method invocation these are generally called remote procedure called RPC some popular examples are Java  RMI web services and rest API calls.

                         



This has the following properties

  • this architecture style is less structured
  •  component equals to object
  •  connector equals RPC or RMI


Data centred architecture

as the title suggests this architecture is based on a data centre where the primary communications happens viva us Central data respiratory this common repository can be either active or passive this is more likely a producer consumer problem the producer producer items to a common data store and the consumers can request Tata from it this common repository could even be a simple database but the idea is that the communication between the objects happening through this shared storage this is support different components by providing a persistent storage space for those components such as my SQL database all the information related to the nodes in the system are stored in this system storage in event based architecture access data is only sent and received by those components who have already subscribed.


                          





Event based architecture

the entire communication in this kind of a system happens through events when an event is generated it will be sent to the bus system with this everyone else will be notified telling that such an event has accused so if anyone is interested that node can pull the event from the bus and use it sometimes this event could be data or even a URL to resources

this event occasionally carry data and advantage in this architectural style is that components are loosely coupled so it is easy to add remove and modified components in the system.

this architectural style is based on the publisher subscriber architecture between its not there is no direct communication or coordination.

      



 this event architecture supports several communication styles
  •  publisher subscriber
  •  broadcast
  •  point to point

 the major advantage of this architecture is that the components are decoupled in space loosely coupled.

What is the role of middleware in distributed system?

middleware is basically the software that connects software components for enterprise applications it is a software there lies between operating system and the applications on each side of distributed system network. 


      Chapter 1


middleware is the software which is designed to act as a communication bridge between distributed application and the platforms the diagram shows that middleware sits between distributed applications and OS which is the platforms of different users the distributed application is only the components of which end users have interaction the middle where has the role to handle heterogeneous environment of distributed system.

  • Hides the intricacies of distributed applications
  • Hides the heterogeneity of hardware, operating systems and protocols
  • Provides uniform and high-level interfaces used to make interoperable, reusable and portable applications
  • Provides a set of common services that minimizes duplication of efforts and enhances collaboration between applications

Middleware is similar to an operating system because it can support other application programs, provide controlled interaction, prevent interference between computations and facilitate interaction between computations on different computers via network communication services.

A typical operating system provides an application programming interface (API) for programs to utilize underlying hardware features. Middleware, however, provides an API for utilizing underlying operating system features.

Describe the cluster computing system?

cluster computing is a form of computing in which bunch of computers that are connected through a LAN's so that they behave like a single machine cluster computing system help to solve complex operations more efficiently with a much faster processing speed better a data integrity than a single computer cluster computing is used for parallel programming in which a single program is run in a parallel on a multiple machines.

An example of cluster computing system is

Distributed Computing Systems CSCI 4780/6780. Distributed System A ...


each cluster  consists of a collection of computer nodes that are controlled and access by the means of single master note the master node actually runs a middleware needed for execution of programs and management of the cluster while the computing notes need only standard operating system.

Advantages of Cluster Computing

There are numerous advantages of implementing cluster computing in the applications. Few of them to be discussed are as follows:

Cost efficacy – Even mainframe computers seems to be extremely stable, cluster computing is more in implementation because of their cost-effectiveness and economical. Also, these systems provide enhanced performance than that of mainframe computer networks.

Processing speed – The cluster computing systems offer the same processing speed as that of mainframe computers and the speed is also equal to supercomputers.

Extended resource availability – Computers come across frequent breakdowns, so to eliminate this failure, cluster computers are available with high availability. So, when one node gets failed, the other nodes will be active and will function as a proxy for the failed node. This makes sure for enhanced availability.

Expandability – The next crucial advantage of this cluster computing is its enhanced scalability and expandability. As they instantiate the prospect to combine multiple additional resources or the networks to the prevailing computer system.

Flexibility – Cluster computing can be upgraded to the superior specification or extended through the addition of additional nodes (computer systems).

Applications

  • Cluster computing can be implemented in weather modeling
  • Stands as support in-vehicle breakdown and nuclear simulations
  • Used in image processing and in electromagnetics too
  • Perfect to be used in the applications of astrophysics, aerodynamics and in data mining
  • Assist to solve complex computational problems
  • Holds the flexibility to allocate workload as small data portions and which is called grid computing.
  • Cluster computing has the capacity to function in many web applications such as Security, Search Engines, Database servers, web servers, proxy, and email.
  • There are life savior applications through this approach like they can forecast the occurrence of earthquakes or tornadoes.

Differentiate between multithreading and multiprocessing ?

Multithreading
1. It creates multiple threads of a single process to increase CPU utilisation.
2. Multiple threads are executed concurrently.
3. Threads shares a memory space.
4. Multithreading not classified in any categories.
5. In multithreading process creation is according to economical.

Multi-processing
1.it adds cpu's to increase computing power.
2. multiple process are executed concurrently.
3. process don't share memory space.
4. multiprocessing are classified into symmetric and asymmetric.
5.in multithreading process creation is time consuming process.


    Java Multithreading Tutorials | Multithreading Programs in Java ...

Explain Grid Computing System?

Explain the Grid Computing System?


Grid computing is a processor architecture that combines computer resources from various domains to reach the main objective. in grid computing the computers on the network can work on a task together does functioning as a supercomputer.

typically a grid works on various tasks within a network but it also capable of working on specialized applications it is designed to solve problems that are too big for a supercomputer.


the architecture of the grid computing system is shown in the following diagram.




  • Fabric layer:-  this layer is the lowest layer which provides the interfaces to the local resources at a specific site it will provide functions for querying the state and capability of resources along with the functions for actual resource management.

  • connectivity layer:- this layer consist of communication protocols for supporting grid transactions. communication protocols enable the exchange of data between the fabric layer resources. authentication protocols build on a communication service to provide the cryptographical secure mechanism.

  • resource layer is responsible for managing a single resource it uses of functions provided by the connectivity layer and calls directly the interface made available by the fabric layer. 

  • collective layer:- it deals with having access to multiple resources and typically consists of a services and resources discovery allocation and scheduling of tasks onto multiple resources.

  •  Application layer:- it consists of an application that operates within a virtual organization and which makes use of a grid computing environment.

                 Grid computing ppt

Discuss Distributed System? Brief

Discuss Distributed System? Brief


  • Definition of Distributed system.
  • goals of Distributed system.
  • Advantages of Distributed system.
  • Disadvantages of Distributed system.

     Definition of Distributed system:-


        A Distributed system is a network that consists of autonomous computers that are connected   using a distribution middle-ware, they help in sharing different resources, and capabilities to               provide user with a single and integrated coherent network.


    Some Key features of distributed system 

           

  1. components in the system are concurrent. A distributed system allows resources sharing including software by systems connected to the network at the same time.                                   
  2. there can be multiple components, but they will be  generally in autonomous in nature.                                                                              
  3. a global clock is not required in the distributed system the system can be spread across different geographies.                                       
  4. compared to other networks models there are greater fault tolerance in a distributed model                                                      
  5. price and performance is much better.

    Goals of Distributed System:-



  1. Transparency:- achieving the image of a single system without concealing the details of the location access, migration, concurrency, failure, relocation and resources to the user.               
  2. Openness:- making the network easier to configure and modify.                                                                                          
  3. Reliability:- compared to single system a distributed system should be highly capable of being secure consistent and have a high capability of making errors.                                                            
  4. Performance:- as compared to other models, distribution models are expected to give a much wanted boost to performance.                                                                                         
  5. Scalability:- distributed system should be scalable with respect to geography, administrator or size. a system can be scalable with respect to size meaning that we can easily add more users and the resources to the system. 
       * geographically scalable system is one in which the users and resources may lie for apart.
       * A system can be administrative saclable meaning that it can still be easy to manage even if it spans many independent administrative organizations.

  # Advantages of Distributed System:-



  1. all the nodes in the distributed are connected to each other so nodes can easily share data with other nodes.                                        
  2. more nodes can easily be added to the distributed system.                   
  3. failure of the nodes does not lead to the failure of entire distributed system.                                                                        
  4. resources like printers can be shared with multiple nodes.

   # Disadvantages of Distributed System:-




  1. it is difficult to provide adequate security in distributed system because the nodes as well as the connections need to be secured.                                                                                         
  2. some messages and data can be lost in the network while moving from one node to another.                                                 
  3. overloading may occur in the network if all the nodes of the distributed system try to send data at once.                                   
  4. the database connected to the distributed system is quite complicated and difficult to handle.       

         Distributed networking projects ideas in java dotnet |ieee 2017 ...



Explain concept of Transparency in Distributed system?


Ans:- Achieving the image of a single system without concealing the details of locations access, migration, concurrency, failure, replications, replications and resources to the user.

Different forms of Transparency in the distributed system:-

  1. Access transparency:- it deals with the hiding different data representation and the way that resources can be accessed to the user                                                                                                   
  2. Location transparency:- it refers to the fact that user cannot tell where a resource is physically located in the system location transparency can be achieving by assigning only logical names to resources.                                                                   
  3. Migration transparency:- in distributed system in which resources can be moved without affecting how those resources can be accessed are said to provide by migration transparency.                                                                                                                   
  4.  Relocation transparency:- in the situation in which resources can be relocated while they are being accessed without the user or the applications noticing anything in that relocation transparency is supported.                                                                                                                                                    
  5. Replications transparency:- in distributed system to achieve fault tolerance replicates of  resources are maintained. the replication transparency insurance that user cannot tell how many copies exist.                                                                                
  6. Concurrency transparency:- as in distributed system multiple user work concurrently the user sharing should happen automatically without the awareness of concurrent execution by multiple users.                                                                               
  7. Failure transparency:- it means that user does not noticed that resources fails to work properly and that system subsequently recovers form that failure without the user awareness. 

Wednesday, July 1, 2020

What is thread synchronisation ?

synchronisation in java is the capability to control the access of multiple threads to any shared resources.

          Java synchronisation is better option where we want to allow only one thread to access the shared resources.

        the synchronisation is mainly used to 
1. prevent thread  interference 
2. to prevent  consistency problem.

Types of synchronisation:-
there are two types of thread synchronisation mainly exclusive and the inter thread communication.

1. Mutual exclusive
mutual exclusive help keep threads from interfering with one another while sharing documents this can be done by 3 ways in Java.
 1. by synchronised method
 2. by synchronised block 
 3.by static synchronisation.

#Java synchronised method:-
if you declare any method as a synchronised it is known as synchronised method.