ZDS-2023_ Using the Thrift RPC Framework in Zephyr.pdf

編號:144822 PDF 20頁 2.34MB 下載積分:VIP專享
下載報告請您先登錄!

ZDS-2023_ Using the Thrift RPC Framework in Zephyr.pdf

1、Using the Thrift RPC Framework in Zephyr2023-06-28:Embedded Open Source SummitChris FriedtEmbedded SWE,MetaThrift Module Maintainerhttps:/bit.ly/442kJrJ Agenda01 What is Thrift?02 Thrift in Zephyr03 Status Update&Additional Work01 What is Thrift?https:/bit.ly/433nA2phttps:/bit.ly/44nXnwq 01 WHAT IS

2、THRIFT?Remote Procedure Call Frameworks RPC is nothing new Solution for ad-hoc,hand-rolled,bit-stuffed“protocols”Solution for re-inventing TCP 1000 x times Reliable asynchronous communication is hard ASN.1(1984,ITU-T)now ISO/IEC 8825-1:2021 Sun RPC(1984-1986,part of NFS)Part of glibc(and others)to t

3、his day(rpcgen)TLV(Tag-Length-Value)representation E.g.Netlink,MISB(oddly I did MISB in Thrift!)Some issues with SunRPC every message(procedure)required a version absolute nightmare for inter-version compatibility Protobufs,Thrift,and gRPC started around the“downfall of Sun”Drop message versions(jus

4、t use new Tag)Do not reuse Tags Guaranteed consistence+/-one rev(mit)01 WHAT IS THRIFT?https:/bit.ly/4411BdP 01 WHAT IS THRIFT?codePrincessThrift History/Internals Created at Facebook(now Meta)2006-2007 Inspired by Protocol Buffers Used extensively throughout Meta infra Released to the ASF in 2007,o

5、riginal whitepaper Adopted by several cloud companies,some OSS projects Not only primitive types such as bool,i32,and double,but also rich types such as enum,list,map,and struct Not only Binary,Compact Binary,but also e.g.JSON Procedures(methods)can throw any kind of struct and take any number of ar

6、guments All OSs,27 Languages,Facebook forked Thrift in 2014 to create fbthrift01 WHAT IS THRIFT?https:/bit.ly/3CS4PV8 https:/bit.ly/443gpse https:/ 02 Thrift in Zephyrhttps:/bit.ly/3Xv60D9 https:/bit.ly/3JvDyeP https:/zephyrproject.org/store/https:/bit.ly/3JxrVUs Thrift ported to Zephyr by Young Mei

7、(StdElectronics)Zephyr Blog Post C+Code Generation Supported Features Binary Protocol Compressed Binary Protocol Zlib Transport(via uzlib,muzic)TLS sockets via MbedTLS All Zephyr Architectures Supported All Thrift features(ThriftTest.thrift,Zephyr testsuite)Multi-OS,Multi-language samples Released i

8、n Zephyr v3.3.0(-zlib)EXPERIMENTALGoogle Summer of Code,202202 THRIFT IN ZEPHYRhttps:/bit.ly/43aC5le Nice features about Thrift is it is Transport Agnostic,but also ways to stitch things together TFDTransport anything that can be represented as a file descriptor socket(TCP,UDP,socketpair),text file,

9、In Linux,“everything is a file”/dev/mem,/dev/gpu0,/dev/accel0,TMemoryBuffer e.g.dual-port SRAM,DMA buffer In Zephyr,I wonder if its possible to wrap an arbitrary const struct device*with an integer file descriptor fdtable What if I wanted to use Thrift over a UART?How Can I use Thrift in Zephyr?02 T

10、HRIFT IN ZEPHYR Partial C+Support in Zephyr See C+Roadmap(#45785)Support for std:thread and std:this_thread(#25569)Get std:mutex,std:condition_variable,free No async(due to missing std:thread support)C+Requirements Zephyr SDK needs gthr-posix.h(#43729)Support pthread_create()dynamic stacks(#25973)so

11、cketpair()(testing)needs subsys/net(#51211)POSIX requirements Well,dynamic thread stacks benefit all languages Fix at kernel level Several workarounds(no Mutex synchronization)Integration Challenges02 THRIFT IN ZEPHYR We used eventfd()for notification in TFDServer eventfd_read()/eventfd_write()deadl

12、ock(#58790)Fixed(with 10 x performance improvement)No Compression/Decompression subsys yet Code size is huge-can run/test in Qemu but very difficult to fit onto practically size SRAM requirements were quite large(for zlib)but reduced dramatically by Young during GSoC 2022Integration Challenges02 THR

13、IFT IN ZEPHYR 03 Status Update&Additional Work https:/ Major C+enhancements over Apache Thrift Fully asynchronous Server performance gains of 5-10k queries/s Switch to Google Test Framework Now uses std:coroutine(C+20)Dramatically lower latency across the board Code size reduction Use std:string_vie

14、w(C+17)where possible Zero-copy buffers,fbthrift03 STATUS UPDATE&ADDITIONAL WORKhttps:/bit.ly/3r67vf6 latency and throughput Even more recent improvements.fbthrift03 STATUS UPDATE&ADDITIONAL WORKhttps:/bit.ly/3r67vf6 After 4 years of“hacking in my spare time”Received this from Flavio literally this morning!With/without MMU,with/without Userspace Collaboration from Andy,Flavio,Daniel,Anas and others at Intel,Stephanos Ioannis,Keith Packard Dynamic Kernel Thread Stacks Working!11!03 STATUS UPDATE&ADDITIONAL WORKQuestions?/Feedback

友情提示

1、下載報告失敗解決辦法
2、PDF文件下載后,可能會被瀏覽器默認打開,此種情況可以點擊瀏覽器菜單,保存網頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站報告下載后的文檔和圖紙-無水印,預覽文檔經過壓縮,下載后原文更清晰。

本文(ZDS-2023_ Using the Thrift RPC Framework in Zephyr.pdf)為本站 (2200) 主動上傳,三個皮匠報告文庫僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對上載內容本身不做任何修改或編輯。 若此文所含內容侵犯了您的版權或隱私,請立即通知三個皮匠報告文庫(點擊聯系客服),我們立即給予刪除!

溫馨提示:如果因為網速或其他原因下載失敗請重新下載,重復下載不扣分。
客服
商務合作
小程序
服務號
折疊
午夜网日韩中文字幕,日韩Av中文字幕久久,亚洲中文字幕在线一区二区,最新中文字幕在线视频网站