21 ms·
Fuchsia IDL Overview
- political12345 5y agothis is basically grpc with a different name
- IshKebab 5y agoThat doesn't seem to be the case at all. There are many many differences.
- WatchDog 5y agoHow many RPC/messaging protocols are there to come out of google? Protobuf/GRPC, Flatbuffers, FIDL, more I can't think of?
- dmitrygr 5y agoA company that never encourages or rewards fixing things, but does reward making new things is bound to produce many versions of the same thing. How many chat systems does google have? And how many dozens more have they already killed?
- Barrin92 5y ago“No man ever steps in the same river twice. For it's not the same river and he's not the same man.” There can be a lot of value in rebuilding the same things from the ground up. There'll always be differences and novel things that people earlier hadn't seen. Of course it's costly and disruptive because you kill a lot of stuff, but especially in software building new things is relatively fast. People will always complain about companies that kill a lot of products or software but at the end of the day they get more chances to build things from the ground up.
- doctor_eval 5y agoBut it's not fast for the people who follow. That's the problem. If you create a product then there is an external cost borne by the users who need to use it. And then if you replace that product with some other product, those users need to retrain. It's really easy to create a new product, but it is a commitment for someone else to adopt it. And just because the cost is externalised, doesn't mean it doesn't exist.
- rvba 5y ago> There can be a lot of value in rebuilding the same things from the ground up. Maybe there is value for managers (who got promotions) and programmers (who got promotions and learned something), but for Google there is no value at all - it losts its users. I remember everyone using gmail chat.. that they "remade" (killed) like two times. Everyone just moved on. Also I dont understand why investors arent unhappy with that. Google can still earn hundreds of millions on chat. Those wont be billions, but it is still money. And "hudred million here, hundred million there" start to add up.
- DaiPlusPlus 5y ago> How many chat systems does google have? * Google+ (rip) * Google Allo * Google Chat * Google Groups (separate from Google's Usenet service) * Google Hangouts * Google Messenger * Google Duo * SMS via Google Project Fi * Google Voice > And how many dozens more have they already killed? Too many: https://killedbygoogle.com/ https://killedbygoogle.com/
- cco 5y agoYou're missing the chat features of Google Maps, Google Pay, and Google Photos...maybe a few others I'm missing?
- slightknack 5y agoDon't forget the built-in chat in google docs that nobody uses! (Yes, the one other than the commenting system).
- cco 5y agoOh my goodness, TIL. I know what I'll be doing tomorrow at work...
- mastax 5y agoYouTube had a chat feature at one point recently.
- google234123 5y agoYou listed a number of services that are closed or have been merged together to be fair. I'm also not sure what the point of listing sms from a phone service is.
- sniperjzp 5y agoListing the messaging App here is like comparing apples to oranges, gRPC and FIDL are for different purposes from technical perspective, people must have evaluated leveraging existing tech vs. creating a new one before the investment.
- joshuamorton 5y agoProtobuf and FIDL have very different design goals though. One is meant for backwards compatible over the wire communication between loosely coupled RPC systems, and one is meant to be a highly efficient IPC. I expect, for example, that it is vastly more efficient to send a known datastructure over the wire in FIDL, but it is vastly more efficient to parse, modify/extend a repeated subfield, and then reserialize a protobuf. You can't "fix" a system to achieve two goals that are in conflict, sometimes it is in fact better to have N opinionated systems, than one that is only okay at everything.
- surajrmal 5y agoFIDL actually does make backwards compatibility a core concern. Being able to modify an existing type and allowing client and servers to continue to work when out of sync is achieved through a similar mechanism by which protobuf achieves it - a data type in which all members are optional. That said, there are certainly many design decisions that FIDL does do differently because the constraints of the problems it tries to solve are different as you mention.
- nly 5y agoSkimming the docs, it looks like the heavyweight use use of "tables", much like Flatbuffers, seems to be the only mechanism for forward evolution of a protocol. Looks like "structs" you can only remove boxed fields by setting their references to null, but not add fields.
- surajrmal 5y agoOther types such as unions, enums, and bits also have properties that allow for evolution: https://fuchsia.dev/fuchsia-src/development/languages/fidl/guides/compatibility?hl=en#safe_changes_to_members https://fuchsia.dev/fuchsia-src/development/languages/fidl/g...
- moltenguardian 5y agoAre old applications going to run on new kernels? If so, backwards compatibility is a primary goal of an IPC dialog.
- deleted 5y ago[deleted]
- surajrmal 5y agoEach serves a different purpose and makes different trade-offs as a result. Flatbuffers is a serialization format, not an rpc solution. grpc is optimized for rpc, whereas FIDL is meant for ipc. Also if you are trying to be comprehensive, don't forget about AIDL/Binder which is used by Android, and mojo, which is used by Chrome. Both of these are IPC, however they are not general enough to be used outside of their respective platforms.
- vletal 5y agoIt's there really some reason not to generalize IPC to RPC "between processes"? To be more specific, is there really a justifiable specific of either of these applications which prevent us from having a single tool which would cover both?
- surajrmal 5y agoSure. In IPC, you can have shared resources such as memory. In RPC, you need to assume all parties may be on separate systems. In IPC, you may be able to make guarantees about message ordering that are more challenging with RPC. For instance, packets may be dropped over a network link and packets may arrive out of order. In IPC, you can express backpressure without the need for packet dropping, and therefore can avoid overhead of things like TCP. With IPC, links are trusted, so you can avoid encrypting messages, but that is not something you can safely assume with RPC. Because of these sorts of things, the cost of sending a message is relatively low (measured in us) compared to RPC (measured in hundreds of us), and so the cost of serialization may be of greater concern as it may start to dominate cost. As a result, you may optimize your serialization format differently. Beyond that, an IPC system may allow for advanced usage of the shared kernel which is not possible across different systems each with a separate kernel.
- spc476 5y agoQNX makes no distinction between IPC and RPC. In fact, a program won't be able to tell if the other end of a message port was on the same CPU, same computer, or network (well, maybe by timing results). You didn't even need to recompile code to get that either. It just works right out of the box.
- pjmlp 5y agoYou forgot AIDL, used for Android IPC between apps, and for its pseudo microkernel like functionality introduced in Project Treble.
- cmrdporcupine 5y agoYou missed Mojo, the IPC system in chromium/ChromeOS. Except there's also an older legacy system still used in spots, though it doesn't have an IDL it's more defined in C++ macros.
- isaacimagine 5y agoFIDL could become the defacto standard for cross language communication. I really like where fuchsia is headed. Edit: I say this because fuchsia seems to be an attempt to build an OS from scratch. Introducing a new IPC layer built specifically for the permissions-based language agnostic model of the zicron microkernel will make cross language/cross application interoperability way easier.
- pjmlp 5y agoIt is just yet another IDL. Sun RPC, DCE, CORBA, COM, D-BUS, gRPC, AIDL, XPC,.....
- amitport 5y agoWSDL
- raywu 5y agohttps://xkcd.com/927/ https://xkcd.com/927/
- salgernon 5y agoMIG for mach
- zeusk 5y agoCOM uses MIDL btw
- pjmlp 5y agoSure, I should have been more precise.
- helloooooooo 5y agoCOM/MS-RPC/MIDL are all different things. COM is build on top of MS-RPC and MS-RPC use MIDL to describe their protocol
- 5y ago
- fartcannon 5y ago"Fuchsia is an open source effort to create a production-grade operating system that prioritizes security, updatability, and performance. Fuchsia is a foundation for developers to create long-lasting products and experiences across a broad range of devices. " "Security", "Updatability" ... "Long-Lasting". You'll forgive me google, if I don't believe that these are your true goals. History suggests otherwise. What I'd really like is the list of the ways you're planning to use this to increase how much data you collect on people.
- Mikeb85 5y agoInspect the source then SMH.
- squarefoot 5y agoAlso moving away from the Linux kernel will make even harder to find support for the hardware outside of Fuchsia, not to mention no way to repurpose old devices. If Google really had good intentions beside profits they could promise to open bootloaders and documentation of devices after they're declared obsolete, which wouldn't impact in any way their business, but I don't hold my breath on that.
- Iolaum 5y agoSince Fushia (the OS) is open source I wouldn't be surprised if the community builds a compatibility layer for the binary drivers to run in Linux. It wouldn't be a good thing to end up there though.
- usrusr 5y agoAn alternative perspective would argue that an Android device without a boot breach is already as locked down as it can be, and that the same breach on Fuchsia might give a much easier path to mix and match unchanged components and custom implementations. I don't know which argument carries more weight. Should we expect Fuchsia to take a defense in depth approach to component authentication?
- deleted 5y ago
- jayd16 5y agoStreams are conspicuously absent. I guess you'd just implement some kind of enumerator yourself?
- surajrmal 5y agoCorrect. You can make a request which includes another channel which can be used to stream the results of the original request. You can see guidance on how to do that document here: https://fuchsia.dev/fuchsia-src/development/api/fidl?hl=en#paginating_reads https://fuchsia.dev/fuchsia-src/development/api/fidl?hl=en#p...
- ladyanita22 5y agoI really hope they acknowledge Fuchsia in some way or another in IO 2022. It's taking really long...
- IshKebab 5y agoHow long would you expect an entirely new and modern OS to take?
- spacemanmatt 5y agoFor Google? I do not expect a lengthy implementation period.
- IshKebab 5y agoWhy not? They don't have a magical ability to do things faster. You can't throw 10,000 engineers at it and finish in a week.
- ladyanita22 5y agoI don't know how challenging is this vs. let's say the first NT iteration or the switch to XNU and OSX at Apple, but I'd say Fuchsia is taking waaaay longer. I've read somewhere that Fuchsia's UI is being developed behind closed doors, so it may be in a more ready state than what we believe. I wonder if Starnix and ART are already functional.
- seanw444 5y agoOver the new CPU generations, things have gotten more verbose to handle. For Intel, 16-bit real mode was pretty simple to write code for, and build a system on. But then we needed more RAM, and added memory security from random processes, so then 32-bit protected mode became a thing. And then we needed more RAM again, amongst other features, so then a slew of improvements came with 64-bit, along with all the edge cases and complications that introduces. So hardware has gotten more complex and featureful, which requires more effort and code to handle. There is a variety of popular hardware to support (ARMv7, ARM64, x86, amd64), not to mention network cards, and peripherals. There are so many new protocols and standards to support nowadays. Basically, implementing an OS from scratch seems to get progressively harder and harder as the years go by. The funny thing is, despite how time consuming and difficult it is to get right, web browsers have become so bloated that they're basically just as hard to to implement from scratch.
- AceJohnny2 5y agoWhat is the FIDL "string" type? Please someone tell me they've learned from the decades of C/C++ gotchas and not made them arbitrary-length null-terminated sequences of bytes...
- surajrmal 5y agoThey are variable length utf-8 encoded character sequences with a specified length. They are notably not null terminated: https://fuchsia.dev/fuchsia-src/reference/fidl/language/language?hl=en#strings https://fuchsia.dev/fuchsia-src/reference/fidl/language/lang...
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- pjmlp 5y agoCOM already learned that lesson 25 years ago, they have a length field + null terminator for easily giving them directly to C like APIs, and they needed to provide easy interop between VB and C++. However I wouldn't advise doing that direcly unless you trust the callee.
- londons_explore 5y agoI am disappointed that this IPC mechanism doesn't allow optimization across boundaries. For example, imagine a function call in C++, when compiling with all the optimization on. If a parameter is fixed or unused, the compiler can remove it and the associated memory location and code. But in Fuchsia IDL, there is no opportunity to do similar things. The client must make a fully formed request, and the server must make a fully formed response.
- kjeetgill 5y agoHmm, since the Fuchsia IDL is for IPC how would the two programs communicating know what field the other chose to omit? They'd need to encode present/absent for every single field? Too many optional fields and you end up encoding variable lengths over and over too. They go through great lengths to define alignment, how address space specific pointers are meant to be encoded/decoded in-place, field ordering etc. They seem like opposite ends of the tradeoff spectrum to me. Protobufs drifted towards maximizing optionals, this seems geared towards minimizing them.
- londons_explore 5y agoYou'd have optimisation that happened at the 'connect' phase, which analyzed both binaries, and metadata left by the compiler in each, and optimized the machine code by stripping out unused fields and all the code to generate them. It could also 'inline' some IPC calls by moving server code to the client.
- pjmlp 5y agoHow do expect to ever manage to do that if server and client aren't even guaranteed to be the same language? COM is one of the most battle tested IPC in production, with support for in-process shared libraries, and Microsoft never was crazy enough to try such optimizations on the Windows dynamic linker when loading COM libraries.
- kjeetgill 5y agoThat's a really cool concept I hadn't considered. But ... Too futuristic maybe? I think this operates somewhat closer to a syscall/ABI than a calling convention/FFI than you'd expect.
- tex0 5y agoWhy did they reinvent Protos again?
- moltenguardian 5y agoTo get promoted, of course. Perf is just around the corner.
- remus 5y agoPresumably because protos are designed around RPCs while FIDL is designed for IPC and different trade offs make sense in each case.
- deleted 5y ago[deleted]
- richardfey 5y ago
- kjeetgill 5y agoFeel free to look over: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html In particular: Please don't post insinuations about astroturfing, shilling, bots, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. It's a post about an IDL, a fairly technical domain, for an open source project that's run by Google, sure, but also an incredibly ambitious technical projet. It's literally a post about binary formats. What's there to defend or attack? Oh, just a bunch of side comments not about binary formats or IPC? Downvote and move on. Disclosure: Never worked for Google
- richardfey 5y agoMy bad! I made a mistake. The sequence of comments I saw (when there were around 40) looked uncanny, that's why I commented that way.
- sa46 5y agoHow does backwards compatibility work in FIDL? I'm familiar with protobufs which allow: - Renaming a field: Does FIDL rely on the traversal order for stable IDs? - Converting the type of any field backed by a varint to any other varint field (bool, ints) - Converting a singular field to a repeated field.
- erickt 5y agoABI and API backwards compatibility is written up here: https://fuchsia.dev/fuchsia-src/development/languages/fidl/guides/compatibility https://fuchsia.dev/fuchsia-src/development/languages/fidl/g...
- hutzlibu 5y agoSlightly offtopic: what is the current status of fuchsia? In the sense, of when could one to expect to use it as a daily, stable driver?
- rvz 5y agoGiven that it is already running Chrome: [0] I would guess in another few years or so. Probably will first replace the Linux kernel in ChromeOS first, then Android later. [0] https://9to5google.com/2022/03/04/full-google-chrome-browser-running-on-fuchsia/ https://9to5google.com/2022/03/04/full-google-chrome-browser...
- tssva 5y agoIt depends on what you consider a stable daily driver. Google rolled fushia out to Google Nest Home smart displays starting last August. I have one and use it daily. Is fushia a daily stable driver for me?
- hutzlibu 5y agoInteresting, I didn't know that. But I think you know what I meant. A stable OS for my smartphone and laptop.
- Symmetry 5y agoIt's not really practical if you need more than just a browser and command line right now to run a pure Fuchsia system. But there's dahliaOS which is a sort of hybrid Fuchsia/Linux that I haven't used but is supposed to be pretty practical. https://dahliaos.io/ https://dahliaos.io/
- hutzlibu 5y ago"It's not really practical if you need more than just a browser and command line right now to run a pure Fuchsia system." Well, in ChromeOS I do not really use (or have) much more, so I could probably actually work with that, if all is stable. But I was just curious and maybe look into dahliaOS, if I find the time.
- bigcat123 5y ago
- discreteevent 5y agoWhat I like about Fuchsia is that it is unapologetically component oriented. Such that one of the first pages in the documentation originally pointed at this [0] which brought me right back to the 1990s. Component orientation for me is "Object Orientation - the good bits". You could argue that things like containers are component oriented but it's worth trying to do this right from the ground up with capabilities. [0] https://en.m.wikipedia.org/wiki/Component-based_software_engineering https://en.m.wikipedia.org/wiki/Component-based_software_eng...
- ModernMech 5y agoI’m struck that the project is called Fuchsia, but the website is gray white and teal.
- parkhomenko 5y agoHelp me please. Where is start point in OS? What's a main system part in fuchsia like linux kernel?
- tetromino_ 5y agoThe Zircon kernel: https://fuchsia.dev/fuchsia-src/concepts/kernel https://fuchsia.dev/fuchsia-src/concepts/kernel
- parkhomenko 5y agoMany thanks. There's too many tutorials.
- sreevisakh 5y agoI wonder why their own protobuf of flatbuffers didn't fit the bill.
- kag0 5y agoOdd they reference optional types (note it seems to be a type-level optional rather than field-level) and use this `:optional` syntax. But I don't see a section that explicitly describes what optional is. Or how it's recommended to integrate with different languages. I'm very happy to see the concept does crop up somewhere. It's always a shame to see IDLs that don't leave much room for languages to leverage null-safety features. Especially ones that don't make the distinction between the concept of optional and default (looking at you proto3).