Skip to content
Heikki Johannes Hildén edited this page Nov 22, 2018 · 20 revisions

Open Interactivity Engine

Channels

A channel is a means for uni- or bidirectional communication with an audience. Each channel is an interface which defines a set of operations. Together, these operations determine the capabilities of the channel.

interface SmsChannel
{
    void sendSms(Audience recipients, Content message);
}

Features

Features are configurable units of functionality that can be added to radio campaigns. Channels are the communication link between the audience and a campaign feature. Multiple channels may be available for one feature.

Campaigns

Interactive radio campaigns are schedulable and automated activities of audience interaction to exchange information.

Content

Information available to campaigns for exchange over a channel is know as content. Content is available in different formats and languages. Examples of formats are text, audio, and video. Instances of data which renders content in a specific format and in a specific language are referred to as representations of that content.

class ContentRep
{
    // ...

    private ContentFormat format;
    private Language lang;
}

class Content
{
    // ...

    private ContentRep[] representations;
}

Media types

Content formats conform to the RFC 6838 Media Type (also know as MIME type) specification.

enum MediaType
{
    AudioMpeg,
    TextPlain,
    TextHtml,

    // ...
}

interface ContentFormat
{
    static pure MediaType mediaType();
}

class TextFormat : ContentFormat
{
    static pure MediaType mediaType() 
    { 
        return MediaType.TextPlain; 
    }
}

class Mp3Format : ContentFormat
{
    static pure MediaType mediaType() 
    { 
        return MediaType.AudioMpeg; 
    }
}

Adapters

An adapter implements a channel interface against a specific backend, service or platform.

module nexmo_sms;

class NexmoSmsAdapter : SmsChannel
{
    void sendSms(Audience recipients, Content message)
    {
        // code that talks to Nexmo's API
    }
}

Audience

An audience is a group of people who have been engaged to participate in a campaign. The audience interacts with the features of a campaign over a channel.

Clone this wiki locally