Code Monkey home page Code Monkey logo

tij-crawler's Introduction

tij-crawler

Flag of Great Britain Original requirements

The task is to write an online robot that browses resources within a given domain (reasonably large, at least 3000 subpages) belonging to a foreign university and saves copies of documents on the disk and analyzes the graph of connections between them (vertex = page or resource (file), arch = link from one page (resource) to another page (resource)).

To obtain max.20 points, you must complete all of the following tasks:

  • GUI interface,
  • implementation of network communication and I/O operations in a synchronous (blocking) model,
  • using a built-in pool of threads to carry out the multithreaded downloading (and saving) of documents,
  • adherence to the Robots Exclusion Protocol restrictions,
  • analysis of the graph of connections between documents: number of vertices and arcs, distribution of incoming and outgoing steps.

To obtain the next 10 points, you MUST accomplish all of the following elements of the task:

  • implementation of own thread pool for execution of multithreaded downloading (and saving) documents,
  • graph analysis of connections between documents: number of consistency components, average length of the shortest path between vertices (in each SCC), diameter of each graph consistency component.

To obtain the next 10 points, you MUST accomplish all of the following elements of the task:

  • implementation of network communication and I/O operations in an asynchronous (non-blocking) model.

As part of this task, it is MANDATORY to create a report in which the following elements should be included:

  • detailed description of the concept at the LOGICAL level (architecture + workflow) of implemented solutions (note: do not describe classes or class diagrams!),
  • documenting the implementation of individual elements of the task,
  • test results, including measured times of individual stages of application operations for different number of threads (1,2,4,8,16,32) for implemented communication models (synchronous and asynchronous).

Flag of Poland Original requirements

Zadanie polega na napisaniu robota internetowego, który przegląda zasoby w obrębie podanej (rozsądnie dużej, min. 3000 podstron) domeny należącej do zagranicznej uczelni i zapisuje na dysku kopie dokumentów oraz analizuje graf połączeń między nimi (wierzchołek=strona lub zasób (plik), łuk=link z jednej strony (zasobu) do innej strony (zasobu)).

Do uzyskania max.20 punktów NALEŻY zrealizować wszystkie poniższe elementy zadania:

  • interfejs GUI,
  • realizacja komunikacji sieciowej oraz operacji I/O w modelu synchronicznym (blokującym),
  • skorzystanie z gotowej puli wątków w celu realizacji ściągania (i zapisywania) wielowątkowego dokumentów,
  • przestrzeganie ograniczeń Robots Exclusion Protocol,
  • analiza grafu połączeń między dokumentami: liczba wierzchołków i łuków, rozkład stopni wchodzących i wychodzących.

Do uzyskania kolejnych 10 punktów NALEŻY zrealizować wszystkie poniższe elementy zadania:

  • implementacja własnej puli wątków w celu realizacji ściągania (i zapisywania) wielowątkowego dokumentów,
  • analiza grafu połączeń między dokumentami: liczba składowych spójności, średnia długość najkrótszej ścieżki pomiędzy wierzchołkami (w każdej składowej spójności), średnica każdej składowej spójności grafu.

Do uzyskania kolejnych 10 punktów NALEŻY zrealizować wszystkie poniższe elementy zadania:

  • realizacja komunikacji sieciowej oraz operacji I/O w modelu asynchronicznym (nieblokującym).

W ramach tego zadania należy OBOWIĄZKOWO zrealizować sprawozdanie, w którym NALEŻY zawrzeć następujące elementy:

  • szczegółowy opis koncepcji na poziomie LOGICZNYM (architektura + workflow) zrealizowanych rozwiązań (uwaga: nie opisywać klas ani diagramów klas!),
  • udokumentowanie realizacji poszczególnych elementów zadania,
  • wyniki testów, w tym zmierzone czasy poszczególnych etapów działania aplikacji dla różnej liczby wątków (1,2,4,8,16,32) dla zaimplementowanych modeli komunikacji (synchroniczne oraz asynchroniczne).

Areas for improvement

  • Using GUI described in Java was a terrible idea - defining it in an XML document would be much cleaner
  • Custom logger was a bad idea (poor API)
  • Custom thread pool is a joke and could be improved (especially awaiting the execution and mixing Futures/Callables/Tasks)
  • Default thread pool is broken (but was way slower than the custom one anyway)
  • Graph analysis based on streams is a mental masturbation and should be changed to something maintanable
  • Robots exclusion protocol code is never called and is only there to get all the points for the assignment
  • After the requirements changed, the code was heavily modified but not refactored (and it should be)
  • IIRC some exceptions were silenced

tij-crawler's People

Contributors

drauf avatar

Watchers

 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.