{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,24]],"date-time":"2026-03-24T19:37:25Z","timestamp":1774381045788,"version":"3.50.1"},"reference-count":71,"publisher":"MDPI AG","issue":"9","license":[{"start":{"date-parts":[[2024,9,20]],"date-time":"2024-09-20T00:00:00Z","timestamp":1726790400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Future Internet"],"abstract":"<jats:p>In the past two decades, there has been a noticeable decoupling of machines and operating systems. In this context, WebAssembly has emerged as a promising alternative to traditional virtual machines. Originally designed for execution in web browsers, it has expanded to executing code in restricted and secure environments, and it stands out for its rapid startup, small footprint, and portability. However, WebAssembly presents significant challenges in data transfer and the management of interactions with the module. Its specification requires each module to have its own memory, resulting in a \u201cshare-nothing\u201d architecture. This restriction, combined with the limitations of importing and exporting functions that only handle numerical values, and the absence of an application binary interface (ABI) for sharing more complex data structures, leads to efficiency problems; these are exacerbated by the variety of programming languages that can be compiled and executed in the same environment. To address this inefficiency, the Karmem was designed and developed. It includes a new interface description language (IDL) aimed at facilitating the definition of data, functions, and relationships between modules. Additionally, a proprietary protocol\u2014an optimized ABI for efficient data reading and minimal decoding cost\u2014was created. A code generator capable of producing code for various programming languages was also conceived, ensuring harmonious interaction with the ABI and the foreign function interface. Finally, the compact runtime of Karmem, built atop a WebAssembly runtime, enables communication between modules and shared memory. Results of the experiments conducted show that Karmem represents an innovation in data communication for WASM in multiple environments and demonstrates the ability to overcome challenges of efficiency and interoperability.<\/jats:p>","DOI":"10.3390\/fi16090341","type":"journal-article","created":{"date-parts":[[2024,9,20]],"date-time":"2024-09-20T10:49:48Z","timestamp":1726829388000},"page":"341","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":1,"title":["Efficient Data Exchange between WebAssembly Modules"],"prefix":"10.3390","volume":"16","author":[{"given":"Lucas","family":"Silva","sequence":"first","affiliation":[{"name":"Polytechnic Institute of Castelo Branco, 6000-081 Castelo Branco, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7327-2109","authenticated-orcid":false,"given":"Jos\u00e9","family":"Metr\u00f4lho","sequence":"additional","affiliation":[{"name":"Polytechnic Institute of Castelo Branco, 6000-081 Castelo Branco, Portugal"},{"name":"CISeD\u2014Research Center in Digital Services, Instituto Polit\u00e9cnico de Viseu, 3504-510 Viseu, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1225-3844","authenticated-orcid":false,"given":"Fernando","family":"Ribeiro","sequence":"additional","affiliation":[{"name":"Polytechnic Institute of Castelo Branco, 6000-081 Castelo Branco, Portugal"},{"name":"CISeD\u2014Research Center in Digital Services, Instituto Polit\u00e9cnico de Viseu, 3504-510 Viseu, Portugal"}]}],"member":"1968","published-online":{"date-parts":[[2024,9,20]]},"reference":[{"key":"ref_1","unstructured":"(2023, October 16). Dis Virtual Machine Specification. Available online: https:\/\/www.vitanuova.com\/inferno\/papers\/dis.html."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Rose, J.R. (2009, January 25\u201329). Bytecodes meet Combinators: Invokedynamic on the JVM. Proceedings of the Third Workshop on Virtual Machines and Intermediate Languages, Orlando, FL, USA.","DOI":"10.1145\/1711506.1711508"},{"key":"ref_3","unstructured":"Hickey, P. (2023, October 16). Lucet Takes WebAssembly Beyond the Browser|Fastly|Fastly. Available online: https:\/\/www.fastly.com\/blog\/announcing-lucet-fastly-native-webassembly-compiler-runtime."},{"key":"ref_4","unstructured":"Varda, K. (2023, October 16). WebAssembly on Cloudflare Workers. Available online: https:\/\/blog.cloudflare.com\/webassembly-on-cloudflare-workers\/."},{"key":"ref_5","unstructured":"(2023, October 16). Bytecodealliance\/Wasm-Micro-Runtime: WebAssembly Micro Runtime (WAMR). Available online: https:\/\/github.com\/bytecodealliance\/wasm-micro-runtime."},{"key":"ref_6","unstructured":"Dale, B. (2023, October 16). Gavin Wood: WebAssembly Is the Future, EVM Is Right Now\u2014CoinDesk. Available online: https:\/\/www.coindesk.com\/tech\/2021\/05\/25\/polkadots-gavin-wood-webassembly-is-the-future-of-smart-contracts-but-legacy-evm-is-right-now\/."},{"key":"ref_7","unstructured":"Charriere, P. (2023, October 16). Give Super Powers to Java with WebAssembly by Philippe Charriere @ Wasm I\/O 2023\u2014YouTube. Available online: https:\/\/www.youtube.com\/watch?v=5HBglrvHtWg."},{"key":"ref_8","unstructured":"Shuralyov, D. (2023, October 16). Syscall\/js: Performance Considerations\u2014Issue #32591\u2014Golang\/Go. Available online: https:\/\/github.com\/golang\/go\/issues\/32591."},{"key":"ref_9","unstructured":"Denis (2023, October 16). [Interface Types] Avoid Memory Copy\u2014Issue #88\u2014WebAssembly\/Interface-Types. Available online: https:\/\/github.com\/WebAssembly\/interface-types\/issues\/88."},{"key":"ref_10","unstructured":"Sikora, P. (2023, October 16). WebAssembly in Envoy. Available online: https:\/\/github.com\/proxy-wasm\/spec\/blob\/master\/docs\/WebAssembly-in-Envoy.md#drawbacks."},{"key":"ref_11","unstructured":"Fioretti, M. (2023, October 16). How and Why to Link WebAssembly Modules. Available online: https:\/\/training.linuxfoundation.org\/blog\/how-and-why-to-link-webassembly-modules\/."},{"key":"ref_12","unstructured":"(2023, October 16). WebAssembly|web.dev. Available online: https:\/\/web.dev\/explore\/webassembly?hl=pt-br."},{"key":"ref_13","unstructured":"(2023, November 18). Intel Confirms Arrow Lake-S & Lunar Lake CPUs will Support Instructions for AVX-VNNI, SHA512, SM3, SM4 and LAM\u2014VideoCardz.com. Available online: https:\/\/videocardz.com\/newz\/intel-confirms-arrow-lake-s-lunar-lake-cpus-will-support-instructions-for-avx-vnni-int16-sha512-sm3-sm4-and-lam."},{"key":"ref_14","unstructured":"(2023, November 10). Design\/Nondeterminism.md at Main\u2014WebAssembly\/Design\u2014GitHub. Available online: https:\/\/github.com\/WebAssembly\/design\/blob\/main\/Nondeterminism.md."},{"key":"ref_15","unstructured":"(2023, January 26). WIT\u2014The WebAssembly Component Model. Available online: https:\/\/component-model.bytecodealliance.org\/design\/wit.html#options."},{"key":"ref_16","unstructured":"(2023, October 16). WASI\/legacy\/preview1\/witx\/wasi_snapshot_preview1.witx. Available online: https:\/\/github.com\/WebAssembly\/WASI\/blob\/41c4383548ba7a06df5df7232b68a6f0bbb93e2d\/legacy\/preview1\/witx\/wasi_snapshot_preview1.witx."},{"key":"ref_17","unstructured":"Denis, F. (2023, October 16). Jedisct1\/Witx-Codegen: WITX Code and Documentation Generator for AssemblyScript, Zig, Rust and More. Available online: https:\/\/github.com\/jedisct1\/witx-codegen."},{"key":"ref_18","unstructured":"(2023, October 16). waPC.io|waPC.io. Available online: https:\/\/wapc.io\/."},{"key":"ref_19","unstructured":"Fukuda, T. (2023, October 16). knqyf263\/go-plugin: Go Plugin System over WebAssembly. Available online: https:\/\/github.com\/knqyf263\/go-plugin."},{"key":"ref_20","unstructured":"(2023, January 26). Canonical ABI\u2014The WebAssembly Component Model. Available online: https:\/\/component-model.bytecodealliance.org\/design\/canonical-abi.html."},{"key":"ref_21","unstructured":"WebAssembly Contributors (2023, October 17). WebAssembly\/Proposals: Tracking WebAssembly Proposals. Available online: https:\/\/github.com\/WebAssembly\/proposals."},{"key":"ref_22","unstructured":"(2023, October 16). Overview|Extism\u2014Make all Software Programmable. Extend from within. Available online: https:\/\/extism.org\/docs\/overview\/#example-in-action."},{"key":"ref_23","unstructured":"Dylibso (2023, October 16). Host Functions|Extism\u2014Make All Software Programmable. Extend from within. Available online: https:\/\/extism.org\/docs\/concepts\/host-functions\/."},{"key":"ref_24","unstructured":"(2023, October 16). Wasmbus (Stable ABI)|WasmCloud. Available online: https:\/\/wasmcloud.com\/docs\/category\/wasm-abis."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Kanev, S., Darago, J.P., Hazelwood, K., Ranganathan, P., Moseley, T., Wei, G.Y., and Brooks, D. (2015, January 13\u201317). Profiling a warehouse-scale computer. Proceedings of the 42nd Annual International Symposium on Computer Architecture, Portland, OR, USA.","DOI":"10.1145\/2749469.2750392"},{"key":"ref_26","unstructured":"Raghavan, D., Levis, P., Zaharia, M., and Zhang, I. (2023, January 22\u201324). Breakfast of Champions: Towards Zero-Copy Serialization with NIC Scatter-Gather. Proceedings of the Workshop on Hot Topics in Operating Systems, Providence, RI, USA."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Sriraman, A., and Dhanotia, A. (2020, January 16\u201320). Accelerometer: Understanding acceleration opportunities for data center overheads at Hyperscale. Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems\u2014ASPLOS, Lausanne, Switzerland.","DOI":"10.1145\/3373376.3378450"},{"key":"ref_28","unstructured":"Google (2023, January 22). Tutorials|Protocol Buffers Documentation. Available online: https:\/\/protobuf.dev\/getting-started\/."},{"key":"ref_29","unstructured":"Furuhashi, S. (2023, January 22). MessagePack: It\u2019s like JSON. But Fast and Small. Available online: https:\/\/msgpack.org\/."},{"key":"ref_30","unstructured":"Google (2023, January 22). FlatBuffers: Use in Rust. Available online: https:\/\/flatbuffers.dev\/flatbuffers_guide_use_rust.html."},{"key":"ref_31","unstructured":"Google (2023, January 22). FlatBuffers: Platform\/Language\/Feature Support. Available online: https:\/\/flatbuffers.dev\/flatbuffers_support.html."},{"key":"ref_32","unstructured":"(2023, January 22). Cap\u2019n Proto: Encoding Spec. Available online: https:\/\/capnproto.org\/encoding.html#security-considerations."},{"key":"ref_33","unstructured":"(2023, December 17). OSCON 2010: Rob Pike, \u2018Public Static Void\u2019\u2014YouTube. Available online: https:\/\/www.youtube.com\/watch?v=5kj5ApnhPAE."},{"key":"ref_34","unstructured":"Llopis, N. (2023, November 24). Data-Oriented Design (Or Why You Might Be Shooting Yourself in the Foot with OOP)\u2014Games from within. Available online: https:\/\/gamesfromwithin.com\/data-oriented-design."},{"key":"ref_35","unstructured":"DICE (2024, January 22). A Step Towards Data Orientation|PPT. Available online: https:\/\/pt.slideshare.net\/DICEStudio\/a-step-towards-data-orientation."},{"key":"ref_36","unstructured":"Acton, M. (2024, January 22). CppCon 2014: Mike Acton \u2018Data-Oriented Design and C++\u2019\u2014YouTube. Available online: https:\/\/www.youtube.com\/watch?v=rX0ItVEVjHc."},{"key":"ref_37","unstructured":"DICE (2024, January 22). Introduction to Data Oriented Design|PPT. Available online: https:\/\/pt.slideshare.net\/DICEStudio\/introduction-to-data-oriented-design."},{"key":"ref_38","unstructured":"(2023, November 26). DOTS\u2014Unity\u2019s Data-Oriented Technology Stack. Available online: https:\/\/unity.com\/dots."},{"key":"ref_39","unstructured":"(2023, November 26). C# Language Support|Burst|1.8.11. Available online: https:\/\/docs.unity3d.com\/Packages\/com.unity.burst@1.8\/manual\/csharp-language-support.html."},{"key":"ref_40","unstructured":"(2023, November 11). Odin Programming Language. Available online: https:\/\/odin-lang.org\/."},{"key":"ref_41","unstructured":"(2023, November 26). Jai Programming Language Resources and Information. Available online: https:\/\/inductive.no\/jai\/."},{"key":"ref_42","unstructured":"(2023, November 11). Home \u26a1 Zig Programming Language. Available online: https:\/\/ziglang.org\/."},{"key":"ref_43","unstructured":"Richard, F. (2018). Data-Oriented Design: Software Engineering for Limited Resources and Short Schedules, Ingram International Inc.. [1st ed.]."},{"key":"ref_44","unstructured":"Straume, P.-M. (2023, November 25). Investigating Data-Oriented Design. Available online: https:\/\/ntnuopen.ntnu.no\/ntnu-xmlui\/handle\/11250\/2677763."},{"key":"ref_45","unstructured":"Karlsson, M. (2023, November 11). Evaluation of Object-Space Occlusion Culling with Occluder Fusion. Available online: https:\/\/www.semanticscholar.org\/paper\/Evaluation-of-Object-Space-Occlusion-Culling-with-Karlsson\/a8e7758df9f651e90e532863766861328b30c199."},{"key":"ref_46","unstructured":"Wells, A.M., and Prabha, A.M. (2023, December 12). Intel\u00ae HPC Developer Conference Fuel Your Insight Improve Vectorization Efficiency Using Intel Simd Data Layout Template (Intel Sdlt). Available online: https:\/\/www.intel.com\/content\/dam\/www\/public\/us\/en\/documents\/presentation\/improving-vectorization-efficiency.pdf."},{"key":"ref_47","unstructured":"Albrecht, T. (2014). Pitfalls of Object Oriented Programming, M & T Books."},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"325","DOI":"10.1016\/j.cpc.2017.11.015","article-title":"SoAx: A generic C++Structure of Arrays for handling particles in HPC codes","volume":"224","author":"Homann","year":"2018","journal-title":"Comput. Phys. Commun."},{"key":"ref_49","unstructured":"(2024, January 13). Data Alignment to Assist Vectorization. Available online: https:\/\/www.intel.com\/content\/www\/us\/en\/developer\/articles\/technical\/data-alignment-to-assist-vectorization.html."},{"key":"ref_50","unstructured":"Eberhardt, C. (2023, October 16). The State of WebAssembly 2023. Available online: https:\/\/blog.scottlogic.com\/2023\/10\/18\/the-state-of-webassembly-2023.html."},{"key":"ref_51","unstructured":"(2024, January 17). Assume_no_Moving_gc Package\u2014Go4.org\/unsafe\/assume-no-moving-gc\u2014Go Packages. Available online: https:\/\/pkg.go.dev\/go4.org\/unsafe\/assume-no-moving-gc#section-readme."},{"key":"ref_52","unstructured":"(2023, November 25). A08 Software and Data Integrity Failures\u2014OWASP Top 10:2021. Available online: https:\/\/owasp.org\/Top10\/A08_2021-Software_and_Data_Integrity_Failures\/."},{"key":"ref_53","unstructured":"(2023, November 25). Deserialization of Untrusted Data|OWASP Foundation. Available online: https:\/\/owasp.org\/www-community\/vulnerabilities\/Deserialization_of_untrusted_data."},{"key":"ref_54","unstructured":"Krill, P. (2023, November 25). Oracle Plans to Dump Risky Java Serialization|InfoWorld. Available online: https:\/\/news.ycombinator.com\/item?id=17165800."},{"key":"ref_55","unstructured":"(2023, November 23). HTML Standard. Available online: https:\/\/html.spec.whatwg.org\/multipage\/webstorage.html#sensitivity-of-data."},{"key":"ref_56","unstructured":"(2024, January 31). RabbitMQ tutorial\u2014Routing\u2014RabbitMQ. Available online: https:\/\/www.rabbitmq.com\/tutorials\/tutorial-four-spring-amqp.html."},{"key":"ref_57","unstructured":"Pankaj (2024, January 31). Gangs of Four (GoF) Design Patterns|DigitalOcean. Available online: https:\/\/www.digitalocean.com\/community\/tutorials\/gangs-of-four-gof-design-patterns."},{"key":"ref_58","unstructured":"(2024, January 31). Design Patterns in Dynamic Programming. Available online: https:\/\/kidneybone.com\/c2\/wiki\/DesignPatternsInDynamicProgramming."},{"key":"ref_59","unstructured":"(2024, January 31). Are Design Patterns Missing Language Features. Available online: https:\/\/kidneybone.com\/c2\/wiki\/AreDesignPatternsMissingLanguageFeatures."},{"key":"ref_60","unstructured":"Amazon (2024, January 31). Restrictions on Lambda@Edge\u2014Amazon CloudFront. Available online: https:\/\/docs.aws.amazon.com\/AmazonCloudFront\/latest\/DeveloperGuide\/lambda-at-edge-function-restrictions.html."},{"key":"ref_61","unstructured":"Netlify (2024, January 31). Functions Overview|Netlify Docs. Available online: https:\/\/docs.netlify.com\/functions\/overview\/."},{"key":"ref_62","unstructured":"Vercel (2024, January 31). Edge Functions Limitations. Available online: https:\/\/vercel.com\/docs\/functions\/edge-functions\/limitations."},{"key":"ref_63","unstructured":"Surma (2024, January 31). Bringing Javascript to WebAssembly for Shopify Functions. Available online: https:\/\/shopify.engineering\/javascript-in-webassembly-for-shopify-functions."},{"key":"ref_64","unstructured":"(2023, October 29). Server Operating System Market Volume, Share|Analysis, 2030. Available online: https:\/\/www.fortunebusinessinsights.com\/server-operating-system-market-106601."},{"key":"ref_65","unstructured":"Nyberg, F. (2023, October 29). Investigating the Effect of Implementing Data-Oriented Design Principles on Performance and Cache Utilization, UME\u00c5 University. Available online: https:\/\/www.diva-portal.org\/smash\/get\/diva2:1578616\/FULLTEXT01.pdf."},{"key":"ref_66","doi-asserted-by":"crossref","first-page":"265","DOI":"10.1145\/1508284.1508275","article-title":"Producing Wrong Data without Doing Anything Obviously Wrong!","volume":"44","author":"Mytkowicz","year":"2009","journal-title":"ACM Sigplan Not."},{"key":"ref_67","unstructured":"(2024, January 26). S\u00e9rie B expans\u00edvel\u2014M\u00e1quinas Virtuais do Azure\u2014Azure Virtual Machines|Microsoft Learn. Available online: https:\/\/learn.microsoft.com\/pt-pt\/azure\/virtual-machines\/sizes-b-series-burstable."},{"key":"ref_68","unstructured":"(2024, January 24). Test Package\u2014Cmd\/go\/internal\/test\u2014Go Packages. Available online: https:\/\/pkg.go.dev\/cmd\/go\/internal\/test."},{"key":"ref_69","unstructured":"(2024, January 26). Benchstat Command\u2014Golang.org\/x\/perf\/cmd\/benchstat\u2014Go Packages. Available online: https:\/\/pkg.go.dev\/golang.org\/x\/perf\/cmd\/benchstat."},{"key":"ref_70","unstructured":"(2024, January 31). Cap\u2019n Proto: Introduction. Available online: https:\/\/capnproto.org\/."},{"key":"ref_71","unstructured":"Neward, T. (2023, November 08). The Vietnam of Computer Science. Available online: https:\/\/www.odbms.org\/wp-content\/uploads\/2013\/11\/031.01-Neward-The-Vietnam-of-Computer-Science-June-2006.pdf."}],"container-title":["Future Internet"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-5903\/16\/9\/341\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T16:00:57Z","timestamp":1760112057000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-5903\/16\/9\/341"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,9,20]]},"references-count":71,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2024,9]]}},"alternative-id":["fi16090341"],"URL":"https:\/\/doi.org\/10.3390\/fi16090341","relation":{},"ISSN":["1999-5903"],"issn-type":[{"value":"1999-5903","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,9,20]]}}}