Sunbird UCI
  • Overview of Sunbird UCI
  • 📙Learn
    • UCI use cases
    • UCI for Education(Case study)
    • Tech Overview
      • Glossary
      • High-level Architecture Design
      • Design Principles
      • Standards
  • 🚀Use
    • Choose your Persona
    • Adopter - Install and use UCI
      • Pre-requisites, Installation Setup, Post Setup
      • Setting up your very first conversation
      • API Documentation
      • Data Exhaust and Analytics
      • Posthog Event
      • Whatsapp (Netcore)
      • Environment Variables
    • Developer - Contribute to UCI
      • UCI Basics
        • XMessage Specification
        • Transformers
          • ODK Transformer
            • Interactive-Messages
            • Media Messages
            • Location
          • Broadcast Transformer
        • Adapters
          • Firebase Notification Adapter
        • User Segment
        • Schema Overview
          • UCI Core Schema
            • XMessage Schema
            • Assessment DB Schema
          • UCI API Schema
      • Development environment
        • Backend Setup
        • Setting up IDE
        • Environment variable setup
        • Debug services
        • Build and Execute UCI
        • Frontend Setup (Admin Console)
        • Frontend Setup (PWA)
        • Transport Socket
      • API Documentation
        • Bot Setup APIs
        • History APIs
        • Direct Message APIs
        • Vault APIs
      • Database Schema
        • Cassandra Xmessage Database
        • Postgres Forms Database
        • Postgres User Analytics Database
        • Postgres Comms Database
      • Contribution Guide
        • Your first PR
        • Contribute an Adapter
        • Adapter Implementation
        • Create a Transformer
    • Contact the administrator
  • ✅Releases
    • Release V2
  • 🤝Engage
    • Software License
    • Acceptable Use Policy
    • Terms of Service
    • Source Code
    • Discussion Forum
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Learn
  2. Tech Overview

High-level Architecture Design

PreviousGlossaryNextDesign Principles

Last updated 2 years ago

Was this helpful?

The block diagram below outlines various components that come together to form the Unified Communications Interface (UCI):

  1. Adapter: An adapter translates between messages received from communication channels on specific providers and the internal XMessage format (followed by UCI). A new adapter is required for every new combination of communication channel and service provider (e.g. - WhatsApp + Gupshup; WhatsApp + NetCore; WhatsApp + Twilio). An adapter config references the communication channel, service provider and associated metadata such as a specific business account phone number.

  2. Transformer: A transformer is a stateless processing object that takes inputs and converts the input into a processed output. Transformers may in turn call external services if needed.

  3. Conversation Logic: Conversation logic defines the overall flow for a specific conversation. A conversation logic object references a sequence of transformers that will be applied to arrive at the final response at a specific point in the conversation and the associated adapter config for this conversation logic.

  4. User Segments: A bot can either be an open public bot or a closed targetted bot. In the latter case, a closed user segment has to be defined. User segment contains user data including a mechanism to fetch them from a federated user registry.

  5. Conversations: A conversation orchestrates a conversation with a specific conversation logic assigned to a set of users. A bot object references user segment(s) and conversation logic(s).

Following is a summary of the relation between the different blocks of UCI :

Adapter = Communication Channel + Service Provider

User segment

Transformer

Conversation Logic = {Transformers} + Adapter

Bot = {Conversation Logics} + {User segments}

Real World
UCI Platform

Set of end users in a state

User segment 1 containing user registry uri, user ids, user metadata including phone numbers

Single end user phone number part of the state (eg. 938490834)

User phone number field in user segment object

Whatsapp

Communication Channel referenced in the Adapter 1 config

Gupshup

Service provider referenced in the Adapter 1 config

Business account phone number 908092348

Meta data for adapter 1, referenced in Adapter config

If fail, then this message

Transformer 1 referencing an XForm with pass/fail message logic

Translate message from English to Hindi

Transformer 2 referencing a translation microservice

Given fail, send message via Whatsapp to student

Conversation logic 1 = Transformer 1 + Transformer 2 + Adapter 1

Given fail, send same message via SMS to student

Conversation logic 2 = Transformer 1 + Transformer 2 + Adapter 2 (where adapter 2 config references SMS communication channel and SMS service provider)

Lifecycle of conversation

Conversation = Conversation logic 1 + Conversation logic 2 + User segment 1

📙
Tech Architecture Diagram