Microfeed

Specification

Henrik Hedberg
Innologies
<henrik.hedberg (@) innologies.fi>

Version 0.1 (20090628)

Note! This specification is out-dated. See the reference implementation for the changed details.

The permanent URL of the latest version of this document is http://microfeed.org/specification/.

Contents

1. Introduction
2. Architecture
3. Data Model
4. Predefined Properties
5. Predefined Item Types
6. Predefined Feeds
7. File System Usage
8. D-Bus Messaging

1. Introduction

The presumption is that there is a web site or sites providing feed-type information and an application fetching that information with Microfeed.

2. Architecture

The microfeed architecture is built on the following concepts:

These elements are depicted in the Figure 1. After a subscriber has subscribed a feed from a publisher (which is an instance of a provider), the publisher publishes items, i.e. sends item data to the subscriber.


Figure 1. Microfeed architecture.

3. Data Model

The following identifiers are used to distinguish various elements in Microfeed:

The item consists of the following data elements in addition to the unique identifier:

In addition, an item may contain binary data. That feature is usually used only in the http://microfeed.org/Feed/Images feed (see Section 6).

4. Predefined Properties

The predefined properties provides a common semantic for known item properties. Those are divided into various categories to ease reading.

5. Predefined Item Types

The generic item types are message, image, contact information, and settings value. Each of these types has its own set of predefined properties and semantics for the UID value.

6. Predefined Feeds

A publisher should support the following feeds:

If a provider does not support a predefined feed it must immediately respond to subscribe method with NoSuchFeed error reply (see Section 8.3).

In addition to predefined feeds, a publisher may support other feeds. For example, while the summary of messages of an external web site is published in the http://microfeed.org/Feed/Overview feed the messages of a single user called hhedberg may reside in the http://www.external.site/user/hhedberg feed.

7. File System Usage

A provider must create several files into a file system. Thus, a subscriber is able to find providers and publishers by iterating the well-known directories in a file system.

7.1 Provider File

A provider must create a provider file into one of the following locations:

Directories must be iterated in that order. The provider file should be created into /usr/lib/microfeed/providers (or /usr/local/lib/microfeed/providers) when a new provider is installed into a system.

The provider file must contain the following lines separated with line-feed (ASCII value 0x10):

Line numberDescription
1An user readable name of a provider.
2-nThe predefined and special feeds that are supported by the provider. The line is divided into two parts that are separated with a space ( ): the feed URI and the user-friendly name of the feed.

7.2 Publisher File or Directory

A provider must create one publisher file or directory for each of its publishers into one of the following locations:

Directories must be iterated in that order.

The contents of the publisher file or directory is not specified. A publisher may store its internal cache into the file or directory.

8. D-Bus Messaging

The messaging between a subscriber and a publisher (actually a provider) is based on D-Bus.

The D-Bus service name of a publisher is the provider part of the publisher identifier. The D-Bus object path of a publisher is /org/microfeed/publisher/name, where the name is the publisher part of the publisher identifier. For example, the publisher that has identifier ExamplePublisher-org.microfeed.Provider.ExampleProvider, registers a service URI org.microfeed.Provider.ExampleProvider, and is using object path /org/microfeed/publisher/ExamplePublisher.

8.1 Publisher Methods

A Microfeed publisher must implement an D-Bus interface org.microfeed.Publisher with the following methods:

8.2 Publisher Signals

A Microfeed publisher must send a signal with a D-Bus interface org.microfeed.Publisher when broadcasting information to all subscribers and with a D-Bus interface org.microfeed.Publisher.ToDestination when sending information to a specific subscriber.

8.3 Publisher Errors

A Microfeed publisher must send a signal with a D-Bus interface org.microfeed.Publisher.Error when broadcasting an error message to all subscribers and with a D-Bus interface org.microfeed.Publisher.Error.ToDestination when sending an error message to a specific subscriber. In addition, A Microfeed publisher must use the same error message names with the D-Bus interface org.microfeed.Publisher.Error when returning an error as a reply to a method call.

A publisher should use the following error names if appropriate:

8.4 Subscriber Methods

A Microfeed subscriber must implement a D-Bus interface org.microfeed.Subscriber with the following method: