I recently learned about Promises, which seemed similar to SQL Transactions.
-
Transactions are all or nothing
-
Promises are sequential callbacks
Are they different implementations of the same concept to handle asynchronous events?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Promises are a general concept dealing with asynchronousness. Transactions are a means to guarantee atomicity when updating multiple records.
They might appear together in some library but they are not related. You could see them together if you have a transactional database that has an asynchronous API.