Random Server Picker
Select server record IDs from a caller-supplied normalized dataset while preserving dataset and source provenance.
Description
Select server record IDs from your candidate list while returning its dataset and source labels.
A server catalog can identify systems by model or configuration, separating record identity from fields such as processor, chassis, and deployment role. This picker selects only from candidate IDs you provide, making a curated source catalog essential.
Provenance can record origins and context of data.1
Here datasetId, datasetVersion, and sourceId are caller-supplied labels copied into the result, not verified lineage or a complete provenance record.
Provide the server catalog and unique candidate IDs yourself. The returned selectedIds are references, not complete records; the tool performs no external lookup. Sampling defaults to without replacement within one run.
When to use Random Server Picker
Use it for server inventory mockups or randomized catalog fixtures when an explicit source dataset and eligible candidate list are available.
How to use Random Server Picker and understand its results
- Enter 1–1,000 unique nonblank candidateIds and nonblank datasetId, datasetVersion, and sourceId. Resolve the IDs against your own catalog.
- Enter selectionCount from 1 through 1,000. Leave withReplacement false to select distinct IDs, with count no greater than the candidate list; set it true to allow repeated draws.
- Run the picker and read selectedIds with the returned dataset and source labels. Retrieve record details from that same dataset version separately.
with replacement: index = floor(randomDraw × candidate count) Each draw samples the complete candidate list, so the same ID can recur within a result.
Without replacement, the implementation copies the candidate list and performs a partial Fisher–Yates shuffle: on draw d, choose a position from d through the final index, swap it into position d, and emit that ID. With independent uniform draws, remaining candidates are equally likely; the input list is not mutated.
ID equality is exact string equality. Blankness is checked after trimming, but accepted IDs and metadata are returned as supplied rather than trimmed or normalized.
{
"input": {
"candidateIds": [
"candidate-a",
"candidate-b",
"candidate-c"
],
"datasetId": "example/server",
"datasetVersion": "1",
"selectionCount": 2,
"sourceId": "example",
"withReplacement": false
},
"randomDraw": 0.25,
"output": {
"datasetId": "example/server",
"datasetVersion": "1",
"selectedIds": [
"candidate-a",
"candidate-b"
],
"sourceId": "example"
}
} One candidate can be drawn repeatedly when replacement is enabled. Without replacement, requesting more selections than candidates is rejected. Duplicate IDs, empty lists, blank labels, and invalid random draws also fail. Duplicates may recur across separate runs.
Limitations and assumptions
The default source is Math.random; no seed input or cryptographic entropy guarantee is provided. Repeated runs may select the same result, and the distribution depends on the random source.
It does not provision servers, discover network hosts, recommend infrastructure, or verify capacity and compatibility.
The generator does not validate record existence, source authority, dataset version availability, category membership, or coverage. Equal selection probability over supplied IDs is not a representative sample of a market or population.
Alternative or Complementary methods
Prepare filters and normalized records before selection, then retrieve details after it. General catalog selectors use the same selection concept for a broader domain; a bounded integer generator can support a simple index exercise without preserving catalog labels.
References
-
PROV-Overview: An Overview of the PROV Family of Documents — World Wide Web Consortium
Similar or alternative tools
- General Catalog Picker
Select IDs from a caller-prepared catalog using explicit dataset and source labels.
- Random Number Generator
Generate a bounded integer when only a numeric choice is needed.