Coder Social home page Coder Social logo

spells-finder's Introduction

Spells-Finder

Website developed for class Distributed Databases (8INF803) at UQAC (QC, CA).

The main objective is to use the MapReduce algorithm on a database (containing spells) to filter them and find the right one.

Prerequisites

To be able to play with our application, you need to have both a MongoDB and a SQlite databases available. Those twos services are already included into the application dependencies, but you need to install in into your desktop to be able to work properly.

To Launch a mongodb database, you need to create severals folders and execute some commands. Good tutorials can be found online. Once you settup MongoDB, you can go the bin folder and enter in the Windows command line :

> mongod.exe

If you install it properly, you should be able to see the "Waiting for connections on port 27017" message at the end.


Debug Hint: If you want to check what's inside the MongoDB database, you only have to start another Windows command line and enter mongo to access the MongoDB shell. Afterward, a wide set of commands are available here to print data and execute queries.

Getting started

Once you have pull the project, you first have to launch the server. You have to open a Windows command line and enter the following command :

> node server.js

The server will be ready to receive clients requests. To do so, go to your favorite browser and visit localhost:8080 webpage.

Here is the list of webpages that this application has :

  • index.html : The main page that contains basic informations. Just a beautiful introduction of the subject.

  • choixBDD.html : A page that offers the possibility to crawl a given site to get spells informations. Right now, only the dxcontent website is available.

  • formulaire.html : Let the user enter information to find the spell that he needs. This final page takes care of getting inputs from the user, process it, and print the results.


Debug Hint: Don't forget to, sometimes, check the server console which will be printed inside the terminal. Right now, every time you refresh the webpage a new client request will be made to the server.

Right now, the server doesn't update himself when you made changes. You have to manually restart the server to take in account your changes in any scripts.

Map-Reduce

This application were made to learn the Map-Reduce algorithm and implements a small one. If you have no clue what's the Map-Reduce algorithm, you can take a look at this blog that describes exactly what we did to collect and filter spells.

SQLite

We also used a SQLite database to validate our algorithm. A brief introduction to our schema and further explanations are available in the .pdf attach to the root of the project. Feel free to take a look at it.

Documentation

If you still have questions about some aspects of this project, take a look at the .pdf. A quick tutorial is also available to make the application works properly.

Dependencies

The following list is all the node.js modules we installed to make our application works.

  • express : famous node.js framework that simplify development.
  • crawler : module used to crawl webpages. it works with a queue of requests.
  • socket.io : module used to allow communication between the client-side and the server-side. (mainly used to send spell information and events)
  • mongodb : MongoDB module used to execute the Map-Reduce algorithm.
  • sqlite3 : SQLite module used to validate the results obtained with the Map-Reduce approach.

Contributors

spells-finder's People

Contributors

florianvidal66 avatar graygzou avatar theo-le-donne avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.