You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old version of Layotto already supports the functions combined with WebAssembly, and provides demos implemented in three languages, golang, rust, and AssemblyScript. The new version of Layotto has refactored the support for WebAssembly and realized the expected FaaS prototype. The process of processing the request of the new version of the demo is as follows:
2. Why is this needed
Improve Layotto + WebAssembly to realize the FaaS ecosystem.
Developers can learn how to develop WebAssembly with AssemblyScript.
3. Design draft
code
Need to develop the client and server functions. The client receives the http request and calls the server. The server obtains data from redis and returns the results in turn.
For implementation details, please refer to the golang version of the demo: demo/faas/code/golang
test
After Layotto is started, configure and load two wasm files in demo/faas/config.json, and then send request as follows:
> curl -H 'id:id_1' '127.0.0.1:2045?name=book1'
There are 100 inventories for book1.
1. What would you like to be added
The old version of Layotto already supports the functions combined with WebAssembly, and provides demos implemented in three languages, golang, rust, and AssemblyScript. The new version of Layotto has refactored the support for WebAssembly and realized the expected FaaS prototype. The process of processing the request of the new version of the demo is as follows:
2. Why is this needed
3. Design draft
code
Need to develop the client and server functions. The client receives the http request and calls the server. The server obtains data from redis and returns the results in turn.
For implementation details, please refer to the golang version of the demo:
demo/faas/code/golang
test
After Layotto is started, configure and load two wasm files in
demo/faas/config.json
, and then send request as follows:中文
一、需要实现什么功能
旧版的Layotto已经支持了跟WebAssembly结合的的功能,并且提供了golang, rust, assemblyScript三种语言实现的demo,新版的Layotto重构了对WebAssembly的支持,实现了预期的FaaS雏形,新版demo处理请求的流程如下:
目前整套流程已经用Go语言实现,代码路径:
demo/faas/code/golang
,而rust跟assemblyScript两种demo还停留在以前的状态,因此需要进行升级。二、做这个功能的价值
三、方案概述
代码开发
需要开发client, server两个function,client端接收http请求并调用server端,server端从redis中获取数据然后依次返回结果。
实现细节可以参考golang版demo:
demo/faas/code/golang
自测方法
Layotto启动以后,在
demo/faas/config.json
中配置加载两个wasm文件,然后进行验证:The text was updated successfully, but these errors were encountered: