-
Notifications
You must be signed in to change notification settings - Fork 41
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
Extend batch docs #685
Extend batch docs #685
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment, otherwise approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking a lot better, but see comments
content/realtime/channels.textile
Outdated
@@ -255,11 +372,15 @@ channel.publish("action", data: "boom!") | |||
|
|||
Normally, errors in attaching to a channel are communicated through the attach callback. For implicit attaches (and other cases where a channel is attached or reattached automatically, e.g. following the library reconnecting after a period in the @suspended@ state), there is no callback, so if you want to know what happens, you'll need to listen for channel state changes. | |||
|
|||
h3(#batch-publish). Batch publishing | |||
|
|||
It is common for a single message to be intended for multiple channels. With a realtime connection, you can effectively send a message to multiple channels at once by allowing multiple concurrent publish operations. If you wish to send a message to multiple channels within a single operation, you can make use of the "REST batch API":/rest-api/beta#batch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since realtime doesn't support batch publishing I do think having this heading is misleading. I realise you wanted to keep the headings consistent, but the APIs are different, and I don't think it's appropriate in this case.
Perhaps this section should literally be called "Publishing to multiple channels".
The the text could be:
Often it is necessary to publish a single message in multiple channels at the same time. In the realtime API, this is achieved simply by making multiple separate publish() requests, once in each of the channels in question, and the realtime protocol allows for those concurrent requests to be in-flight simultaneously, so the publish on one channel is not delayed waiting for completion of operations in other channels.
It is also possible to publish one or more messages into multiple channels in a single operation using the "REST batch API":/rest-api/beta#batch.
content/rest/channels.textile
Outdated
|
||
h3(#batch-publish). Batch publishing | ||
|
||
It is common for a single message to be intended for multiple channels. If you wish to send a message to multiple channels within a single operation, you can make use of the "REST batch API":/rest-api/beta#batch. With a "realtime":/realtime connection, you can also effectively send a message to multiple channels at once by allowing multiple concurrent publish operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest removing the last sentence about realtime here.
@@ -18,6 +18,8 @@ jump_to: | |||
Help with: | |||
- Getting started#getting-started | |||
- Channels#channels | |||
- Obtaining history of a channel#channel-history |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomczoink I am afraid you need to add #publishing
here as it's missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ,why is this obtaining history and getting history below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed both with f0f9e2a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I missed reviewing this, but @tomczoink this work is excellent. Thank you, it will definitely make a big difference!
I made a few minor comments that need addressing
For #684, largely involves mentioning batch publishing more extensively throughout the docs, as well as cleaning up some of the batch publish docs themselves.
Includes the addition of subscribe/publish sections in realtime/channels and history/publish in rest/channels to make the functionality even more obvious per feedback in the initial issue.