Skip to content

System architecture

Oleksiy edited this page Oct 5, 2018 · 5 revisions

The argument-search-engine consists from three different parts:

  • Frontend
  • Backend
  • Search Index
  • Batch processing

Each module has its own functionalities and responsibilities.

Frontend

The frontend is a flask powered webserver to use the argument-search-engine with a common webbrowser.

Backend

The backend contains the logic for classification and generating the annotated results. It can be also accessed with a REST-API. The backend works in dependence with BiLSTM-CNN-CRF Implementation for Sequence Tagging, which need to be installed first. The Swagger interfaces enables to test the classification and documents how to use it.

If you want to run the backend behind a reverse proxy in a directory path, there are additional steps necessary.

Run behind reverse proxy:

The current code is default set to run at port 6000 behind a reverseproxy like nginx or apache2 on in a subdirectory /subdir. You need to add this to your webserver configuration:

nginx:

location /subdir/ {
    proxy_pass http://localhost:6000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Script-Name /subdir;
}

apache2:

<Location /subdir>
    Header add X-Script-Name "/subdir"
    RequestHeader set X-Script-Name "/subdir"

    ProxyPass http://localhost:6000
    ProxyPassReverse http://localhost:6000
</Location>

Batch processing (Argument Labeling)

Data is being parsed and labeled by applying the model in a parallel way.

Batch processing (ES Index)

Data produced by Batch processing(Argument Labeling) is being parsed and saved to the ES index.