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

Extend batch docs #685

Merged
merged 8 commits into from
Jun 10, 2019
Merged

Extend batch docs #685

merged 8 commits into from
Jun 10, 2019

Conversation

tomczoink
Copy link
Contributor

@tomczoink tomczoink commented Jun 6, 2019

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.

@tomczoink tomczoink requested a review from mattheworiordan June 6, 2019 10:56
@mattheworiordan mattheworiordan temporarily deployed to ably-docs-pr-685 June 6, 2019 10:56 Inactive
@mattheworiordan mattheworiordan temporarily deployed to ably-docs-pr-685 June 6, 2019 11:12 Inactive
Copy link
Member

@mattheworiordan mattheworiordan left a 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.

content/rest/channels.textile Outdated Show resolved Hide resolved
Copy link
Member

@paddybyers paddybyers left a 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

@@ -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.
Copy link
Member

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.


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.
Copy link
Member

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.

@mattheworiordan mattheworiordan requested a deployment to ably-docs-pr-685 June 10, 2019 09:20 Abandoned
@tomczoink tomczoink requested a deployment to ably-docs-pr-685 June 10, 2019 09:22 Abandoned
@tomczoink tomczoink merged commit 582d1ef into master Jun 10, 2019
@tomczoink tomczoink deleted the extend-batch-docs branch June 10, 2019 09:22
@@ -18,6 +18,8 @@ jump_to:
Help with:
- Getting started#getting-started
- Channels#channels
- Obtaining history of a channel#channel-history
Copy link
Member

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

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed both with f0f9e2a.

Copy link
Member

@mattheworiordan mattheworiordan left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants