简体   繁体   English

.NET AWS 无服务器项目

[英].NET AWS Serverless project

We create a new project and we would like to try to use lambda in aws (functions in azure) and create serverless application.我们创建了一个新项目,我们想尝试在 aws 中使用 lambda(Azure 中的函数)并创建无服务器应用程序。 The project for now isn't so big but the project has potencional been huge.目前的项目还不算大,但项目潜力巨大。 Do you think is it a good idea?你认为这是个好主意吗? And can I still use some patterns like cqrs, clean architecture etc.?我还能使用一些模式,比如 cqrs、干净的架构等吗? Because I don't want to write all logic to function handler.因为我不想将所有逻辑都写入 function 处理程序。 But I don't know if it is ok.但是不知道行不行。

Thank you for your help谢谢您的帮助

It is always better to use Lambda (serverless functions) for specific functionality and not as a whole application.将 Lambda(无服务器功能)用于特定功能而不是整个应用程序总是更好。 Lambda has its own limitations when it comes to uptime (15 mins), after which your lambda will have to be triggered again. Lambda 在正常运行时间(15 分钟)方面有其自身的限制,之后必须再次触发您的 lambda。 However, it gives excellent benefit on horizontal scaling, performing the functionality much faster for example when you have to insert messages to SQS queue or dynamodb.但是,它在水平扩展方面提供了极大的好处,例如当您必须将消息插入 SQS 队列或 dynamodb 时,执行该功能的速度要快得多。 You can build lambda with cqrs, nice architecture, api calls, tests etc as usual.您可以像往常一样使用 cqrs、漂亮的架构、api 调用、测试等构建 lambda。 But it is ideal not to dump too many functionalities in single lambda function.但最好不要在单个 lambda function 中转储太多功能。 Keept it simple.保持简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM