MetaFFI -- 多语言间接互操作系统

Tsvi Cherny-Shahar, Amiram Yehudai
{"title":"MetaFFI -- 多语言间接互操作系统","authors":"Tsvi Cherny-Shahar, Amiram Yehudai","doi":"arxiv-2408.14175","DOIUrl":null,"url":null,"abstract":"The development of software applications using multiple programming languages\nhas increased in recent years, as it allows the selection of the most suitable\nlanguage and runtime for each component of the system and the integration of\nthird-party libraries. However, this practice involves complexity and error\nproneness, due to the absence of an adequate system for the interoperability of\nmultiple programming languages. Developers are compelled to resort to\nworkarounds, such as library reimplementation or language-specific wrappers,\nwhich are often dependent on C as the common denominator for interoperability.\nThese challenges render the use of multiple programming languages a burdensome\nand demanding task that necessitates highly skilled developers for\nimplementation, debugging, and maintenance, and raise doubts about the benefits\nof interoperability. To overcome these challenges, we propose MetaFFI, a\npluggable in-process indirect-interoperability system that allows the loading\nand utilization of entities from multiple programming languages. This is\nachieved by exploiting the less restrictive shallow binding mechanisms (e.g.,\nForeign Function Interface) to offer deep binding features (e.g., object\ncreation, methods, fields). MetaFFI provides a runtime-independent framework to\nload and \\emph{xcall} (Cross-Call) foreign entities (e.g., functions, objects).\nMetaFFI uses Common Data Types (CDTs) to pass parameters and return values,\nincluding objects and complex types, and even cross-language callbacks. The\nindirect interoperability approach of MetaFFI has the significant advantage of\nrequiring only $2n$ mechanisms to support $n$ languages, as opposed to the\ndirect interoperability approaches that need $n^2$ mechanisms. We have\nsuccessfully tested the binding between Go, Python3.11, and Java in a\nproof-of-concept on Windows and Ubuntu.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"4 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"MetaFFI -- Multilingual Indirect Interoperability System\",\"authors\":\"Tsvi Cherny-Shahar, Amiram Yehudai\",\"doi\":\"arxiv-2408.14175\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The development of software applications using multiple programming languages\\nhas increased in recent years, as it allows the selection of the most suitable\\nlanguage and runtime for each component of the system and the integration of\\nthird-party libraries. However, this practice involves complexity and error\\nproneness, due to the absence of an adequate system for the interoperability of\\nmultiple programming languages. Developers are compelled to resort to\\nworkarounds, such as library reimplementation or language-specific wrappers,\\nwhich are often dependent on C as the common denominator for interoperability.\\nThese challenges render the use of multiple programming languages a burdensome\\nand demanding task that necessitates highly skilled developers for\\nimplementation, debugging, and maintenance, and raise doubts about the benefits\\nof interoperability. To overcome these challenges, we propose MetaFFI, a\\npluggable in-process indirect-interoperability system that allows the loading\\nand utilization of entities from multiple programming languages. This is\\nachieved by exploiting the less restrictive shallow binding mechanisms (e.g.,\\nForeign Function Interface) to offer deep binding features (e.g., object\\ncreation, methods, fields). MetaFFI provides a runtime-independent framework to\\nload and \\\\emph{xcall} (Cross-Call) foreign entities (e.g., functions, objects).\\nMetaFFI uses Common Data Types (CDTs) to pass parameters and return values,\\nincluding objects and complex types, and even cross-language callbacks. The\\nindirect interoperability approach of MetaFFI has the significant advantage of\\nrequiring only $2n$ mechanisms to support $n$ languages, as opposed to the\\ndirect interoperability approaches that need $n^2$ mechanisms. We have\\nsuccessfully tested the binding between Go, Python3.11, and Java in a\\nproof-of-concept on Windows and Ubuntu.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":\"4 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.14175\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.14175","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

近年来,使用多种编程语言开发应用软件的情况越来越多,因为这样可以为系统的每个组件选择最合适的语言和运行时间,并集成第三方库。然而,由于缺乏适当的系统来实现多种编程语言的互操作性,这种做法既复杂又容易出错。这些挑战使使用多种编程语言成为一项繁重而艰巨的任务,需要高技能的开发人员来实现、调试和维护,并使人们对互操作性的好处产生怀疑。为了克服这些挑战,我们提出了 MetaFFI,这是一个可插拔的进程内间接互操作系统,允许加载和使用来自多种编程语言的实体。这是通过利用限制较少的浅层绑定机制(如外来函数接口)来提供深层绑定功能(如对象创建、方法、字段)来实现的。MetaFFI 提供了一个独立于运行时的框架,用于加载和调用(Cross-Call)外来实体(如函数、对象)。MetaFFI 使用通用数据类型(Common Data Types,CDT)来传递参数和返回值,包括对象和复杂类型,甚至是跨语言回调。与需要 n^2 种机制的直接互操作方法相比,MetaFFI 的直接互操作方法的显著优势在于只需要 2n$ 种机制来支持 n$ 种语言。我们已经在 Windows 和 Ubuntu 上成功测试了 Go、Python3.11 和 Java 之间的概念验证绑定。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
MetaFFI -- Multilingual Indirect Interoperability System
The development of software applications using multiple programming languages has increased in recent years, as it allows the selection of the most suitable language and runtime for each component of the system and the integration of third-party libraries. However, this practice involves complexity and error proneness, due to the absence of an adequate system for the interoperability of multiple programming languages. Developers are compelled to resort to workarounds, such as library reimplementation or language-specific wrappers, which are often dependent on C as the common denominator for interoperability. These challenges render the use of multiple programming languages a burdensome and demanding task that necessitates highly skilled developers for implementation, debugging, and maintenance, and raise doubts about the benefits of interoperability. To overcome these challenges, we propose MetaFFI, a pluggable in-process indirect-interoperability system that allows the loading and utilization of entities from multiple programming languages. This is achieved by exploiting the less restrictive shallow binding mechanisms (e.g., Foreign Function Interface) to offer deep binding features (e.g., object creation, methods, fields). MetaFFI provides a runtime-independent framework to load and \emph{xcall} (Cross-Call) foreign entities (e.g., functions, objects). MetaFFI uses Common Data Types (CDTs) to pass parameters and return values, including objects and complex types, and even cross-language callbacks. The indirect interoperability approach of MetaFFI has the significant advantage of requiring only $2n$ mechanisms to support $n$ languages, as opposed to the direct interoperability approaches that need $n^2$ mechanisms. We have successfully tested the binding between Go, Python3.11, and Java in a proof-of-concept on Windows and Ubuntu.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信