Skip to content

Vishwanath2001/Pdc-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

Pdc-project

Distributed java file search engine as part of project for college

I am using zookeeper 3.4.12 version for this and JAVA 17 under maven project

project working demo

First start the zookeeper server

image

run the front end jar now run the cluster and slave node jar file with 4 instances for 3 slaves and 1 master

image

Whichever registers first will become the master

image

Here left most instance marked is the leader And top right is watching the leader and bottom left is watching top right And bottom right is watching bottom left as shown in Image. Here leader is keeping service registry which contain address of slaves To make system fault tolerant Now if we open frontend web browser search engine

image

Now we can give any term and search engine will give us the best result by calculating tf-idf algorithm. Suppose I give the term “monster” it should give us books from it’s database related to that term.

image

And below is the image how work was distributed

image

The top left was the leader and it distributed the work among 3 slaves by dividing the 18 files from database evenly for each slave. Now suppose any slave gets disconnected It should be updated to master registry

image

In the above Image bottom right node was terminated and it’s address was removed from registry which we can see in top left marked image And now the search engine should be working fine but the documents will be dived among 2 nodes

image

image

Now in the nodes work was divided only across two nodes Now suppose if leader itself gets terminated ,new leader will be elected

image

As we can see leader is terminated and top right was elected as leader and it has service registry Now there is only one slave all the documents has to be searched by only 1 slave

image

Now only bottom left was the only slave remaining .Hence it received all the 18 documents from database. And also user can read whichever book they want to read from clicking on the name in front end page

image

About

Distributed java file search engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published