I’m currently working on building a mailbox system based on notifications. Our aim is to include company data along with notifications on the server side.
For instance:
We will introduce a new Mailbox type for notifications.
When the server sends a mailbox-type notification to a player, the server will also create accompanying data such as:
{
notificationId: xxx,
sendTime: xxx,
isRead: false,
isClaimed: false
}
This data will be sent to the player.
The client will also synchronize this data to keep track of the mailbox.
Additionally, if we can’t retrieve the ID on the server side, we will need to delay the next RPC (Remote Procedure Call) from the server for updating the status. Currently, this isn’t an issue since all the fields have default values of empty or false. We can use these default values to generate the data on the client side and build it on the server during the next update RPC, such as when a player reads a notification. However, if there’s data that needs to be built based on server configuration, we may encounter difficulties, especially if there’s no way to link the notification ID with the data.
I’m currently working on building a mailbox system based on notifications. Our aim is to include company data along with notifications on the server side.
For instance:
We will introduce a new Mailbox type for notifications.
When the server sends a mailbox-type notification to a player, the server will also create accompanying data such as:
{
notificationId: xxx,
sendTime: xxx,
isRead: false,
isClaimed: false
}
This data will be sent to the player.
The client will also synchronize this data to keep track of the mailbox.
Additionally, if we can’t retrieve the ID on the server side, we will need to delay the next RPC (Remote Procedure Call) from the server for updating the status. Currently, this isn’t an issue since all the fields have default values of empty or false. We can use these default values to generate the data on the client side and build it on the server during the next update RPC, such as when a player reads a notification. However, if there’s data that needs to be built based on server configuration, we may encounter difficulties, especially if there’s no way to link the notification ID with the data.
@mengxin wouldn’t implementing mailbox be more vesable to be done as S2S.
Basically you could have mailbox services done outside of the nakama, and to the nakama it could communicate with S2S.
Nakama it self could post notification if player is online or if not. On this way i belive you can get best of both worlds.
yeah, this is what we did to achieve this feature, the only minor issue we have extra data to track the mail read/claim expiration status. after the server sends notification, as we cannot get the notification itself, so cannot create a corresponding entry for the notification when send, need client drive to maintain this data structure