Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Open for Comments] RSS and Atom Feed Support #1139

Open
washingtonserip opened this issue Dec 28, 2024 · 0 comments
Open

[Open for Comments] RSS and Atom Feed Support #1139

washingtonserip opened this issue Dec 28, 2024 · 0 comments

Comments

@washingtonserip
Copy link

washingtonserip commented Dec 28, 2024

Description

Authors

Overview

This document outlines the design and implementation plan for adding RSS 2.0 and Atom 1.0 support to OpenStatus. It will allow you to subscribe to specific public status pages to receive updates on notices and events.

It's open for comments. Development has already started.

Why RSS 2.0 and Atom 1.0?

OpenStatus currently lacks a standardized method for delivering updates on system statuses. By supporting RSS and Atom, the platform will align with industry standards, ensuring compatibility with a wide range of feed readers and providing users with an efficient way to stay informed.

Goals

  • Multiple standard support: Provide support for different feed formats to ensure broad compatibility.
  • Minute by Minute Updates: Balanced update frequency for feeds.
  • Scalability: Design the system to handle feed from tens of thousands of status pages.
  • Data Integration: Source feed data directly from existing SQL database tables.
  • Filtering: Allow users to filter feeds by status and kind (incident or maintenance).

Non-Goals

  • Support for formats other than RSS 2.0 and Atom 1.0.
  • Real-time feed updates more frequently than minute by minute.

Implementation Strategy

Architecture Layers

  • Data Layer: SQL database containing incidents and maintenance events.
  • Business Logic Layer: Node.js backend to process and generate feeds.
  • Presentation Layer: RSS and Atom feed endpoints accessible to users.
  • Caching Layer: Redis for efficient feed delivery.

Dependencies

Extra: Replace rss with feed lib in blog/changelog (and maybe support atom as well?) to remove rss from dependencies.

Data Models

Incident

  • id: Unique identifier.
  • title: Title of the incident
  • description: Summary of the incident.
  • status: Current status (active, resolved).
  • link: URL to detailed information.
  • updated_at: Last updated timestamp.

Maintenance

  • id: Unique identifier.
  • title: Title of the maintenance.
  • description: Summary of the maintenance.
  • status: Current status (scheduled, in-progress, completed).
  • link: URL to detailed information.
  • updated_at: Last updated timestamp.

APIs

  • GET /feed/rss: Generate and return RSS 2.0 feed.
  • GET /feed/atom: Generate and return Atom 1.0 feed.
  • GET /feed/rss?status={status}&kind={kind}: Filter feed content by status and kind.

How to: Use API routes under /src/app/status-page/\[domain\]/feed/atom/route.ts as they will be mapped to https://[domain].openstatus.dev/feed/atom (same for rss).

Interface

The “Get updates” button currently supports email subscriptions. We suggest adding a dropdown menu for RSS, Atom, and Email options, with an input popover for email entry when selected.

Before:
image

After:
image

Specifications

XML Standards

  • RSS 2.0:
    • Use <item> elements for individual incidents or maintenance events.
    • Include <status> and <category> for differentiation.
  • Atom 1.0:
    • Use <entry> elements for individual incidents or maintenance events.
    • Include <status> and <category> for differentiation.

Header

  • Metadata for RSS/Atom feed structure.
  • Proper HTTP headers for caching and validation.

Main Content Area

  • Dynamic content based on SQLite queries for incidents and maintenance.
  • XML elements for RSS and Atom:
    • RSS: <title>, <link>, <description>, <pubDate>, <category>.
    • Atom: <title>, <id>, <updated>, <summary>.

Footer

  • Metadata like generator information and copyright.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant