01 / THE METHOD

From JSON to one small response.

RIDA keeps the useful part of a large collection addressable without turning every read into a download.

1
{"id": "3812""title": "…""price": 129}

Start with JSON records

Bring a folder of records with stable IDs and fields your application can ask for.

2
Data.rida store / CDNIndex.rida readerMap.json readerKey.rida private · if encrypted

Build the RIDA files

The data file holds values. The index and map help the reader find them. Encryption creates a separate key file.

3
ReaderID + field
HTTP Range
CDNData.rida

Ask for the needed range

The reader looks up the byte location and requests that slice from a server or CDN that supports ranges.

01 / Data

Values live in one data file.

RIDA stores record values in a compact file that can sit on ordinary object storage or a CDN.

02 / Reader

Index and map stay close to the app.

The reader uses the index to turn a known record and field into a byte range. The map preserves original record names.

03 / Transport

HTTP does the delivery.

No special server is required as long as the host supports byte-range requests and returns partial content.

A record becomes independently readable values

Consider a product record with a title, price, description and specifications. A list screen might need only its title and price. A detail screen might need the description later. The file can hold the complete collection while each screen asks for the fields it uses.

{
  "item-101": {
    "title": "Oak desk",
    "price": 129,
    "description": "A longer description of the desk...",
    "specifications": { "width_cm": 120, "material": "oak" }
  }
}

RIDA writes each top-level field value as compact UTF-8 JSON. With the default codec, each value gets its own raw deflate stream. An encrypted build seals that compressed stream with AES-256-GCM. Values sit consecutively in the data file; their boundaries are recorded in the separate index.

title          → JSON → deflate → optional encryption → value block
price          → JSON → deflate → optional encryption → value block
description    → JSON → deflate → optional encryption → value block
specifications → JSON → deflate → optional encryption → value block

The data file has no header to fetch first. The reader knows the codec and boundaries from its local index, so it can decode an individual block without downloading the preceding blocks.

The index supplies an address before the request

Your app supplies a record ID and field name. The reader locates the record’s catalog row, finds the field’s position and length, and turns those numbers into an HTTP byte range.

Illustrative stored fieldStart byteLengthRequested range
title8,10423 bytes8104–8126
description14,231143 bytes14231–14373

These addresses illustrate the calculation rather than a live dataset. For a start of 14,231 and length of 143, the inclusive end is 14,373. The app sends one range for the selected stored block.

GET /ItemsData.rida
Range: bytes=14231-14373

206 Partial Content
Content-Range: bytes 14231-14373/TOTAL_FILE_BYTES
Content-Length: 143

The body contains those 143 stored bytes. The reader decrypts them when needed, decompresses them when needed, parses their JSON and returns the original value. HTTP headers and network overhead are additional to the body; a 143-byte value does not mean the whole exchange uses exactly 143 bytes.

The four files have different jobs

The data holds values and is the file you serve. The index holds their addresses and decoding settings. The optional map associates folder names with numbered IDs. The optional key enables decryption. Your host does not need to understand the RIDA format to serve its byte ranges.

  1. Publisher: prepares JSON and builds a matching set of files.
  2. Storage or CDN: serves the data file through HTTPS byte ranges.
  3. Application: carries the index and, where needed, the map.
  4. Reader: finds the byte range locally, fetches the stored value and decodes it.

A numbered ID such as 1/1/5 identifies a position in a folder tree. The map lets your reader resolve a meaningful folder name to that position. The index, rather than the map, contains the byte addresses.

Opening a remote reader with its local index requires no network request. This assumes the app has already received the index; distributing that file to users still involves a download or bundling it with the application.

A reader stays open while the user browses

Open one reader for the dataset and reuse it for subsequent actions. A list view can request a summary, and selecting an item can request its description. The catalog is already open and the reader can reuse its HTTP connection.

import rida

with rida.RemoteRidaFile(
    "https://data.example.com/ItemsData.rida",
    index="ItemsIndex.rida",
) as data:
    summary = data.get_many("item-101", ["title", "price"])
    description = data.get("item-101", "description")
    whole_record = data.get_record("item-101")

get_many selects several fields from one record. It merges nearby stored blocks when the intervening bytes cost less than another response header. A large gap can produce separate requests. get_record retrieves all the record’s fields; it is useful when a screen genuinely needs the complete record.

Reusing the reader avoids repeatedly loading its catalog and starting a new connection. The timing depends on the user’s network, the host, the requested value’s size and local decoding work; a benchmark is not a guaranteed latency for every device.

Small reads depend on how you divide the JSON

RIDA’s smallest addressable piece is a complete stored field value. It works for large values too, but requesting a large value retrieves that entire block.

