iluwatar / iluwatar/java-design-patterns

Asynchronous Page pattern

Open
#1,265 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description:
The Asynchronous Page Design Pattern allows for the decoupling of long-running tasks from the main flow of a web page, providing a more responsive and interactive user experience. This pattern is particularly useful for web applications where certain operations, like data retrieval or processing, can take a significant amount of time and would otherwise block the user interface.

Main elements of the pattern:

  • Client-Side Asynchronous Call: Initiate an asynchronous request from the client side using JavaScript (AJAX, Fetch API, etc.).
  • Server-Side Processing: Handle the asynchronous request on the server side, processing the task in a non-blocking manner.
  • Polling or Callback Mechanism: Update the client with the status of the request, either through polling, long-polling, or server-sent events.
  • User Feedback: Provide immediate feedback to the user, indicating that the request is being processed, and update the UI once the processing is complete.

References:

  1. Java Design Patterns - Contribution Guidelines
  2. Asynchronous Page Design Pattern - Google Books

Acceptance Criteria:

  1. Implement a client-side example demonstrating the initiation of an asynchronous request and handling the response.
  2. Develop a server-side component that processes the asynchronous request in a non-blocking manner and communicates the status back to the client.
  3. Provide clear documentation and usage instructions, including code comments and a README file explaining how to run and test the implementation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are named. Start by reviewing the repository contribution guidelines and the linked Asynchronous Page pattern reference, then locate the appropriate pattern structure. Done means a runnable client/server example, non-blocking status updates, usage documentation, and a README covering how to run and test it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
backend, frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.