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

Add blog for JS abort controller #1226

Closed
wants to merge 635 commits into from
Closed

Conversation

bterlson
Copy link
Member

Let me know any comments. Edits allowed from maintainers, so feel free to fix any minor issues you like 😀

xiangyan99 and others added 30 commits December 4, 2019 15:49
Update the dec release table to point at the latest table and
update the latest table versions with what has released.

Add Dec to releases sidebar
* Updated the version number for storage
We fixed the packages that needed this hack/workaround so
we can remove the workaround now.
* Update changeLog for Storage

* Update 2019-12-java.md
* no runtime configuration for c.

* add more wording on default options
* Clarified ServiceVersion Guidelines

* review feedback
* Remove receive all bullet point.

* Update versions.

* Update notes.
* JS: Guidelines for tags to use

* JS: Guidelines for tags to use

* tags and hotfixes

* Update text on preview packages

Co-Authored-By: Jeff Fisher <xirzec@xirzec.com>

* Update docs/policies/releases.md

Co-Authored-By: Jeff Fisher <xirzec@xirzec.com>

* hot fix -> hotfix

Co-Authored-By: Jeff Fisher <xirzec@xirzec.com>
The focus of these changes is to add a line item for the Event Hubs package
for the Event Processor client.
The focus of these chagnes is to tweak the service names used for the
Event Hubs packages in order to make them more friendly.
* wording change in logging

* adopt a bit from go

* remove some redundent-outdated things. Add private constant.

* fix include tag

* heep->http
Copy link
Contributor

@ramya-rao-a ramya-rao-a left a comment

Choose a reason for hiding this comment

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

Love it!

_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Outdated Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
@bterlson
Copy link
Member Author

All feedback addressed, let me know if there are more suggestions!

@adrianhall
Copy link
Member

Was the second file "how q" added by accident? Might want to remove it from the PR.

@bterlson
Copy link
Member Author

that extra file is very strange! I'll slice it out of the history.

@bterlson
Copy link
Member Author

Well clearly I messed up my filter-branch.

@bterlson bterlson closed this Apr 16, 2020
@bterlson bterlson deleted the js-ac-blog branch April 16, 2020 18:26
@bterlson
Copy link
Member Author

Recreating PR.

_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
repository: azure/azure-sdk
---

Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.
Copy link
Member

Choose a reason for hiding this comment

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

Consider:
For example, here are some scenarios where you could utilize the request cancelling functionality that is built into the Azure SDK.

  • User started to download a large file from Azure Storage, but cancelled the request.
  • A process got an interrupt signal because the node is no longer needed or needs to be upgraded.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you feel strongly I can change it but I prefer what's there personally.

Copy link
Member

Choose a reason for hiding this comment

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

If you like the paragraph form, consider rewording the last couple of sentences.

Here's an example:

Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download. It would be nice if the app could let the Storage library know that it can stop downloading it. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to be upgraded. It would be nice if the app could stop any in-progress operations and shut down as soon as possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is your goal here to reduce sentence length/complexity? I will simplify. "it would be nice if" is a little wordy too, I'll try to get rid of it.

_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved

## AbortController &amp; AbortSignal

`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.
Copy link
Member

Choose a reason for hiding this comment

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

It's unclear what you mean by delegating the ability to cancel the signal as well.

Copy link
Member Author

@bterlson bterlson Apr 16, 2020

Choose a reason for hiding this comment

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

Holding a signal doesn't allow you to cancel it, only holding the controller does. This separation of concerns means you can safely pass around a signal and still have confidence things won't cancel because a library you passed it in to is misbehaving, for example. Thoughts on how to clarify?

Copy link
Member

Choose a reason for hiding this comment

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

Adding the text from your comment above would help.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's kind of a useless point I think. Objections to just deleting the last sentence "This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well."?

Copy link
Member

Choose a reason for hiding this comment

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

Added comment to new PR.

_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
_posts/2020-04-21-js-abort-controller.md Show resolved Hide resolved
@bterlson
Copy link
Member Author

@jongio Thanks so much for the feedback, I addressed most of this feedback over in #1240.

I'm open to changing the intro paragraph to a bullet list and also interested in how to improve the point about separation of concerns between signal and controller.

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

Successfully merging this pull request may close these issues.

None yet