Skip to main content

Olfeo OEM documentation

Getting started

Get the SDK

Your sales contact will provide you with a download link of an archive containing the SDK and the database sample.

The archive file should contain the following folders and files:

  • samples/ :

    • applications.txt: Categorized applications present in the sample

    • domains.txt: Categorized domains present in the sample

    • dump.rdb: A dump of our sample databases

  • scripts/:

    • build.sh: Build thedockerimages

    • redis.sh: Run adockercontainer ofredisusing the provided sample database

    • client.sh: Run the sample code in adockercontainer using theredisdatabase

  • docker/: Contain the necessary files for building thedockerimages.

  • src/:goSource files for the SDK and the sample code

Launching the SDK

Extract the contents of the archive into a new directory and follow the steps below from that directory (see expected outputs below)

  1. Run ./scripts/build.sh : it builds the olfeo-redis and olfeo-client docker images.

  2. Run ./scripts/redis.sh : it launches the redis container of the olfeo-redis image

    This image uses the dump.rdb file to initialize the redis database so that it can be used by the SDK.

    This database only contains information about the domains and applications listed in the files ./samples/applications.txt and ./sample/domains.txt

    The script will create and destroy a docker network olfeo_network to allow communications between olfeo-redis and olfeo-client containers

  3. Check if it all is good by running ./scripts/client.sh [<domain>; ...] : you should get categorization data for all domains in the request.

$ ./scripts/build.sh
[+] Building ...
...
$ ./scripts/redis.sh &
...
1:C 04 Jun 2024 11:57:20.588 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 04 Jun 2024 11:57:20.588 * Configuration loaded
1:M 04 Jun 2024 11:57:20.588 * monotonic clock: POSIX clock_gettime
1:M 04 Jun 2024 11:57:20.589 * Running mode=standalone, port=6379.
1:M 04 Jun 2024 11:57:20.590 * Server initialized
1:M 04 Jun 2024 11:57:20.590 * Loading RDB produced by version 7.2.1
1:M 04 Jun 2024 11:57:20.590 * RDB age 1812106 seconds
1:M 04 Jun 2024 11:57:20.590 * RDB memory usage when created 6.48 Mb
1:M 04 Jun 2024 11:57:20.608 * Done loading RDB, keys loaded: 34792, keys expired: 0.
1:M 04 Jun 2024 11:57:20.608 * DB loaded from disk: 0.018 seconds
1:M 04 Jun 2024 11:57:20.608 * Ready to accept connections tcp
$ ./scripts/client.sh dropbox.com
Using rdb categorizer from redis://olfeo-redis:
dropbox.com: (15181) Online Data Storage
dropbox.com: application (27) Dropbox
application category: (10005) Online Software providing cloud back-ups and data storage infrastructur