def resolve_ref(ref: str) -> Path: if ref.startswith("path:"): return ROOT / ref[5:] raise HTTPException(400, "Only path: references supported")
| Operation | CS3 Raw (HTTP) | CS3 full (gRPC+metadata) | Improvement | |-----------|----------------|--------------------------|-------------| | Stat (1000 files) | 210 ms | 890 ms | 4.2x faster | | Write 1 MB | 12 ms | 31 ms | 2.6x faster | | Read 1 MB | 10 ms | 28 ms | 2.8x faster | | List (500 entries) | 85 ms | 312 ms | 3.7x faster | cs3 raw
@app.delete("/data") def delete(ref: str): path = resolve_ref(ref) if path.is_dir(): path.rmdir() else: path.unlink() return Response(status_code=204) # Upload curl -X PUT -H "Authorization: Bearer $TOKEN" \ --data-binary @file.dat \ "https://storage/cs3/raw/v1/data?ref=path:/backups/file.dat" Download curl -H "Authorization: Bearer $TOKEN" "https://storage/cs3/raw/v1/data?ref=path:/backups/file.dat" -o file.dat Stat curl -H "Authorization: Bearer $TOKEN" "https://storage/cs3/raw/v1/stat?ref=path:/backups/file.dat" 6. Performance Benchmarks Test environment: 2 vCPU, 4GB RAM, NVMe local disk, 1 Gbps network. def resolve_ref(ref: str) -> Path: if ref
When using CS3 Raw, please reference this paper and the original CS3 API documentation from CERN/CS3APIs v1.2+. def resolve_ref(ref: str) ->