If specifications contains a 20 MB object, asking for that field returns all its contents. The reader does not jump straight to width_cm inside the object. If the app regularly needs width on its own, store width as a separate field. If users read a document by section, separate section records can make each section independently accessible.

Choose boundaries according to what the application requests. A tiny value per field can create more index entries, encryption overhead and HTTP requests. Selected fields that are usually needed together can be fetched with get_many. Large combined values are useful when the app always needs them together.

Hosting, caching and changing the dataset

RIDA chooses which bytes to request. The storage provider or CDN decides how it serves and caches those bytes. RIDA’s local index cache stores catalog information; it is separate from a CDN’s cache of the data file.

A CDN might cache the whole object, use its own slicing system or fetch from its origin. Its file-size limits, cache configuration and billing still apply. A small range read does not by itself guarantee a cache hit or free delivery.

When the source changes, rebuild and distribute the new index with the new data file. Byte addresses from one build should not be used against another. Versioned URLs let a reader use an explicitly matching version.

RIDA includes Python 2.0.2 and Node.js 2.0.1 readers for its static dataset format. It does not provide accounts, an upload service, subscriptions, full-text search or a browser JavaScript reader. The Build guide explains preparing files, and the Read guide covers local and remote lookups in detail.

REAL APPLICATIONS

A complete value. Only when you need it.

01 / PRODUCT CATALOGUE

One product. Only the description your customer needs.

Your product catalogue can contain thousands of records. Each product may have a price, specifications, images, stock information, and descriptions in several languages.

Organise the records

catalogue/
└── products/
    └── 2812.json

Store complete language values

{
  "name": "Travel Backpack",
  "price": 49,
  "stock": 120,
  "specifications": {
    "capacity": "30 litres",
    "weight": "900 grams"
  },
  "english": {
    "title": "Ready for everyday travel",
    "description": "A lightweight backpack with a padded laptop compartment."
  },
  "hindi": {
    "title": "Roz ke safar ke liye",
    "description": "Halka backpack, laptop ke liye alag padded jagah ke saath.",
    "care": [
      "Haath se saaf karein",
      "Chhaon mein sukhayein"
    ]
  },
  "images": [
    "front.webp",
    "back.webp"
  ]
}

Your customer chooses Hindi

Request the hindi field. The reader uses the map to resolve the record and the index to find its byte range. The response contains the complete Hindi value: its title, description, and care instructions. Price, stock, specifications, English content, and image URLs are not selected.

Need the price too? Request price and hindi together with a multi-field read. Nearby ranges can be combined; the number of HTTP requests depends on their positions in the data file.

Find the record through its map

The map resolves folder names; the reader lists the record IDs below that folder. A source filename is not necessarily its numbered record ID. Keep the selected ID in your application rather than guessing its path.

Read one or several fields →
02 / HELP CENTRE

A complete help page. In the selected language.

A help centre can organise complete multilingual instructions inside deeply nested folders. Each language can contain a heading, introduction, steps, and troubleshooting.

Organise the records

help-centre/
└── guides/
    └── account/
        └── recovery/
            └── pages/
                ├── 1.json
                ├── 2.json
                └── 3812.json

Store complete language values

{
  "title": "Recover your account",
  "category": "Account access",
  "english": {
    "heading": "Reset your password",
    "steps": [
      "Open account recovery",
      "Enter your email",
      "Follow the reset link"
    ]
  },
  "spanish": {
    "heading": "Restablece tu contraseña",
    "introduction": "Sigue estos pasos para recuperar el acceso a tu cuenta.",
    "steps": [
      "Abre la página de recuperación",
      "Introduce tu correo electrónico",
      "Sigue el enlace para restablecer la contraseña"
    ],
    "troubleshooting": {
      "email_missing": "Revisa la carpeta de correo no deseado.",
      "link_expired": "Solicita un nuevo enlace."
    }
  }
}

Your user needs Spanish instructions

Request the spanish field to receive the complete Spanish object, including its nested troubleshooting content. English instructions are not selected. Use the generated map to find the folder prefix rather than guessing a numbered path.

Need page metadata too? Request title, category, and spanish together. RIDA selects stored fields, not individual properties inside them. If troubleshooting needs independent reads, store it in a separate top-level field.

Find the record through its map

The map resolves folder names; the reader lists the record IDs below that folder. A source filename is not necessarily its numbered record ID. Keep the selected ID in your application rather than guessing its path.

Read one or several fields →

Large values work too.

A field can contain a complete object or array, not just a short sentence. A long value needs a larger byte range. An encrypted build returns the same selected values after decryption with the key. Encryption and HTTP headers add overhead; responses are not a fixed few bytes. Merged ranges can also include small gaps between selected values.

Prepare your JSON →
NEXT

Prepare your JSON for a build.

Read the build guide