- Clone the Repository (if you haven't already)
git clone https://github.com/A-karimKati/ObliSQL.git cd ObliSQL - All dependencies installed (Docker, Go 1.23+, Thrift 0.22.0, Redis 8.0+, Ansible)
CRITICAL: ObliSQL requires tracefiles that are not in the GitHub repository.
1. Download tracefiles from: https://vault.cs.uwaterloo.ca/s/9CqsQTbsZdn832B
2. Extract the downloaded file to /tmp/oblisql_tracefiles
mkdir -p /tmp/oblisql_tracefiles
tar -xvf OasisDB_DBFiles.tar -C /tmp/oblisql_tracefiles/
cd /tmp/oblisql_tracefiles/OasisDB_DBFiles
unzip Waffle.zip
unzip ORAMFiles.zip3. Organize tracefiles according to repository structure
cd ObliSQL dir
mkdir -p ~/ObliSQL/waffle/tracefiles
cp -r /tmp/oblisql_tracefiles/OasisDB_DBFiles/DBTraceFiles/* ~/ObliSQL/waffle/tracefiles/
mkdir -p ~/ObliSQL/cmd/oramExecutor
cp -r /tmp/oblisql_tracefiles/OasisDB_DBFiles/Maps/* ~/ObliSQL/cmd/oramExecutor/
mkdir -p /tmp/oblisql_redis_snapshots
cp -r /tmp/oblisql_tracefiles/OasisDB_DBFiles/EpinionsSnapshots /tmp/oblisql_redis_snapshots/
cp -r /tmp/oblisql_tracefiles/OasisDB_DBFiles/snapshot_only_rankings /tmp/oblisql_redis_snapshots/
# Verify key files are in place
ls -la ~/ObliSQL/waffle/tracefiles/serverInput.txt
ls -la ~/ObliSQL/cmd/oramExecutor/- Build and Run the image
docker build -t oblisql-complete .
docker run -it --network host --cap-add=NET_ADMIN oblisql-complete cd /app
go test ./pkg/benchmark/queries_test.go
go test ./pkg/executorPlaintext/executorPlaintext_test.go
go test ./pkg/oramExecutor/oram_test.go1. Start Redis:
redis-server --daemonize yes
redis-cli ping # Should return PONG2. Start Waffle Proxy Server:
cd /app/waffle
./bin/proxy_server -l ./tracefiles/serverInput.txt -b 3000 -r 2000 -f 170 -d 2000 -c 2 -n 4 -h 127.0.0.1 -p 6379 &Wait for (takes ~25 seconds):
Successfully initialized waffle with keys size 6095882
Initialized Waffle
Proxy server is reachable
Thrift: TNonblockingServer: IO thread #0 entering loop...
3. Start BatchManager:
cd /app/cmd
./batchManager/batchManager -p 9500 -R 2000 -Z 500 -num 1 -T Waffle -X 2 -hosts 127.0.0.1 -ports 9090 &Wait for:
"Connected to Executors!"
"Launching Central Coordinator with timeOut: 500"
4. Start Resolver (for testing use port 9900):
cd /app/cmd/resolver
./resolver -p 9900 -bh 127.0.0.1 -bp 9500 &Wait for:
"Resolver Connected!"
"Connected to load balancer at 127.0.0.1:9500"
cd /app
go test ./pkg/resolver/resolver_test.goExpected output:
ok command-line-arguments 25.536s
Follow the same steps as testing above, but start resolver on port 9600:
1-3. Same as testing steps 1-3
4. Start Resolver (for benchmarks use port 9600):
cd /app/cmd/resolver
./resolver -p 9600 -bh 127.0.0.1 -bp 9500 &jobsShould show:
[1] Running ./bin/proxy_server ... (wd: /app/waffle)
[2] Running ./batchManager/batchManager ... (wd: /app/cmd)
[3] Running ./resolver ... (wd: /app/cmd/resolver)
cd /app/pkg/benchmark
../../cmd/benchmark/benchmark -h 127.0.0.1 -p 9600 -s 1000 -t 30 -q scalingJoin Query Benchmark:
../../cmd/benchmark/benchmark -h 127.0.0.1 -p 9600 -s 1000 -t 30 -jr 1Range Query Benchmark:
../../cmd/benchmark/benchmark -h 127.0.0.1 -p 9600 -s 1000 -t 30 -jr 2 -rs 10Different Concurrent Request Loads:
# Light load
../../cmd/benchmark/benchmark -h 127.0.0.1 -p 9600 -s 500 -t 30 -q scaling
# Medium load
../../cmd/benchmark/benchmark -h 127.0.0.1 -p 9600 -s 1000 -t 30 -q scaling
# Heavy load
../../cmd/benchmark/benchmark -h 127.0.0.1 -p 9600 -s 2000 -t 30 -q scaling| Component | Testing Port | Benchmark Port | Notes |
|---|---|---|---|
| Resolver | 9900 | 9600 | Tests expect 9900, benchmarks expect 9600 |
| BatchManager | 9500 | 9500 | Same for both |
| Proxy Server | 9090 | 9090 | Same for both |
# Successful test output:
ok command-line-arguments 25.536s# Successful benchmark includes:
Client Connected!
Connected to Resolver 127.0.0.1:9600
Query Type: scaling
[Performance metrics and statistics]If you need to restart everything:
# 1. Kill all background jobs
kill %1 %2 %3 2>/dev/null || true
# 2. Check nothing is running
jobs
# 3. Restart Redis if needed
redis-server --daemonize yes
# 4. Follow steps 2-4 from either testing or benchmark sections-h 127.0.0.1- Resolver host address-p 9600- Resolver port (9900 for tests, 9600 for benchmarks)-s 1000- Number of in-flight (concurrent) requests-t 30- Benchmark duration in seconds-q scaling- Query type (scaling, select, etc.)-jr 1- Join query type (1=Join, 2=Range)-rs 10- Range size for range queries
If services fail to start:
- Check that Redis is running:
redis-cli ping - Wait for each service to fully initialize before starting the next
- Verify ports aren't in use:
netstat -tlnp | grep -E '(6379|9090|9500|9600|9900)'
If tests/benchmarks fail:
- Ensure all 3 services are running:
jobs - Check you're using the correct resolver port (9900 for tests, 9600 for benchmarks)
- For benchmarks, ensure you're in
/app/pkg/benchmarkdirectory - Restart services if timeouts occur
- Proxy server initialization takes ~25 seconds (loading 6M+ keys)
- BatchManager may timeout if idle - restart if needed
- Test results depend on system resources and Docker configuration
- Use different
-svalues to test various load levels