Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the Realtime guide #296

Merged
merged 7 commits into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test/bin/*
dead_links.json
links_failed.json
.links_checked.json
.vscode
6 changes: 3 additions & 3 deletions src/core/1/api/essentials/notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ The `result` object is the notification content, and it has the following struct

---

## User events
## User Notification

User notifications about users are triggered by the following events:
User notifications are triggered by the following events:

- A user subscribes to the same room
- A user leaves that room
Expand Down Expand Up @@ -138,7 +138,7 @@ The `result` object is the notification content, and it has the following struct

---

## Server events
## Server Notification

Server notifications are triggered by global events, and they are sent to all of a client's subscriptions at the same time.

Expand Down
2 changes: 1 addition & 1 deletion src/core/1/api/essentials/volatile-data/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ There is one special case, where volatile data are stored by Kuzzle for a later

Volatile data passed to a new subscription query are used two times by Kuzzle:

- if the new subscription triggers [user notifications](/core/1/api/essentials/notifications#user-events-default), its volatile data are included into those
- if the new subscription triggers [user notifications](/core/1/api/essentials/notifications#user-notification-default), its volatile data are included into those
- if that subscription is cancelled, whether because of a call to [realtime:unsubscribe](/core/1/api/api-reference/controller-realtime/unsubscribe/), or after the user disconnects: the volatile data provided **at the time of the subscription** are once again copied into user notifications triggered by that event

This allows other real-time subscribers to get context information about a user joining or leaving the same subscription as them.
Expand Down
509 changes: 425 additions & 84 deletions src/core/1/guide/guides/essentials/real-time/index.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/sdk/cpp/1/essentials/realtime-notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ order: 100

# Notifications

The [realtime:subscribe](/sdk/cpp/1/controllers/realtime/) method takes a listener of type `kuzzleio::NotificationListener`.
The [realtime:subscribe](/sdk/cpp/1/controllers/realtime/) method takes a listener of type `kuzzleio::NotificationListener`.
That listener is called with a `const kuzzleio::notification_result*` argument, pointing to an object whose content depends on the type of notification received.

## Document & messages
Expand Down Expand Up @@ -38,7 +38,7 @@ The `kuzzleio::notification_content` struct has the following properties for doc

## User

These `kuzzleio::notification_result` represent [user events](/core/1/api/essentials/notifications#user-events-default).
These `kuzzleio::notification_result` represent [user events](/core/1/api/essentials/notifications#user-notification-default).

| Property | Type | Description |
| ------------ | ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/go/1/essentials/realtime-notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The `Result` property has the following structure for document notifications & m

## User

These notifications represent [user events](/core/1/api/essentials/notifications#user-events-default).
These notifications represent [user events](/core/1/api/essentials/notifications#user-notification-default).

| Property | Type | Description |
| ------------ | -------------------------- | ----------------------------------------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/java/1/essentials/realtime-notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ order: 100

# Notifications

The [Realtime.subscribe](/sdk/java/1/controllers/realtime/subscribe/) method takes a `io.kuzzle.sdk.NotificationListener` event listener (implements the `EventListener` interface).
The [Realtime.subscribe](/sdk/java/1/controllers/realtime/subscribe/) method takes a `io.kuzzle.sdk.NotificationListener` event listener (implements the `EventListener` interface).
That listener is fed with a `io.kuzzle.sdk.NotificationResult` object, whose content depends on the type of notification.

Properties can be accessed with usual getters and setters.
Expand Down Expand Up @@ -40,7 +40,7 @@ The `io.kuzzle.sdk.NotificationContent` object has the following properties for

## User

These `io.kuzzle.sdk.NotificationResult` represent [user events](/core/1/api/essentials/notifications#user-events-default).
These `io.kuzzle.sdk.NotificationResult` represent [user events](/core/1/api/essentials/notifications#user-notification-default).

| Property | Type | Description |
| ------------ | --------------------------------- | ----------------------------------------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/js/6/essentials/realtime-notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The `result` object is the notification content, and it has the following struct

## User

These notifications represent [user events](/core/1/api/essentials/notifications#user-events-default).
These notifications represent [user events](/core/1/api/essentials/notifications#user-notification-default).

| Property | Type | Description |
| ------------ | ----------------- | ----------------------------------------------------------------------------------------------------- |
Expand All @@ -61,7 +61,7 @@ The `result` object is the notification content, and it has the following struct

## Server

These notifications represent [server events](/core/1/api/essentials/notifications#server-events-default).
These notifications represent [server events](/core/1/api/essentials/notifications#server-notification-default).

| Property | Type | Value |
| --------- | ----------------- | ------------------------------------------------------------------ |
Expand Down