Giter VIP home page Giter VIP logo

Comments (8)

jsturtevant avatar jsturtevant commented on June 7, 2024 1

Discussed a bit at Runwasi office hours and offline with a few folks, A couple options we came up with (there might be more):

  • Using a tool like tar-builder to build images in OCI image format
    • This works for Linux mostly. The ssl specific files wouldn't work well or would be in the image whether it was needed or not.
    • There was also a concern raise in containerd/runwasi#106 (comment) around the use of OCI image formats.
    • would require a windows specific snapshotter that doesn't have the file system requirements that it
  • Using a tool to build OCI artifacts that contain WASM Modules.
    • There is a proposal for a storing wasm modules in a registry bytecodealliance/registry#87
      • The challenge with the proposal is that containerd doesn't necessarily know about OCI artifacts only OCI image manifests.
    • One solution to explore is using Stream Processors to translate the unknown media types to formats that Containerd does know: https://github.com/containerd/containerd/blob/main/docs/stream_processors.md
      • This possibly has a couple benefits:
        • work directly with modules instead of image formats (possibly address the concern around file systems mentioned above)
        • no need to write/adopt new snapshotters.
        • could potentially handle OS specific files via annotations
        • don't need to modify core contianerd, which means we can iterate faster than needing a containerd release atleast initially.

Prototyping the second solution using stream processors would be a good way to determine if it is feasible.

from containerd-wasm-shims.

jsturtevant avatar jsturtevant commented on June 7, 2024

@cpuguy83 @Mossaka Incase I am missing something

from containerd-wasm-shims.

cpuguy83 avatar cpuguy83 commented on June 7, 2024

So today we should be able to use stream processors, however it was suggested is to handle this at the "unpacker" level (via the transfer service) and essentially choose an unpacker passed on the image platform. So we could have a wasi/wasm unpacker and have different implementations of the unpacker when running on linux vs windows.

This (transfer service) is not wired up to CRI today, but it is being discussed.

from containerd-wasm-shims.

jsturtevant avatar jsturtevant commented on June 7, 2024

Is there any docs/issue/pr on the transfer service or unpacker that I could look at? What would be the differences and pros/cons of using stream processor vs transfer service?

from containerd-wasm-shims.

cpuguy83 avatar cpuguy83 commented on June 7, 2024

I think the main thing is you can select an unpacker based on image platform and not have to do anything special with new types.

Using a stream processor requires a new type, a backchannel to containerd to create the content in, and installing more binaries on a node.

from containerd-wasm-shims.

jsturtevant avatar jsturtevant commented on June 7, 2024

found containerd/containerd#7592 and containerd/containerd#8227

from containerd-wasm-shims.

jsturtevant avatar jsturtevant commented on June 7, 2024

The stream processor approach didn't work out since (see prototype)

from containerd-wasm-shims.

jsturtevant avatar jsturtevant commented on June 7, 2024

I have since done a few prototypes and have a proposal in review at https://docs.google.com/document/d/11shgC3l6gplBjWF1VJCWvN_9do51otscAm0hBDGSSAc

from containerd-wasm-shims.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.