Skip to content

[Proposal]Dynamic mecha:Let business logic sink to sidecar #166

@seeflood

Description

@seeflood

Dynamic mecha: Let business logic sink to sidecar

This is a feature discussion thread. I put it here to see if everyone thinks this feature is worth doing.

The motivation for this feature is that the multi-tenant system that I was responsible for has always had the pain point of lack of isolation. So I am wondering whether it can be solved through the wasm in Layotto.

1. What problem to solve and what is the value

1.1. Reloadable SDK

The business application also has its own SDK, and there are also problems in sdk upgrades and version fragmentation:

image

For example, a platform system developed an SDK in the form of a jar package for use by other business systems. Their features are not universal to the entire company, so they cannot persuade the middleware team to develop them into the company's unified sidecar.

And if it becomes like this:

image

If developers no longer develop sdk (jar package), and develop .wasm files instead, they can upgrade and deploy these files independently, and there will be no pain to push other systems to upgrade their sdk. When you want to upgrade your wasm files, you just do some operation in the PaaS console. There is no need to restart the app and sidecar any more.

1.2. Sandbox as a Service

For example, a multi-tenant system written in Java supports developers from different department to write groovy in it. If memory leak happens, it may cause the entire jvm oom. This is dangerous, and the memory isolation problem in jvm cannot be solved.

image

image

If we let the business guys change from writing groovy in jvm to writing rust/assemblyscript/cpp and automatically compiling to .wasm,the sidecar can reload these .wasm during runtime and isolate each function with memory and cpu limit.With this architecture,the isolation problem can be solved.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions