Skip to main content
Android
iOS
macOS
Web
Linux C++
Unity

Channel naming recommendations

The flexibility of Signaling channels makes them suitable for a diverse range of interaction scenarios. The following are some commonly implemented scenarios:

  • Private chat channel: One-to-one chat.
  • Group chat channel: Three or more users communicate together.
  • Broadcast message channel: An administrator publishes announcements, questionnaires, check-ins, and other content for users in the channel.
  • Real-time synchronization channel: Individual players in the metaverse synchronize their status and location at high frequency.
  • Control information channel: Sensor data is uploaded or device status updated.
  • Signaling control channel: Invite users to join audio/video conferences or other groups.
  • Private mailbox channel: Only deliver messages to and receive messages from the channels you have subscribed to.

Although Signaling does not have a built-in method to specify channel scenarios, you can distinguish between different scenarios by standardizing and classifying channel names. Best practice is to express the purpose of the channel, and the type of messages transmitted in the channel when naming channels. This practice helps improve channel management and user experience.

Use meaningful channel names

Using a randomly generated string or a custom numeric string as a channel name is the simplest solution to naming a channel. However, channel names generated using this method are not readable, and can lead to the following issues:

  • Users get no information regarding the purpose and content of a certain channel from the channel name. This makes it difficult for them to choose a channel.

  • Channel managers cannot distinguish between channels for different scenarios by looking at the channel name. This increases the risk of errors when managing channels.

To solve these issues, best practice is to use a readable string as a channel name, and identify the purpose of the channel or the type of messages transmitted in the channel using a prefix and a separator.

Sample naming convention

In practice, a consistent channel naming convention improves identification and management efficiency, and reduces the cost of team communication and collaboration. For example, when granting user access to multiple channels, you can use regular expressions based on the naming convention to find the channels of interest. This improves coding efficiency and reduces the token file size.

Consider the following channel naming convention:

[scenarioType][separator][channelID]

  • scenarioType: Indicates your custom channel scenario.
  • separator: The separator can be _ or any other legal character.
  • channelID: Represents your custom segmentation purpose. For example, user ID, device name, or region name to identify the user, device, or region, respectively.
Important

Channel names cannot begin with an underscore.

Keep the depth of your channel name within 2 levels, which you can adjust as you see fit.

Based on this convention, the following are naming examples for channels in some common scenarios:

  • Private chat channel: private_room1
  • Group chat channel: groupchat_room1
  • Broadcast message channel: questionnaire_activity1
  • Real-time synchronization channel: location_user1
  • Control message channel: command_device1
  • Signaling control channel: meeting_invitation1
  • Private mailbox channel: inbox_userId

Signaling