Skip to content

Using the Legacy Wrapper

Ken Chatfield edited this page Feb 4, 2015 · 1 revision

A legacy wrapper for the old Visor backend API used by the kencoken/visor repository is provided at pyclient/visor_legacy_wrap.py.

A working system using the wrapper (including web frontend) can be set up as follows:

Part 1: Preparing the legacy frontend

  1. Clone the old frontend repo kencoken/visor

  2. Checkout the bbc-demo branch

  3. Initialise submodules:

    $ git submodule init
    $ git submodule update --recursive
    
  4. The backend code can be removed rm -r backend/

  5. Prepare frontend configuration files by following the instructions in the repo README – make a note of the backend port ([visor]->backend_port) and the imsearchtool service port ([imsearchtools]->service_port) specified in site.cfg and change these ports so that your service uses unique ports on the system and does not interfere with existing server instances

  6. Run the imsearchtools service located in frontend/src/libs/imsearch-tools/ ensuring the service port is the same as specified in site.cfg

  7. Run the frontend server frontend/server.py

Part 2: Launching a legacy backend instance (via the wrapper)

  1. Ensure the ports specified for server_config->server_endpoint and server_config->notify_endpoint in config.prototxt are not left at the defaults, but modified and unique to avoid interference with other server instances

  2. Set server_config->page_size to around 1000, adding the value if it does not exist (or however many images you wish to be returned from the backend)

  3. Compile cpuvisor-srv as usual, and complete pre-processing using bin/cpuvisor_preproc (or bin/cpuvisor_preproc_sge in a cluster environment)

  4. Open legacy_serve.py and set SERVE_PORT to match the backend service port specified in site.cfg in Part 1

  5. Run the legacy wrapper service legacy_serve.py

  6. Run the cpuvisor backend service bin/cpuvisor_service

Clone this wiki locally