Dapr Service Topic Overview

GITS-Microservice_Architecture.drawio.svg

Here we will describe all dapr topics currently available in the system. This includes

  1. a description of the topic,

  2. Its interface description,

  3. the content of the messages,

  4. services that publish to the topic,

  5. and services that subscribe to the topic.

Events by service

Service

Subscribes to

Publishes

Course service

course-changed
chapter-changed

User Service

Content Service

chapter-changed
content-progressed

content-changed
user-progress-updated

Media Service

content-changed

content-progressed

Flashcard Service

content-changed

content-progressed

Quiz Service

content-changed

content-progressed

Reward Service

user-progress-updated
course-changed

Skilllevel Service

user-progress-updated
chapter-changed

Topic: Course Changed

This topic is used by the Course Service to inform Course-dependant Services of changes done to a Course Entity.

Interface Description

Name
course-changed
PubSub-Name
gits
Java class
CourseChangeEvent

Involved Services

Publishers
  • Course service
Subscribers
  • Reward Service

Message Content

Field

Type

Description

courseId

UUID

Identifier of a Course Entity

operation

Enum

Describes which type of CRUD operation was applied to the Course. Available Operations are CREATE, DELETE

Topic: Chapter Changed

This topic is used by the Course Service to inform Chapter-dependant Services of changes done to a Chapter Entity.

Interface Description

Name
chapter-changed
PubSub-Name
gits
Java class
ChapterChangeEvent

Involved Services

Publishers
  • Course service
Subscribers
  • Content Service

Message Content

Field

Type

Description

Chapter IDs

List<UUID>

A list of Chapter IDs. Each Content is linked to one Chapter ID. Each ID is represented as a UUID.

Operation

Enum

Describes which type of CRUD operation was applied to the Chapter. Available Operation is DELETE.

Topic: Content Changed

This topic is used by the Content Service to inform Content-dependant Services of changes done to a Content Entity.

Interface Description

Name
content-changed
PubSub-Name
gits
Java class
ContentChangeEvent

Involved Services

Publishers
  • Content service
Subscribers
  • Media Service
  • Flashcard Service
  • Quiz service

Message Content

Field

Type

Description

Content IDs

List<UUID>

A list of Content IDs. A resource can be part of one or multiple Contents. The Content IDs are each represented as a UUID.

Operation

Enum

Describes which type of CRUD operation was applied to the Content. Available Operations are UPDATE, DELETE

Topic: Content Progressed

This topic is used to communicate that a certain content has been completed by a user.

Interface Description

Name
content-progressed
PubSub-Name
gits
Java class
ContentProgressedEvent

Involved Services

Publishers
  • Media service
  • Flashcard service
  • Quiz service
Subscribers
  • Content service

Message Content

Field

Type

Description

userId

UUID

The ID of the user associated with the progress log event.

contentId

UUID

The ID of the content associated with the progress log event.

success

boolean

Indicates whether the user’s progress was successful or not.

correctness

double

The level of correctness achieved by the user.

hintsUsed

int

The number of hints used by the user.

timeToComplete

Integer

The time taken by the user to complete the progress (optional).

Topic: User Progress Updated

This topic is used to communicate that the content service has processed the update of the user progress.

Interface Description

Name
user-progress-updated
PubSub-Name
gits
Java class
UserProgressUpdated

Involved Services

Publishers
  • Content service
Subscribers
  • Reward service
  • Skilllevel service

Message Content

Field

Type

Description

userId

UUID

The ID of the user associated with the progress update event.

contentId

UUID

The ID of the content associated with the progress update event.

chapterId

UUID

The ID of the chapter associated with the progress update event.

courseId

UUID

The ID of the course associated with the progress update event

success

boolean

Indicates whether the user’s progress was successful or not.

correctness

double

The level of correctness achieved by the user.

hintsUsed

int

The number of hints used by the user.

timeToComplete

Integer

The time taken by the user to complete the progress (optional).