Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EPUB Partial Response API

A small reference implementation demonstrating HTTP Range Requests for serving EPUB files without exposing the entire book in a single request.

This project was created as a technical spike while working at Árvore to evaluate content delivery strategies for EPUB readers.

Why

Serving large EPUB files as complete downloads is often unnecessary.

Supporting HTTP Range Requests allows clients to request only the byte ranges they need, improving:

  • startup latency
  • bandwidth usage
  • reader experience
  • content protection by avoiding full-file downloads through the application layer

Rather than discussing the implementation theoretically, I built this repository as an executable proof of concept that the team could inspect, test and use as a reference before introducing the approach into production systems.

This is a pattern I've repeated throughout my career: when evaluating an architectural decision, I prefer building a small, focused prototype that removes uncertainty before committing to a production implementation.

What it demonstrates

  • HTTP Range Requests
  • HTTP 206 Partial Content responses
  • Byte-range parsing
  • Efficient EPUB streaming
  • Protected content delivery
  • Minimal Elixir/Phoenix implementation

Running

Install dependencies:

mix deps.get

Start the server:

iex -S mix

Request the first bytes of the sample book:

curl http://localhost:4000/book?isbn=123 \
  -H "Range: bytes=0-4096" \
  --output partial.epub

Status

This repository is a standalone proof of concept created to validate and explain an architectural approach before production implementation.

It is intentionally small and focused on demonstrating the protocol rather than providing a production-ready EPUB server.

License

MIT

About

Technical spike demonstrating HTTP Range Requests for secure and efficient EPUB delivery.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages