Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AWS 无服务器客户端轮询模式


客户端轮询模式

客户端轮询是一种获取长时间运行的事务状态信息的标准方法。

它允许客户端使用消息 ID 来确定进程是否已完成。


客户端轮询的工作原理

当进程完成时,步骤函数会使用数据和进程状态更新 DynamoDB 数据库。

当将“完成”状态返回给客户端时,客户端会向结果端点请求结果。

如果进程中没有任何变化,则服务必须每 30 秒回答一次客户端的请求。

这使得这种方法效率低下。


优点和缺点

下表显示了客户端轮询模式的优点和缺点

优点 缺点
轻松替换同步流程 产生额外的延迟
增加不必要的工作
产生更高的成本

客户端轮询模式视频

W3schools.com 与 Amazon Web Services 合作,为我们的学生提供数字培训内容。


AWS 无服务器练习

通过练习测试自己

练习

什么是客户端轮询?

Client polling is a standard method for obtaining  information on a long-running transaction.

开始练习


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.