question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move to async/await. Get rid of callback hell

See original GitHub issue

Currently (1.8pre), Etherpad code base is heavily based on callbacks. While this made sense at the time (~2011) JS ecosystem has moved forward, and better solutions exist.

We should investigate the possibility of migrating the code base to an async/await paradigm, in order to make the code easier on the eye of future contributors.

This move was anticipated in #3424. It is now time to start discussing it concretely.

As usual, the first concern is maintaining stability: this change is going to be wide, but should be as shallow as possible, ideally not containing any new functionality work. After this, hopefully the code base will be easier to reason about, less buggy, and new features will be easier to implement.

Edit: the Pull Request that implements this change is #3559.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:27 (27 by maintainers)

github_iconTop GitHub Comments

4reactions
muxatorcommented, Feb 8, 2019

Branch raybellis/async-PR is now deployed on https://beta.etherpad.org/ to allow widespread testing.

It will be periodically updated while the branch is audited.

1reaction
Wikinautcommented, Feb 28, 2019

Are you interested in the list of my plugins which run (on the async version) without apparent issues?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get rid of callback hell with async/await | by Chetan Raj
In this article, I will be explaining how to write code that is easier to read and understand using async/await.
Read more >
JavaScript: from Callback Hell to Async/Await
In this (short) tutorial, we will explore how Promises can be used to linearize a code relying on asynchronous functions.
Read more >
Callback Hell and How to Rescue it
All you have to do is write the word async before any regular function and it becomes a promise. In other words async/await...
Read more >
Node.js - Async Your Way out of Callback Hell with ...
Here, asyncFun is an async function which captures the promised result using await. This has made the code readable and a major convenience...
Read more >
How to escape async/await hell
While working with Asynchronous JavaScript, people often write multiple statements one after the other and slap an await before a function call.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found