IRPCTest.DownloadTestFile_Begin

View as Markdown

Vault API / standard read session idempotent returns metadata structure version

Creates a file of random bytes on the server and opens a download session for it, for measuring download throughput.

ServiceConnection and health checks MFiles.IRPCTest
gRPC method/MFiles.IRPCTest/DownloadTestFile_Begin
HTTP (mf-http-grpc)POST /grpc/v1/download-test-file_-begin
RequestDownloadTestFile_BeginRequest
ResponseDownloadTestFile_BeginResponse
Book and levelVault API, standard
Kindread
SessionRequired: the session ID from LogIn in the mfiles-session-id-bin metadata.
Idempotentyes
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Needs a vault session. Without a session the call fails with UNAUTHENTICATED; a server-level session fails with E_MFILES_LOGIN_REQUIRED. file_size must be from 0 to 52428800 (50 MiB); other values fail with E_INVALIDARG ("The parameter is incorrect.").

The server writes file_size random bytes to a temporary file of the vault; the content differs on every call and does not compress. Read it like any other download:

  1. Call this method and keep download_id.
  2. Read the blocks with DownloadFile_ReadBlock, at most 4 MiB per call, and time those calls. Creating the file is part of this method, not of the reads (on a local server, DownloadTestFile_Begin for 50 MiB took about 200 ms).
  3. Close the session with DownloadFile_Stop. When the file was read in order and the last read returned fewer bytes than requested, the server has already closed the session; DownloadFile_Stop still succeeds.

The response carries only download_id.

Request: DownloadTestFile_BeginRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
file_sizeint64The size of the test file in bytes, 0 to 52428800 (50 MiB).

Response: DownloadTestFile_BeginResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
download_idint32The download session for DownloadFile_ReadBlock and DownloadFile_Stop. Valid only with the session that started it.