mosn / layotto

A fast and efficient cloud native application runtime
http://mosn.io/layotto/
Apache License 2.0
806 stars 166 forks source link

[draft]proposal: run services on wasm #610

Closed seeflood closed 1 year ago

seeflood commented 2 years ago

I propose that we compile micro-services into wasm modules and run them on wasm runtime. These services should be smaller than traditional micro-services. Maybe we can call them "nano-service". image

We can assume that there's only one Layotto on one node:

image

zhenjunMa commented 2 years ago

What's the differences between a "nano-service" and a "function"?

nobodyiam commented 2 years ago

What's the differences between a "nano-service" and a "function"?

Looks like they are quite similar concepts.

seeflood commented 2 years ago

This proposal is an idea for discussion. We need some ideas on "what's the next step of layotto+ wasm" :)

What's the differences between a "nano-service" and a "function"?

A service is "a group of functions" , like a pod is a group of containers. For example:

kevinten10 commented 2 years ago

Sounds like function + layotto as daemonset

this "group of functions" is the minimum scheduling unit

How about step function, and then deploy layotto as daemonset to serve the group.

seeflood commented 2 years ago

How about step function, and then deploy layotto as daemonset to serve the group.

Do you mean aws step function ? I didn't know it. Let me learn and play it :P

rayowang commented 2 years ago

This is a good proposal. As said in the community meeting yesterday, whether it is an independent faas model or a nano-service model, I think both have great practical business value. As we all know, the former has many practical applications, such as Alibaba Cloud Function Compute. The latter will have higher practical value in search, recommendation, advertising and other businesses that require large-scale resources.

However, when it comes to resource isolation, I personally think that it is relatively certain that each wasm must have a certain degree of isolation, because it is necessary to ensure overall security and stability.

But for the resource problem of each layotto, in other words, how many layotto should a node deploy, more precisely in one or more ways such as container runtime, deamonset, microservice framework, etc., I think we need discuss further.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.

seeflood commented 1 year ago

I just found that cloudflare open sourced their serverless runtime project "workerd" . They call their abstraction "nanoservice" too. Interesting 😆

image

https://github.com/cloudflare/workerd https://blog.cloudflare.com/workerd-open-source-workers-runtime/