René's URL Explorer Experiment


Title: Support async Blob sources · Issue #37338 · nodejs/node · GitHub

Open Graph Title: Support async Blob sources · Issue #37338 · nodejs/node

X Title: Support async Blob sources · Issue #37338 · nodejs/node

Description: The terminology "async Blob source" was mention earlier[1] I think it means in chromes world a "BlobDataItem" BlobDataItem: This is a primitive element that can basically be a File, Bytes, or another Blob. It also stores an offset and si...

Open Graph Description: The terminology "async Blob source" was mention earlier[1] I think it means in chromes world a "BlobDataItem" BlobDataItem: This is a primitive element that can basically be a File, Bytes, or anoth...

X Description: The terminology "async Blob source" was mention earlier[1] I think it means in chromes world a "BlobDataItem" BlobDataItem: This is a primitive element that can basically be a F...

Opengraph URL: https://github.com/nodejs/node/issues/37338

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support async Blob sources","articleBody":"The terminology \"async Blob source\" was mention earlier\u003csup>[[1]](https://github.com/nodejs/node/issues/19393#issuecomment-777580429)\u003c/sup> I think it means in chromes world a \"BlobDataItem\"\r\n\r\n> **BlobDataItem**: This is a primitive element that can basically be a File, Bytes, or another Blob. It also stores an offset and size, so this can be a part of a file. (This can also represent a “future” file and “future” bytes, which is used to signify a bytes or file item that has not been transported yet).\u003cbr>https://chromium.googlesource.com/chromium/src/+/master/storage/browser/blob/README.md\r\n\r\n- In simple terms it can be a Blob that comes from other places like the filesystem that don't have the data (source) in the memory.\r\n- It's basically a dummy blob that have a point reference to some file on the hard drive with an offset of where to start and stop reading from\r\n- Or it can be a slice of another blob, with a new offset.\r\n\r\n---\r\n\r\n```js\r\n// if you create a blob\r\nconst blobA = new Blob([new ArrayBuffer(20_000)])\r\n// and slice it\r\nconst blobB = blobA.slice(0, 10_000)\r\n```\r\n- ...Then we shouldn't create a new blob and allocated 30.000 bytes for both `blobA` and `blobB` it should still only be 20.000 bytes\r\n- `blobB` should be a reference to `blobA` with another offset from 0 to 10_000 and shouldn't allocate any new buffer\r\n  - so when we are reading blobB then it creates a readable stream on blobA that reads bytes 0-10000\r\n\r\n---\r\n\r\nAnd if we create a 3rd  blob `blobC = new Blob([blobB, blobB])`\r\n- Then `blobC` will just have two reference to blobB (witch actually refers to two slices of blobA). And reading this blobC will be like if we created two readable streams and read them one after the other\u003cbr>`blobC.stream() === [blobB.stream(), blobB.stream()]`\r\n```js\r\n// this pseudo code can be a bit off (wrong) but it can explain what i mean\r\nblobB.stream = () => new streams.Readable.from(function* () {\r\n  yield* blobA[kSource].slice(0, 10000)\r\n})\r\n\r\nblobC.stream = () => new streams.Readable.from(function* () {\r\n  yield* blobB.stream()\r\n  yield* blobB.stream()\r\n})\r\n\r\n// A better way is if blobC can have direct reference to the internal\r\n// blob parts to blobA so blobB can be garbage collected\r\n```\r\n\r\nin this case both `blobB` and `BlobC` would not have any underlying source that holds the data in memory. this would only be (nested) references to blobA\r\n\r\nGuess this is some important steps towards solving async blob sources and mixing both blobs that could come from the `fs` and mixed with blobs constructed with data from the memory\r\n\r\nI created something like this async sources in [fetch-blob](https://github.com/node-fetch/fetch-blob/blob/master/index.js) and also a kind of [BlobDataItem](https://github.com/node-fetch/fetch-blob/blob/master/from.js) that was backed up by the filesystem and didn't hold anything in the memory. I have totally manage to solve this slicing stuff in a synchronous way and also constructing new blobs with other parts. the only thing that is async is how it reads the data. My blob is constructed with a sequence of blob parts (with offsets of other parts) (not a single source like a full ArrayBuffer containing all data). \r\n\r\nThat is how it can manage to take any other instance of a Blob class that isn't our own and knowing nothing about the internal source of the other blob. So you can construct fetch-blob with something that looks and behaves like any other Blob. it could for instance accept a BlobDataItem from the `fs` and also `buffer.Blob`\r\n\r\nnote that a blob from fs should keep track of last modified time and if it isn't the same when you are reading, then the internal stream should throw a error","author":{"url":"https://github.com/jimmywarting","@type":"Person","name":"jimmywarting"},"datePublished":"2021-02-12T23:28:03Z","url":"https://github.com/nodejs/node/issues/37338"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f3c448eb-7d31-9ff6-27ee-f9f5c56d5b79
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC75A:3CEA01:1C15834:24C9FC0:6B0987BC
html-safe-nonce0987c88ad91b86ac24e587ab4f43e043f827e7774373f462f06f62dc5d668031
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzVBOjNDRUEwMToxQzE1ODM0OjI0QzlGQzA6NkIwOTg3QkMiLCJ2aXNpdG9yX2lkIjoiOTA3NzU2MzQxNzk4NDMzNzg1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2c86549af1bea6eaab1852e1771ec6a12caefa691efdf67442ee1348f2796814
hovercard-subject-tagissue:807611971
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/37338/issue_layout
twitter:imagehttps://opengraph.githubassets.com/587144a31f305b31ac34076cf0502de24a9fea592ad4b6262382b6a397634ed5/nodejs/node/issues/37338
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/587144a31f305b31ac34076cf0502de24a9fea592ad4b6262382b6a397634ed5/nodejs/node/issues/37338
og:image:altThe terminology "async Blob source" was mention earlier[1] I think it means in chromes world a "BlobDataItem" BlobDataItem: This is a primitive element that can basically be a File, Bytes, or anoth...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejimmywarting
hostnamegithub.com
expected-hostnamegithub.com
None7979c7f5a22f0d2888cd797df0df5d946c8c8609941ab6be35588d3fff39c86e
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released82818ecaa19047a8735708a7f4ba2ab4eb8df16
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/37338#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F37338
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F37338
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/37338
Reloadhttps://github.com/nodejs/node/issues/37338
Reloadhttps://github.com/nodejs/node/issues/37338
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues626 (626)https://github.com/nodejs/node/issues
Pull requests649 (649)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/insights
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/37338
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/37338
Support async Blob sourceshttps://github.com/nodejs/node/issues/37338#top
bufferhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22buffer%22
https://github.com/jimmywarting
jimmywartinghttps://github.com/jimmywarting
on Feb 12, 2021https://github.com/nodejs/node/issues/37338#issue-807611971
[1]https://github.com/nodejs/node/issues/19393#issuecomment-777580429
https://chromium.googlesource.com/chromium/src/+/master/storage/browser/blob/README.mdhttps://chromium.googlesource.com/chromium/src/+/master/storage/browser/blob/README.md
fetch-blobhttps://github.com/node-fetch/fetch-blob/blob/master/index.js
BlobDataItemhttps://github.com/node-fetch/fetch-blob/blob/master/from.js
targoshttps://github.com/targos
bufferhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22buffer%22
on Aug 9, 2021https://github.com/nodejs/node/issues/37338#event-5129659338
https://github.com/jimmywarting
jimmywartinghttps://github.com/jimmywarting
on Nov 22, 2022https://github.com/nodejs/node/issues/37338#issuecomment-1324013512
jimmywartinghttps://github.com/jimmywarting
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 30, 2023https://github.com/nodejs/node/issues/37338#event-8886583046
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/37338
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/37338
bufferhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22buffer%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.