Posts

Showing posts from December, 2022

NODE LOOK UP IN PEER-TO-PEER NETWORK

NODE LOOK UP IN PEER-TO-PEER NETWORK P2P: Large connection of computers, without central control where typically each node has some information of interest. No central control for routing No central data repository Has several legitimate uses !! So two basic questions: How to make data at each node available ? How to find required information ? Both question are of course interrelated, but we will look at them seperately. ASSUMPTION We assume that each record (data to be shared) can be identified by a ASCII string such as the filename. Over the past 3-4 years there has been several proposals for P2P architectures, we will look at Chord. Uses a hash function such as SHA-1. SHA-1 converts a variable length input into a highly random 160 bit value BASIC OF CHORD Using SHA-1 Chord hashes, node IP addresses   node identifiers (160 bits) names of records keys (160 bits) STORING RECORD Conceptually the 2^160 nodes are arranged into a circle increasing clockwise. For example, for...

NORMALIZATION

Image
  Normalization A large database defined as a single relation may result in data duplication. This repetition of data may result in: Making relations very large. It isn't easy to maintain and update data as it would involve searching many records in relation. Wastage and poor utilization of disk space and resources. The likelihood of errors and inconsistencies increases. So to handle these problems, we should analyze and decompose the relations with redundant data into smaller, simpler, and well-structured relations that are satisfy desirable properties. Normalization is a process of decomposing the relations into relations with fewer attributes. What is Normalization? Normalization is the process of organizing the data in the database. Normalization is used to minimize the redundancy from a relation or set of relations. It is also used to eliminate undesirable characteristics like Insertion, Update, and Deletion Anomalies. Normalization divides the larger table into smaller and li...

SYNCHRONIZATION

  Synchronization in Java Synchronization in Java is the capability to control the access of multiple threads to any shared resource. Java Synchronization is better option where we want to allow only one thread to access the shared resource. The synchronization is mainly used to To prevent thread interference To prevent consistency problem. Types of Synchronization There are two types of synchronization Process Synchronization Thread Synchronization Thread Synchronization There are two types of thread synchronization mutual exclusive and inter-thread communication. Mutual Exclusive Synchronized method. Synchronized block. Static synchronization. Cooperation (Inter-thread communication in java) Mutual Exclusive Mutual Exclusive helps keep threads from interfering with one another while sharing data. It can be achieved by using the following three ways: By Using Synchronized Method By Using Synchronized Block By Using Static Synchronization Concept of Lock in Java Synchronization is ...