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 sampledomains.txt
: Categorized domains present in the sampledump.rdb
: A dump of our sample databases
scripts/
:build.sh
: Build thedocker
imagesredis.sh
: Run adocker
container ofredis
using the provided sample databaseclient.sh
: Run the sample code in adocker
container using theredis
database
docker/
: Contain the necessary files for building thedocker
images.src/
:go
Source 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)
Run
./scripts/build.sh
: it builds theolfeo-redis
andolfeo-client
docker images.Run
./scripts/redis.sh
: it launches the redis container of theolfeo-redis
imageThis 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 betweenolfeo-redis
andolfeo-client
containersCheck 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