Skip to content

Sparklybadge024/Async_Programming_Scenarios

Repository files navigation

Async Programming Scenarios in JavaScript

This repository contains real-world scenarios implemented using JavaScript Promises and asynchronous programming techniques.

๐Ÿ“‚ Scenarios

  1. User Authentication

    • Check username and password with async simulation.
    • Add new users and assign passwords.
  2. Image Loading

    • Simulates async image loading.
    • Uses Promise.race, Promise.allSettled, and error handling.
  3. User Profiles & Posts

    • Fetch profiles and posts asynchronously.
    • Examples in parallel, series, and extended details.
  4. Competing Servers (Promise.race)

    • Simulates fetching from multiple servers with random delays.
    • Demonstrates Promise.race() behavior.
  5. Weather API Simulation Simulates fetching weather information asynchronously with random delays and errors.

    • Learnings: Handling promises with setTimeout, simulating real-world API delays.
  6. File Download Progress Simulation

    • This project simulates file downloading with progress updates and intermittent connection interruptions. It demonstrates asynchronous JavaScript using Promises and setTimeout to mimic real-world file downloads.
  7. API Batching

    • This project demonstrates API call batching in JavaScript using Promises. It simulates multiple API requests with random success/failure and allows processing them in batches, ensuring efficient and controlled execution.
  8. Order Processing

    • Currently in prograss but i have made this project based on the research i did on e-commerce backend operation and made a simulation of of the processes involved while processing an operation.

๐Ÿš€ Goal

This repo is part of my journey to master asynchronous programming in JavaScript. Each scenario reflects real-world cases where async logic is crucial.

About

Creative real-world async JS scenarios using Promises.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published