# Promise

An ECMAScript object that serves as a placeholder for the eventual result of a deferred, possibly asynchronous computation.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Promise based Web Worker Messaging

DevFeed: [Promise based Web Worker Messaging](<https://devfeed.tech/articles/promise-based-web-worker-messaging-37370.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/web-workers-promises/>)

Author: Stanko

Published: 2025-11-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [Promise](<https://devfeed.tech/topics/promise.md>), [Messaging](<https://devfeed.tech/topics/messaging.md>), [Web](<https://devfeed.tech/topics/web.md>), [async/await](<https://devfeed.tech/topics/async-await.md>), [Code](<https://devfeed.tech/topics/code.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [await](<https://devfeed.tech/tags/await.md>), [code](<https://devfeed.tech/tags/code.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [event](<https://devfeed.tech/tags/event.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [messaging](<https://devfeed.tech/tags/messaging.md>), [thread](<https://devfeed.tech/tags/thread.md>), [web](<https://devfeed.tech/tags/web.md>), [worker](<https://devfeed.tech/tags/worker.md>)

### AI overview

This tutorial presents a Promise-based wrapper for Web Worker messaging. It explains how unique message identifiers map worker responses to stored promises, allowing the main thread to resolve or reject the corresponding promise and use async/await with simpler error handling. The same pattern can also be applied to Service Workers.

### Source excerpt

If you've ever used Web Workers (or any other event-based communication), you probably noticed that this kind of code can be hard to read and reason about. You also have to implement some kind of identifier for each message to recognize which worker response corresponds to which request. To simplify that, we can write a small wrapper that lets us use Promises to communicate with Workers. I'll show you an example for Web Workers, but the same pattern can be applied to Service Workers as well. The resulting API looks like this: const workerResponse = await sendToWorker(data); I first used this approach in Pulsar, because I wanted to parse and execute the user's code in a Web Worker, but also wait for the worker to finish before providing data for the next frame. Implementation # The idea is fairly simple - before sending a message to the worker, we create a unique id and a promise. We store the promise in a map using the id as the key. Then we send an event to the worker, including both the data and the id, and return the promise to the caller. When the worker finishes its calculation, it sends back a message that includes the result and the same id. In the main thread, we listen for these messages. When one arrives, we use the id to find the corresponding promise in our map. Finally, based on the worker's result, we resolve or reject that promise. It might sound like a lot, but the code is actually quite straightforward: send-to-worker.jsCopy // Worker initialization const worker = new Worker("./path-to-your-worker.js"); // Map of promises const promises = {}; worker.addEventListener("message", (e) => { // Listen to worker messages and find the correct promise matching the id // Then resolve or reject it depending on the response if (e.data.error) { promises[e.data.id].reject(e.data.error); } else { promises[e.data.id].resolve(e.data.data); } // Remove the resolver reference delete promises[e.data.id]; }); // For identifiers it is safe to use a simple integer // whic

## Kotlin Coroutines and JavaScript

DevFeed: [Kotlin Coroutines and JavaScript](<https://devfeed.tech/articles/kotlin-coroutines-and-javascript-39323.md>)

Original publisher: [Read original article](<https://kt.academy/article/interop-coroutines-js>)

Published: 2025-09-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [React](<https://devfeed.tech/topics/react.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [callback](<https://devfeed.tech/tags/callback.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [react](<https://devfeed.tech/tags/react.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains how to make Kotlin Coroutines APIs usable from JavaScript and TypeScript projects. It covers converting suspending functions to JavaScript async functions, exposing Flow values through callbacks or wrapper classes, and calling regular or promise-returning JavaScript functions from Kotlin Coroutines.

### Source excerpt

How to use Kotlin Coroutines in JavaScript projects, or JavaScript libraries from Kotlin Coroutines.

## Queueing Without a Queue: Enter fastq

DevFeed: [Queueing Without a Queue: Enter fastq](<https://devfeed.tech/articles/queueing-without-a-queue-enter-fastq-17871.md>)

Original publisher: [Read original article](<https://www.codemotion.com/magazine/backend/software-architecture/queueing-without-a-queue-enter-fastq/>)

Author: Puppo92

Published: 2025-02-10T10:08:09Z

Content type: tutorial

Language: en

Sources: [Backend Job: skill, salary and insights - Codemotion Magazine](<https://devfeed.tech/sources/backend-job-skill-salary-and-insights-codemotion-magazine.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [callback](<https://devfeed.tech/tags/callback.md>), [collina](<https://devfeed.tech/tags/collina.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [memory](<https://devfeed.tech/tags/memory.md>), [node](<https://devfeed.tech/tags/node.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [npm](<https://devfeed.tech/tags/npm.md>), [queue](<https://devfeed.tech/tags/queue.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>)

### AI overview

This tutorial introduces fastq, an npm package for Node.js that provides in-memory queues for decoupling processes when a conventional queue is unavailable or unnecessary. It explains installation, the package's data-loss limitation when a process stops, and worker functions using callback or promise-based error handling.

### Source excerpt

How often have you needed to decouple processes using a queue, only to find that you didn't have one due to limitations such as resource constraints or the inability to install additional software? In this series, I'll show you how to solve this problem by using different libraries of tools that help you resolve it... Read more The post Queueing Without a Queue: Enter fastq appeared first on Codemotion Magazine.

## Keycloak 26.0.4 released

DevFeed: [Keycloak 26.0.4 released](<https://devfeed.tech/articles/keycloak-26-0-4-released-31662.md>)

Original publisher: [Read original article](<https://www.keycloak.org/2024/10/keycloak-2604-released>)

Author: Keycloak Team

Published: 2024-10-30T00:00:00Z

Content type: release

Language: en

Sources: [Keycloak Blog](<https://devfeed.tech/sources/keycloak-blog.md>)

Topics: [Keycloak](<https://devfeed.tech/topics/keycloak.md>), [LDAP](<https://devfeed.tech/topics/ldap.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [bugs](<https://devfeed.tech/tags/bugs.md>), [changes](<https://devfeed.tech/tags/changes.md>), [idm](<https://devfeed.tech/tags/idm.md>), [kerberos](<https://devfeed.tech/tags/kerberos.md>), [keycloak](<https://devfeed.tech/tags/keycloak.md>), [keycloak-release](<https://devfeed.tech/tags/keycloak-release.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [ldap](<https://devfeed.tech/tags/ldap.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [release](<https://devfeed.tech/tags/release.md>), [saml](<https://devfeed.tech/tags/saml.md>), [sso](<https://devfeed.tech/tags/sso.md>)

### AI overview

Keycloak 26.0.4 is released with enhancements and fixes covering the admin client, documentation, authorization JavaScript adapter behavior, authentication retry handling, distributed client scope updates, email security, password policy validation, LDAP operations, and user session processing.

### Source excerpt

To download the release go to Keycloak downloads. Upgrading Before upgrading refer to the migration guide for a complete list of changes. All resolved issues Enhancements #34284 Keycloak-admin-client should work with the future versions of Keycloak server admin/client-java #34382 Make the organization chapter of Server Admin guide available on downstream Bugs #14562 Broken Promise implementation for AuthZ JS adapter/javascript #25917 Allow increasing wait time on each failure after the max number of failures is reached authentication #33627 ClassNotFoundException OracleXADataSource/OracleDataSource using IDELauncher with Keycloak 26.0.0 dist/quarkus #33731 Client Scope updates are not replicated on a distributed keycloak setup in kubernetes admin/api #33798 CVE-2021-44549 - org.eclipse.angus/angus-mail: Enabling Secure Server Identity Checks for Safer SMTPS Communication dist/quarkus #33987 keycloak.v2 registration: Password policy validation error "errorList is null" login/ui #34042 LDAP Pagination not working for role membership in GET_ROLES_FROM_USER_MEMBEROF_ATTRIBUTE strategy ldap #34050 Listing federated LDAP users is very slow with import enabled ldap #34093 java.util.ConcurrentModificationException when process user sessions update infinispan #34412 LDAP: searching users with import disabled is slower since fix for 34050 ldap

## How to fetch data with React Hooks

DevFeed: [How to fetch data with React Hooks](<https://devfeed.tech/articles/how-to-fetch-data-with-react-hooks-18964.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-hooks-fetch-data/>)

Author: Robin Wieruch

Published: 2024-10-21T11:50:46Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [data](<https://devfeed.tech/topics/data.md>), [client](<https://devfeed.tech/topics/client.md>), [axios](<https://devfeed.tech/topics/axios.md>), [API](<https://devfeed.tech/topics/api.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [async](<https://devfeed.tech/tags/async.md>), [await](<https://devfeed.tech/tags/await.md>), [axios](<https://devfeed.tech/tags/axios.md>), [beginners](<https://devfeed.tech/tags/beginners.md>), [browser](<https://devfeed.tech/tags/browser.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [component](<https://devfeed.tech/tags/component.md>), [effect](<https://devfeed.tech/tags/effect.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [fundamentals](<https://devfeed.tech/tags/fundamentals.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [learn](<https://devfeed.tech/tags/learn.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [react](<https://devfeed.tech/tags/react.md>), [react-fetch-data-hooks](<https://devfeed.tech/tags/react-fetch-data-hooks.md>), [react-hooks](<https://devfeed.tech/tags/react-hooks.md>), [state](<https://devfeed.tech/tags/state.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A tutorial on fetching data in client-side React with built-in React Hooks. It explains state and effect management, builds a reusable custom data-fetching hook using the Hacker News API, and shows how to use axios or the browser's native fetch API, including handling asynchronous effects and cleanup functions.

### Source excerpt

Learn the fundamentals about data fetching in client-side React with React Hooks ...

## Promise queues and batching concurrent tasks in Deno

DevFeed: [Promise queues and batching concurrent tasks in Deno](<https://devfeed.tech/articles/promise-queues-and-batching-concurrent-tasks-in-deno-8056.md>)

Original publisher: [Read original article](<https://snyk.io/blog/promise-queues-concurrent-tasks-deno/>)

Author: Liran Tal

Published: 2024-09-25T04:00:00Z

Content type: tutorial

Language: en

Sources: [Blog RSS Feed | Snyk](<https://devfeed.tech/sources/blog-rss-feed-snyk.md>)

Topics: [Deno](<https://devfeed.tech/topics/deno.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Security](<https://devfeed.tech/topics/security.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [application-security](<https://devfeed.tech/tags/application-security.md>), [batching](<https://devfeed.tech/tags/batching.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code-security](<https://devfeed.tech/tags/code-security.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [developer](<https://devfeed.tech/tags/developer.md>), [java](<https://devfeed.tech/tags/java.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [queue](<https://devfeed.tech/tags/queue.md>), [queuing](<https://devfeed.tech/tags/queuing.md>), [security](<https://devfeed.tech/tags/security.md>), [snyk-apprisk](<https://devfeed.tech/tags/snyk-apprisk.md>), [snyk-code](<https://devfeed.tech/tags/snyk-code.md>)

### AI overview

This tutorial explains how Promise queues and task batching can manage concurrent asynchronous tasks in Deno more efficiently. It covers JavaScript's single-threaded, event-driven model, the limitations of running many promises together, and how queuing can reduce memory pressure and prevent one failed task from causing complete failure.

### Source excerpt

Learn how to create secure applications using Deno. Explore the default security measures provided by Deno, understand potential vulnerabilities such as Server-Side Request Forgery (SSRF), and uncover the best practices for minimizing risks. Enhance your application's security by leveraging Deno's advanced features.

## Introducing the WebAssembly JavaScript Promise Integration API

DevFeed: [Introducing the WebAssembly JavaScript Promise Integration API](<https://devfeed.tech/articles/introducing-the-webassembly-javascript-promise-integration-api-3526.md>)

Original publisher: [Read original article](<https://v8.dev/blog/jspi>)

Author: Francis McCabe, Thibaud Michaud, Ilya Rezvov, Brendan Dahl

Published: 2024-07-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [V8](<https://devfeed.tech/sources/v8.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [API](<https://devfeed.tech/topics/api.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Web APIs](<https://devfeed.tech/topics/web-apis.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [code](<https://devfeed.tech/tags/code.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [web](<https://devfeed.tech/tags/web.md>), [web-apis](<https://devfeed.tech/tags/web-apis.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

This article introduces the WebAssembly JavaScript Promise Integration (JSPI) API. JSPI enables WebAssembly applications designed around synchronous APIs to work with asynchronous JavaScript and Web APIs by suspending execution during asynchronous operations and resuming it when they complete. The approach requires few changes to the WebAssembly application and is illustrated with development guidance and examples.

### Source excerpt

The JavaScript Promise Integration (JSPI) API allows WebAssembly applications that were written assuming synchronous access to external functionality to operate smoothly in an environment where the functionality is actually asynchronous. This note outlines what the core capabilities of the JSPI API are, how to access it, how to develop software for it and offers some examples to try out. What is 'JSPI' for? # Asynchronous APIs operate by separating the initiation of the operation from its resolution; with the latter coming some time after the first. Most importantly, the application continues execution after kicking off the operation; and is then notified when the operation completes. For example, using the fetch API, Web applications can access the contents associated with a URL; however, the fetch function does not directly return the results of the fetch; instead it returns a Promise object. The connection between the fetch response and the original request is reestablished by attaching a callback to that Promise object. The callback function can inspect the response and collect the data (if it is there of course). On the other hand, many cases C/C++ (and many other languages) applications are originally written against a synchronous API. For example, the Posix read function does not complete until the I/O operation is complete: the read function blocks until the read is complete. However, it is not permitted to block the browser's main thread; and many environments are not supportive of synchronous programming. The result is a mismatch between the desires of the application programmer for a simple to use API and the wider ecosystem that requires I/O to be crafted with asynchronous code. This is especially a problem for existing legacy applications that would be expensive to port. The JSPI is an API that bridges the gap between synchronous applications and asynchronous Web APIs. It works by intercepting Promise objects returned by asynchronous Web API functions a

## Fastify plugins as building blocks for a backend Node.js API

DevFeed: [Fastify plugins as building blocks for a backend Node.js API](<https://devfeed.tech/articles/fastify-plugins-as-building-blocks-for-a-backend-node-js-api-7915.md>)

Original publisher: [Read original article](<https://snyk.io/blog/fastify-plugins-for-backend-node-js-api/>)

Author: Liran Tal

Published: 2024-05-28T05:00:00Z

Content type: article

Language: en

Sources: [Blog RSS Feed | Snyk](<https://devfeed.tech/sources/blog-rss-feed-snyk.md>)

Topics: [Fastify](<https://devfeed.tech/topics/fastify.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [API](<https://devfeed.tech/topics/api.md>), [Application Development](<https://devfeed.tech/topics/application-development.md>), [async/await](<https://devfeed.tech/topics/async-await.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [application-security](<https://devfeed.tech/tags/application-security.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [awareness](<https://devfeed.tech/tags/awareness.md>), [backend](<https://devfeed.tech/tags/backend.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [developer](<https://devfeed.tech/tags/developer.md>), [devrel](<https://devfeed.tech/tags/devrel.md>), [ecosystem](<https://devfeed.tech/tags/ecosystem.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [node](<https://devfeed.tech/tags/node.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [performance](<https://devfeed.tech/tags/performance.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [routing](<https://devfeed.tech/tags/routing.md>), [snyk-code](<https://devfeed.tech/tags/snyk-code.md>), [snyk-open-source](<https://devfeed.tech/tags/snyk-open-source.md>), [speed](<https://devfeed.tech/tags/speed.md>), [web](<https://devfeed.tech/tags/web.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

This article presents Fastify and its plugin ecosystem as building blocks for backend Node.js APIs. It discusses Fastify's low overhead, performance-oriented architecture, open source community, native ECMAScript module support, async/await route definitions, promise-based asynchronous code, and radix-tree routing for efficient request handling.

### Source excerpt

This blog post will focus on the foundational building blocks of building backend Node.js APIs using Fastify and its recommended plugins in 2024.

## WebAssembly JSPI is going to origin trial

DevFeed: [WebAssembly JSPI is going to origin trial](<https://devfeed.tech/articles/webassembly-jspi-is-going-to-origin-trial-3528.md>)

Original publisher: [Read original article](<https://v8.dev/blog/jspi-ot>)

Author: Francis McCabe, Thibaud Michaud, Ilya Rezvov, Brendan Dahl

Published: 2024-03-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [V8](<https://devfeed.tech/sources/v8.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [API](<https://devfeed.tech/topics/api.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>), [Web APIs](<https://devfeed.tech/topics/web-apis.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [pre-release](<https://devfeed.tech/tags/pre-release.md>), [web-apis](<https://devfeed.tech/tags/web-apis.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

WebAssembly's JavaScript Promise Integration (JSPI) API is entering a Chrome M123 origin trial. It lets sequential code compiled to WebAssembly access asynchronous Web APIs by suspending a WebAssembly application when a Promise is returned and resuming it when the Promise resolves. The article explains the Emscripten requirement, origin-trial registration options, standardization status, and performance caveats related to spawned computations and garbage collection.

### Source excerpt

WebAssembly's JavaScript Promise Integration (JSPI) API is entering an origin trial, with Chrome release M123. What that means is that you can test whether you and your users can benefit from this new API. JSPI is an API that allows so-called sequential code - that has been compiled to WebAssembly - to access Web APIs that are asynchronous. Many Web APIs are crafted in terms of JavaScript Promises: instead of immediately performing the requested operation they return a Promise to do so. When the action is finally performed, the browser's task runner invokes any callbacks with the Promise. JSPI hooks into this architecture to allow a WebAssembly application to be suspended when the Promise is returned and resumed when the Promise is resolved. You can find out more about JSPI and how to use it here and the specification itself is here. Requirements # Apart from registering for an origin trial, you will also need to generate the appropriate WebAssembly and JavaScript. If you are using Emscripten, then this is straightforward. You should ensure that you are using at least version 3.1.47. Registering for the origin trial # JSPI is still pre-release; it is going through a standardization process and will not be fully released until we get to phase 4 of that process. To use it today, you can set a flag in the Chrome browser; or, you can apply for an origin trial token that will allow your users to access it without having to set the flag themselves. To register you can go here, make sure to follow the registration signup process. To find out more about origin trials in general, this is a good starting place. Some potential caveats # There have been some discussions in the WebAssembly community about some aspects of the JSPI API. As a result, there are some changes indicated, which will take time to fully work their way through the system. We anticipate that these changes will be soft launched: we will share the changes as they become available, however, the existing API wi

## Streaming, snapshots, and other new features since SvelteKit 1.0

DevFeed: [Streaming, snapshots, and other new features since SvelteKit 1.0](<https://devfeed.tech/articles/streaming-snapshots-and-other-new-features-since-sveltekit-1-0-3035.md>)

Original publisher: [Read original article](<https://svelte.dev/blog/streaming-snapshots-sveltekit>)

Author: Geoff Rich, Rich Harris

Published: 2023-02-21T00:00:00Z

Content type: article

Language: en

Sources: [Svelte blog](<https://devfeed.tech/sources/svelte-blog.md>)

Topics: [Svelte](<https://devfeed.tech/topics/svelte.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [await](<https://devfeed.tech/tags/await.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [svelte](<https://devfeed.tech/tags/svelte.md>)

### AI overview

This article describes SvelteKit features shipped since version 1.0, focusing on streaming non-essential data from nested promises in server load functions. It explains that pages can begin rendering before nested data resolves, while hosting support determines whether responses are streamed or buffered.

### Source excerpt

The Svelte team has been hard at work since the release of SvelteKit 1.0. Let's talk about some of the major new features that have shipped since launch: streaming non-essential data, snapshots, and route-level config. Stream non-essential data in load functions SvelteKit uses load functions to retrieve data for a given route. When navigating between pages, it first fetches the data, and then renders the page with the result. This could be a problem if some of the data for the page takes longer to load than others, especially if the data isn't essential - the user won't see any part of the new page until all the data is ready. There were ways to work around this. In particular, you could fetch the slow data in the component itself, so it first renders with the data from load and then starts fetching the slow data. But this was not ideal: the data is even more delayed since you don't start fetching until the client renders, and you're also having to break SvelteKit's load convention. Now, in SvelteKit 1.8, we have a new solution: you can return a nested promise from a server load function, and SvelteKit will start rendering the page before it resolves. Once it completes, the result will be streamed to the page. For example, consider the following load function: export const const load: PageServerLoadload: PageServerLoad = () => { return { post: anypost: fetchPost(), streamed: { comments: any; }streamed: { comments: anycomments: fetchComments() } }; }; SvelteKit will automatically await the fetchPost call before it starts rendering the page, since it's at the top level. However, it won't wait for the nested fetchComments call to complete - the page will render and data.streamed.comments will be a promise that will resolve as the request completes. We can show a loading state in the corresponding +page.svelte using Svelte's await block: <script lang="ts"> import type { PageData } from './$types'; export let data: PageData; </script> <article> {data.post} </article> {#a

## Asynchronous Media

DevFeed: [Asynchronous Media](<https://devfeed.tech/articles/asynchronous-media-19203.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/asynchronous-media/>)

Author: Shai Almog

Published: 2019-05-22T00:00:00Z

Content type: article

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [Image](<https://devfeed.tech/topics/image.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [cache](<https://devfeed.tech/tags/cache.md>), [features](<https://devfeed.tech/tags/features.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [ios](<https://devfeed.tech/tags/ios.md>), [media](<https://devfeed.tech/tags/media.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This developer article describes asynchronous media APIs that allow media objects to be created without blocking the current call. It also discusses rendering hints, iOS image texture caching, improved pinch-zoom rendering, a fix for oversized images rendered as black, and an uppercase input constraint.

### Source excerpt

There are a lot of fixes and new features that I don't get to cover enough as I've been busy on several fronts. One of the new features is support for asynchronous media API's. These let us create a media object without waiting for it to complete. This is very useful if you have a complex UI and want to play a media file while doing other things.

## Bundling Remote Scripts with Webpack

DevFeed: [Bundling Remote Scripts with Webpack](<https://devfeed.tech/articles/bundling-remote-scripts-with-webpack-19043.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/bundling-remote-scripts-with-webpack/>)

Author: HTTP Toolkit; Tim Perry

Published: 2019-02-07T16:45:00Z

Content type: tutorial

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [Webpack](<https://devfeed.tech/topics/webpack.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Code](<https://devfeed.tech/topics/code.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [SDK](<https://devfeed.tech/topics/sdk.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js-sdk](<https://devfeed.tech/tags/js-sdk.md>), [node](<https://devfeed.tech/tags/node.md>), [npm](<https://devfeed.tech/tags/npm.md>), [script](<https://devfeed.tech/tags/script.md>), [webpack](<https://devfeed.tech/tags/webpack.md>)

### AI overview

This tutorial explains how to bundle JavaScript files that are available only from remote CDNs. It presents webpack's val loader, which executes a Node module at build time, waits for an exported function or promise, and bundles the resulting content through an import or require.

### Source excerpt

As a JavaScript developer nowadays, almost everything you use comes from npm. Unfortunately, not absolutely everything: there's still a small subset of scripts that expect to be included from a remote CDN somewhere, and when bundling your application these pose a problem. You could use these scripts from the CDN, as intended. If you do so you'll lose opportunities for bundling benefits like tree shaking, but more importantly you now have to independently load scripts from one more domain at the same time as your other bundle(s). That means another point of failure, and means you need logic in your main app to wait until the remote script has loaded before using it, and to potentially handle loading failures too. Instead, you could download the script directly, save it into your codebase ('vendor' it), and treat it like your own source. What if it changes though? Many of these CDN scripts change frequently, so you'll need to repeatedly update this, and every change is extra noise and mess in your codebase & git history. I hit this recently working on HTTP Toolkit trying to use the JS SDK for a 3rd party service, which is only available from a CDN, and isn't published on npm. Fortunately, there's another option: webpack can solve this for us. Val Loader Webpack's little-known val loader allows you to easily define your own loading logic that is run at build time. When you load a file with most webpack loaders they read the file, transform the content somehow, and add some content to your bundle, which will later be returned from the initial import/require statement. When you load a file with val loader however it: Executes the file contents as a node module Looks for an exported function or promise from the module Waits on the promise/calls the function (which may in turn return a promise) Takes the code property from the final result, and uses this as the content to be bundled and returned by the original import/require This means you can write a simple node script t

## My Journey replacing Promises with RxJS

DevFeed: [My Journey replacing Promises with RxJS](<https://devfeed.tech/articles/my-journey-replacing-promises-with-rxjs-21332.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2018/10/journey-promises-to-rxjs/>)

Published: 2018-09-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [code-review](<https://devfeed.tech/tags/code-review.md>), [front-end](<https://devfeed.tech/tags/front-end.md>), [guest-post](<https://devfeed.tech/tags/guest-post.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [rxjs](<https://devfeed.tech/tags/rxjs.md>)

### AI overview

A guest post describes refactoring an Angular application that uses Microsoft Graph and SharePoint APIs from Promise-based HTTP request handling toward RxJS Observables. It explains the original parallel and sequential request flow and the motivation for adopting a reactive approach.

### Source excerpt

Lorem ipsum dolor sit amet

## Javascript's async/await and Promise in a few words

DevFeed: [Javascript's async/await and Promise in a few words](<https://devfeed.tech/articles/javascript-s-async-await-and-promise-in-a-few-words-35422.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/javascripts-async-await-and-promise-in-a-few-words/>)

Author: Graham King

Published: 2018-07-27T14:30:45Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [async/await](<https://devfeed.tech/topics/async-await.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [callback](<https://devfeed.tech/topics/callback.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [await](<https://devfeed.tech/tags/await.md>), [callback](<https://devfeed.tech/tags/callback.md>), [exception](<https://devfeed.tech/tags/exception.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

This tutorial explains how JavaScript uses Promises and async/await to handle operations that could otherwise block its single thread. It shows how async/await makes callback-based asynchronous code appear more linear while failures are handled through exceptions.

### Source excerpt

Unraveling the magic of async/await: From callbacks to linear code.

## Cleanse your Angular components of Route specific code

DevFeed: [Cleanse your Angular components of Route specific code](<https://devfeed.tech/articles/cleanse-your-angular-components-of-route-specific-code-16259.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2018/03/cleanse-your-angular-components>)

Author: David East

Published: 2018-03-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [Firebase Blog](<https://devfeed.tech/sources/firebase-blog.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Code](<https://devfeed.tech/topics/code.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [angularfire](<https://devfeed.tech/tags/angularfire.md>), [async](<https://devfeed.tech/tags/async.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [code](<https://devfeed.tech/tags/code.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [routing](<https://devfeed.tech/tags/routing.md>)

### AI overview

This tutorial explains how to move route-specific authentication and redirect logic out of Angular components and into reusable Route Guards. It describes identifying routing code, creating a guard, configuring routes, and reducing asynchronous-flow complexity in components.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## A first look at Async React + Apollo

DevFeed: [A first look at Async React + Apollo](<https://devfeed.tech/articles/a-first-look-at-async-react-apollo-23119.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/a-first-look-at-async-react-apollo>)

Author: Peggy Rayzis

Published: 2018-03-01T05:04:00Z

Content type: article

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [announcement](<https://devfeed.tech/tags/announcement.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [applications](<https://devfeed.tech/tags/applications.md>), [async](<https://devfeed.tech/tags/async.md>), [demo](<https://devfeed.tech/tags/demo.md>), [devices](<https://devfeed.tech/tags/devices.md>), [features](<https://devfeed.tech/tags/features.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [networks](<https://devfeed.tech/tags/networks.md>), [react](<https://devfeed.tech/tags/react.md>)

### AI overview

The Apollo team describes its early work making React Apollo compatible with async React features, including time slicing and Suspense. The article explains how GraphQL query results can suspend rendering by throwing a promise while data is loading, allowing a parent component to display fallback UI.

### Source excerpt

Like many members of the React community, the Apollo team eagerly woke up at 5:00 AM to catch Dan Abramov's talk on the future of React at JSConf Iceland. With big mugs of coffee in hand, we glued ourselves to our laptops and watched as Dan explained how React async rendering would allow us to adapt our applications to our users' many devices and networks. Showcasing two outstanding demos, Dan illustrated some of async React's new features such as time slicing and suspense.

## Simple JavaScript API wrapper

DevFeed: [Simple JavaScript API wrapper](<https://devfeed.tech/articles/simple-javascript-api-wrapper-37352.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/simple-javascript-api-wrapper/>)

Author: Stanko

Published: 2017-12-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [fetch](<https://devfeed.tech/topics/fetch.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [es2015](<https://devfeed.tech/tags/es2015.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [http](<https://devfeed.tech/tags/http.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [javascript-api](<https://devfeed.tech/tags/javascript-api.md>), [polyfill](<https://devfeed.tech/tags/polyfill.md>)

### AI overview

A tutorial presenting a reusable JavaScript API wrapper built around native fetch. It explains parsing successful responses, converting HTTP failures and unresolved requests into custom errors, and handling the returned Promise. The code is provided as a native ES2015 module with usage examples and a CodePen demo using the Star Wars API.

### Source excerpt

For handling API calls I have a small snippet I'm copying from project to project. I decided to clean it up, make more generic and share it. It is intended to be a starting point, so you might want to customize it to your custom needs. What it does? # It is a simple wrapper around native fetch.If you need a polyfill isomorphic-fetch is a great one. For successful requests it will parse the response and return it. When HTTP error occursIt detects errors based on request's HTTP status. it will throw a custom error with status code, error message and response (parsed if it is a JSON). If request never gets resolved, same custom error will be thrown but response will be set to null and status code to REQUEST_FAILED. Please note that function will return a Promise so you need to handle how it resolves. Code # It is written as a native ES2015 module, which means you may need to transpile it depending on your browser support policy. // ------------------------------------------------------ // // Simple JavaScript API wrapper // https://muffinman.io/blog/simple-javascript-api-wrapper // ------------------------------------------------------ // // For demo purposes I'm using this awesome Star Wars API const API_URL = 'https://swapi.tech/api'; // Custom API error to throw function ApiError(message, data, status) { let response = null; let isObject = false; // We are trying to parse response try { response = JSON.parse(data); isObject = true; } catch (e) { response = data; } this.response = response; this.message = message; this.status = status; this.toString = function () { return `${ this.message }\nResponse:\n${ isObject ? JSON.stringify(this.response, null, 2) : this.response }`; }; } // API wrapper function const fetchResource = (path, userOptions = {}) => { // Define default options const defaultOptions = {}; // Define default headers const defaultHeaders = {}; const options = { // Merge options ...defaultOptions, ...userOptions, // Merge headers headers: { ...defaultHea

## Promises in JavaScript

DevFeed: [Promises in JavaScript](<https://devfeed.tech/articles/promises-in-javascript-26289.md>)

Original publisher: [Read original article](<https://masnun.com/promises-in-javascript/>)

Author: masnun

Published: 2017-08-11T10:33:42Z

Content type: tutorial

Language: en

Sources: [Abu Ashraf Masnun](<https://devfeed.tech/sources/abu-ashraf-masnun.md>)

Topics: [Promise](<https://devfeed.tech/topics/promise.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [async](<https://devfeed.tech/topics/async.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [callback](<https://devfeed.tech/tags/callback.md>), [function](<https://devfeed.tech/tags/function.md>), [javascript](<https://devfeed.tech/tags/javascript.md>)

### AI overview

A tutorial explaining JavaScript Promises, why they are useful for asynchronous operations, and how they help replace nested callbacks with cleaner code. It introduces consuming and creating promises, including resolving and rejecting them.

### Source excerpt

We encounter promises in real life every now and then. You have promised to deliver that project within the next week. Your friend has promised to play Overwatch with you tonight. If you think about it, promises are everywhere around us. Promises in JavaScript also play similar roles. A Promise object in JS is an [...] The post Promises in JavaScript appeared first on Abu Ashraf Masnun.

## Managing asynchronous work with promises in Cloud Functions for Firebase

DevFeed: [Managing asynchronous work with promises in Cloud Functions for Firebase](<https://devfeed.tech/articles/keep-your-promises-when-using-cloud-functions-for-firebase-16203.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2017/06/keep-your-promises-when-using-cloud>)

Author: Doug Stevenson

Published: 2017-06-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Firebase Blog](<https://devfeed.tech/sources/firebase-blog.md>)

Topics: [Cloud Functions](<https://devfeed.tech/topics/cloud-functions.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Back end](<https://devfeed.tech/topics/backend.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [backend](<https://devfeed.tech/tags/backend.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [cloud-functions](<https://devfeed.tech/tags/cloud-functions.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

### AI overview

This tutorial explains how JavaScript promises manage asynchronous work in Cloud Functions for Firebase. It describes returning a promise that resolves after all asynchronous work is complete and distinguishes sequential promise chaining from parallel work.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Empire Node 2016

DevFeed: [Empire Node 2016](<https://devfeed.tech/articles/empire-node-2016-32300.md>)

Original publisher: [Read original article](<https://jack.ofspades.com/empire-node-2016/>)

Author: Jack Tarantino

Published: 2016-11-08T22:57:34Z

Content type: article

Language: en

Sources: [Jacopo Tarantino](<https://devfeed.tech/sources/jacopo-tarantino.md>)

Topics: [code style](<https://devfeed.tech/topics/code-style.md>), [ESLint](<https://devfeed.tech/topics/eslint.md>), [React](<https://devfeed.tech/topics/react.md>), [Redux](<https://devfeed.tech/topics/redux.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [CommonJS](<https://devfeed.tech/topics/commonjs.md>), [middleware](<https://devfeed.tech/topics/middleware.md>)

Tags: [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [code-style](<https://devfeed.tech/tags/code-style.md>), [commonjs](<https://devfeed.tech/tags/commonjs.md>), [empire-node](<https://devfeed.tech/tags/empire-node.md>), [eslint](<https://devfeed.tech/tags/eslint.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [modules](<https://devfeed.tech/tags/modules.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [new-york-city](<https://devfeed.tech/tags/new-york-city.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [react](<https://devfeed.tech/tags/react.md>), [redux](<https://devfeed.tech/tags/redux.md>)

### AI overview

Notes from Empire Node 2016 cover talks about HyperTerm and its React and Redux plugin architecture, ESLint rules and coding practices, and MongoDB, along with other programming topics.

### Source excerpt

Yesterday I had the good fortune to attend Empire Node at The National Museum of the American Indian, courtesy of InRhythm. A good time was had by all and we got to see some great talks! There was programmable music, smart ways to get into code style linting and, of

## Untangling Deeply-Nested Promise Chains

DevFeed: [Untangling Deeply-Nested Promise Chains](<https://devfeed.tech/articles/untangling-deeply-nested-promise-chains-29531.md>)

Original publisher: [Read original article](<https://philipwalton.com/articles/untangling-deeply-nested-promise-chains/>)

Published: 2016-08-17T14:53:31Z

Content type: article

Language: en

Sources: [Philip Walton](<https://devfeed.tech/sources/philip-walton.md>)

Topics: [Promise](<https://devfeed.tech/topics/promise.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Web APIs](<https://devfeed.tech/topics/web-apis.md>), [async](<https://devfeed.tech/topics/async.md>), [Caching](<https://devfeed.tech/topics/caching.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [callback](<https://devfeed.tech/tags/callback.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

### AI overview

The article examines how promise-based Service Worker code can become deeply nested and difficult to understand, despite promises being intended to improve on callback-heavy code. It discusses a network-first strategy with cache fallback for offline support and presents refactoring strategies, software development practices, and async functions to improve readability and maintainability.

### Source excerpt

If you've been writing JavaScript for a while, you've probably heard terms like callback hell or the pyramid of doom. When promises were added to JavaScript a few years ago, I remember reading a lot of blog posts claiming that these problems would be solved; unfortunately, that was a little too optimistic. With more and more web APIs becoming promise-based, we've proven that even promises don't prevent us from writing overly-nested, hard-to-read code.

## Async Iterable/Enumerable vs. Reactive-Streams

DevFeed: [Async Iterable/Enumerable vs. Reactive-Streams](<https://devfeed.tech/articles/async-iterable-enumerable-vs-reactive-streams-24803.md>)

Original publisher: [Read original article](<https://akarnokd.blogspot.com/2016/05/async-iterableenumerable-vs-reactive.html>)

Author: David Karnok (noreply@blogger.com)

Published: 2016-05-02T13:54:00Z

Content type: comparison

Language: en

Sources: [Akarnokd - Advanced RxJava](<https://devfeed.tech/sources/akarnokd-advanced-rxjava.md>)

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [Java](<https://devfeed.tech/topics/java.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Library](<https://devfeed.tech/topics/library.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [backpressure](<https://devfeed.tech/tags/backpressure.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [library](<https://devfeed.tech/tags/library.md>), [reactive-streams](<https://devfeed.tech/tags/reactive-streams.md>)

### AI overview

This article compares Java Async Iterables, also called Async Enumerables in C#, with RxJava and Reactive Streams. It explains how asynchronous MoveNext operations provide backpressure and describes a Java 8 implementation using IAsyncEnumerable, IAsyncEnumerator, CompletionStage, and cancellation support.

### Source excerpt

Introduction Backpressure is essential if one wants to avoid buffer bloat and excessive memory usage if two stages in a reactive pipeline consume events with different speed. RxJava and Reactive-Streams developed a non-blocking, request-coordinating protocol to solve this problem, but you may have heard there are alternatives to it. One alternative that comes up from time to time is Async Iterables (Java terminology) or Async Enumerables (C# terminology). In fact Rx.NET has an Ix.NET (stands for Interactive Extensions) sub-project in which there is the Async Enumerables library. It solves this backpressure problem by having a Task (~ CompletableFuture, ~ Promise) returned from its MoveNext() (~ hasNext()) method and when that Task fires, you can consume the Current property (~ next() method). The backpressure behavior comes from the fact that you'd call MoveNext() again only after you processed the the current element. Unfortunately, I haven't found a Java implementation for the IAsyncEnumerable (haven't really looked beyond a few Google searches), so I decided I'll implement it on my own in Java 8, see what it takes to get data across with it and how performant is it compared to my current cutting-edge understanding of reactive-flows: the Reactive-Streams-Commons library. Base API Since Async Enumerables are designed in deferred execution in mind, the base API consists of two interfaces: interface IAsyncEnumerable<T> { IAsyncEnumerator<T> enumerator(); } interface IAsyncEnumerator<T> { CompletionStage<Boolean> moveNext(CompositeSubscription cancel); T current(); } The IAsyncEnumerable is the equivalent of Iterable and it hands out IAsyncEnumerators. IAsyncEnumerator has a moveNext method which returns a CompletionStage indicating if there is value available via current() (signals true) or the sequence ended (signals false). C# CancellationToken looks like our CompositeSubscription so I'm reusing it as the way for cancellation. (Sidenote: I'm not sure how cancellati

## 10 Interview Questions Every JavaScript Developer Should Know

DevFeed: [10 Interview Questions Every JavaScript Developer Should Know](<https://devfeed.tech/articles/10-interview-questions-every-javascript-developer-should-know-21266.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2015/10/link-10-javascript-interview-questions/>)

Published: 2015-10-04T00:00:00Z

Content type: opinion

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [architectures](<https://devfeed.tech/tags/architectures.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [developer](<https://devfeed.tech/tags/developer.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interview](<https://devfeed.tech/tags/interview.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A recommended set of ten interview questions for JavaScript developers covering programming paradigms, functional and object-oriented programming, classical and prototypal inheritance, data flow, software architectures, and asynchronous programming.

### Source excerpt

Lorem ipsum dolor sit amet

## $q.defer: You're doing it wrong

DevFeed: [$q.defer: You're doing it wrong](<https://devfeed.tech/articles/q-defer-you-re-doing-it-wrong-21259.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2015/09/link-angular-defer/>)

Published: 2015-09-24T00:00:00Z

Content type: opinion

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [article](<https://devfeed.tech/tags/article.md>), [callback](<https://devfeed.tech/tags/callback.md>), [defer](<https://devfeed.tech/tags/defer.md>)

### AI overview

An article discusses common mistakes when using Angular deferreds and promises, recommending simple deferrals for simple cases, promise chaining when possible, and custom deferreds when wrapping callback-based APIs.

### Source excerpt

Lorem ipsum dolor sit amet

[Next page](<https://devfeed.tech/topics/promise.md?cursor=WyIyMDE1LTA5LTI0VDAwOjAwOjAwKzAwOjAwIiwgIjJmYzk0YTNiLTQ3MmEtNGI0Zi1hNzJiLWQ4NjgzYmQwODYyMCJd>)