AWS Lambda处理速度更快(AWS Lambda faster process way)
目前,我正在实施基于S3,Lambda和DynamoDB的解决方案。 我的用例是,当在S3上上传新对象时,调用第一个Lambda函数,下载新文件,将其拆分为大约100个(或更多)部分,并为每个部分添加其他信息。 下一步,每个部分将由第二个Lambda函数处理,在某些情况下,将在DynamoDB中执行插入。
我的问题只是关于称为“第二个lambda”的最佳方式。 我的意思是,更快的方式。 我想同时执行100 Lambda函数(如果我要处理100个部分)。
我知道有不同的可能性:
1)我的第一个Lambda函数可以将每个部分作为Kinesis流中的项目推送,我的第二个Lambda函数将做出反应,检索项目并对其进行处理。 在这种情况下,我不知道AWS是否会在每次流中有剩余项目时启动新的Lambda函数。 也许有一些限制......
2)我的第一个Lambda函数可以推送SNS主题中的每个部分,然后我的第二个Lambda将对每个新消息做出反应。 在这种情况下,我对延迟(通过SNS主题发送消息的操作与我的第二个Lambda函数执行的时间之间的时间)有一些疑问。
3)我的第一个Lambda函数可以通过执行API调用并传递信息直接启动第二个。 在这种情况下,我不知道我是否可以同时启动100个Lambda功能。 我想我会被AWS API的速率限制所困扰(我说,我想!)
有人有反馈意见,可能会就我的用例提出建议吗? 再一次,对我来说最重要的是拥有更快的流程方式。
谢谢
Currently, I'm implementing a solution based on S3, Lambda and DynamoDB. My use case is, when a new object is uploaded on S3, a first Lambda function is called, downloads the new file, splits it in around 100(or more) parts and for each of them, adds additional information. Next step, each part will be processed by second Lambda function and in some case an insert will be performed in DynamoDB.
My question is only about the best way to call the "second lambda". I mean, the faster way. I want to execute 100 Lambda function(if I'd 100 parts to process) at the same time.
I know there are different possibilities:
1) My first Lambda function can push each part as an item in a Kinesis stream and my second Lambda function will react, retrieve an item and processed it. In this case I don't know if AWS will launch a new Lambda function each time there is a remaining item in the stream. Maybe there is some limitation...
2) My first Lambda function can push each part in an SNS topic and then my second Lambda will react to each new message. In this case I've some doubts about the latency(time between the action to send a message through the SNS topic and the time to my second Lambda function to be executed).
3) My first Lambda function can launch directly the second one by performing an API call and by passing the information. In this case I have no idea if I can launch 100 Lambdas function at the same time. I think I'll be stuck by a rate limitation against the AWS API(I said, I think!)
Somebody have a feedback and maybe advises regarding my use case? One more time, the most important for me it's to have the faster process way.
Thanks
原文:https://stackoverflow.com/questions/41441771
最满意答案
1)你必须删除持久性的东西,它不会帮助找到问题,因为它没有使用正确的模板。
2)您所做的更改将使用您的模板而不是yoursite.com/customer/account/login页面生成yoursite.com/customercar/account/login页面。 这是你需要的吗?
3)你使用:
<block type="core/template" name="customercar_form_login" output="toHtml" template="customercar/form/login.phtml" ></block>
这不应该是核心/模板块,而是customer / form_login块(由块覆盖)。
4)您更改其名称,因此如果您在正确的文件中没有getChildHtml,则不会调用它。
总而言之,你应该这样做:
<customer_account_login> <reference name="customer_form_login"> <action method="setTemplate"><template>customercar/form/login.phtml</template></action> </reference> </customer_account_login>
这将说明登录块(被覆盖的)在原始页面中使用您的新模板
1) You must remove the persistent thing, it will not help finding problem as it's not using the right template.
2) The change you made, will make the yoursite.com/customercar/account/login page using your template but not the yoursite.com/customer/account/login page. Is it what you need ?
3) you use :
<block type="core/template" name="customercar_form_login" output="toHtml" template="customercar/form/login.phtml" ></block>
This is not supposed to be a core/template block but the customer/form_login block (overwritten by your block).
4) you change its name, so it won't be called if you don't have a getChildHtml in the right file.
To sum up, you should do it this way :
<customer_account_login> <reference name="customer_form_login"> <action method="setTemplate"><template>customercar/form/login.phtml</template></action> </reference> </customer_account_login>
This will say that the login block (the overwritten one) use your new template in the original page
相关问答
更多-
你如何在Magento之外生成Magento Layout XML?(How would you generate the Magento Layout XML outside of Magento?)[2022-10-14]
我认为获得XML布局的最好和最简单的方法是编写一个Magento扩展,它获取信息并呈现它或以编程方式导出它。 否则,您将不得不重新创建组合所有XML文件等的Magento逻辑,这将导致更大的代码库。 The best and easiest way I can think of getting the XML layout is by writing a Magento extension that gets the info and presents it or exports it programmat ... -
只需走这条路 app / design / frontend /'your package'/'your theme'/ layout / local.xml [所有xml文件都位于此处] 希望解决你的问题...... Simply Go to this path app/design/frontend/'your package'/'your theme'/layout/local.xml [ all xml files located here ] Hope solve your problem.... ...
-
Magento覆盖布局文件会导致重写布局重复(Magento overriding a layout file causes the overriden layout to duplicate)[2022-09-01]
好吧,我找到了答案: 我的真正问题是我对参考和块知之甚少。 我的技术问题是我引用了一个块,然后创建了一个具有不同名称的新块。 “左”块还包含导航栏的一个版本。 这导致了重复的菜单。 我的最终代码如下所示:你不应该(虽然我会在这篇文章结尾给你一些可能的想法)。 Magento的设计使得local.xml中的代码“胜过”可安装模块文件中的代码。 基本思想是local.xml是商店所有者添加布局更新以覆盖模块文件更新的地方。 这就是系统工作原理™,改变它会产生比解决问题更多的混乱。 也就是说,如果您将代码放在不同的布局句柄中,您可能能够在系统中工作。 句柄是环绕布局更新的节点... 我自己解决了这个问题。 清单: 确保您可以从控制器实例化块。 如果它不能让你有一个config.xml的问题。 确保正在使用正确的句柄(布局XML文档中的包装元素)(我的不是),并且其他句柄未运行以覆盖其任何更改。 将此行添加到控制器以获取句柄列表: var_dump(Mage::getSingleton('core/layout')->getUpdate()->getHandles()); 在我的情况下,团队中的其他人已经从基本模板中删除了组件而没有让我知道。 确保首先在模板中确实存在已删除的组件。 确保 ...开箱即用,无法撤消之前通过调用删除的布局块。 “ 但是,布局系统中有足够的事件可以自己实现。 通过“你自己”,我的意思是我创建了一个实验扩展 ,为XML布局系统的语法添加了 标记。 Out of the box there's no way to unremove a layout block that's been removed by a previous call to . ' However, there's enough eventin ... 我很抱歉我提出这样一个大错的问题,但是我正在回答这个问题,因为很多人都会犯同样的错误。 包装方式; 在magento开放的管理方面 系统- >配置- >设计 然后将配置范围更改为主网站 。 然后选择Package部分,取消选中默认复选框并使用您的包名称,例如“Test”。 然后创建以下文件夹结构。 应用程序/设计/前端/测试/默认/布局 将布局xml文件放在此处。 如果您使用自己的主题,请使用该名称而不是默认名称。 I am quite sorry that I have made such a blund ...你将什么文件合并到一起? 我假设你将所有东西都移动到local.xml并从主题中删除page.xml文件? 这个问题是最后加载了local.xml ,因此当您从中替换块时,对page.xml任何更新都将丢失。 page.xml做法如下:在catalog.xml和checkout.xml之前加载page.xml 。 目录和结帐添加额外的块到标题(例如迷你手推车和搜索表单)。 但是,由于最后加载了local.xml ,所以事先在页面xml中添加的任何块(如catalog.xml和checkout.xml )都会 ...使用checkout.onepage.payment作为参考而不是付款这将对您有所帮助 use checkout.onepage.payment as reference instead of payment this will help you1)你必须删除持久性的东西,它不会帮助找到问题,因为它没有使用正确的模板。 2)您所做的更改将使用您的模板而不是yoursite.com/customer/account/login页面生成yoursite.com/customercar/account/login页面。 这是你需要的吗? 3)你使用:相关文章
更多- Amazon Web Services(AWS)概述
- java lambda表达式-JAVA8新特性
- 高负载低延迟:动态算法+Hadoop+AWS+NoSQL解析
- 怎样用Struts2的lambda表达式取一个map集合的子集
- 《CMMI+敏捷整合开发:更快改进性能的案例与实用技术》( Integrating CMMI and Agile Development: Case Studies and Proven Techniques for Faster Performance Improvement )扫描版[PDF]
- zz Data Analysis Process
- Hadoop执行分布式Process
- multi-core solr deploy process(not complete)
- multi-core solr deploy process(not complete)
- 干干净净终结进程[转] Terminate process cleanly [reprint]
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)