React Native FastIO: Nitro-Powered Performance Boost

youtube-cover
Subtitles
Show
[Music] welcome to the react Universe on air brought to you by Kack a total software engineering consultancy and today as always we are having a cup of coffee because this is a coffee talk and I'm not alone here I have my great guest here the OG the the founder of the company the founder of this podcast Mike grabovski hello hello thank you it's a pleasure to be back uh nice to be here uh I don't have my coffee I just have this big glass of water so I hope that I won't need a break throughout the recording cuz you know I happen to drink a lot of this and it's a big glass it is uh but lucky for me I have a big bottle outside of the camera to refill so I'm better than you yeah uh I mean I don't know this is a coffee tug but I will give you that there was no coffee tug back in your days so you might not be I have to I have to get up to speed with you know all the latest updates you'll get there don't worry about it but um it's very interesting why we are here because today uh is 4th of December and today the thing we are going to talk about is not yet released to the public uh if I am not wrong yes you're right uh but if everything goes right um the big release date will be tomorrow so oh okay okay not too long uh from now yeah so let's let's talk about it we are here to talk about react native fast iio it's a new library and uh it's fast obviously uh it's about I and O inputs and outputs but let's hear more from the from the creator of it so Mike what what the hell is this package about oh well this this package you know it's um building libraries in the open source is like um doing a startup you you pivot every day um originally uh it started as an experiment of using Nitro modules uh I really wanted to build something fast and um you know we spent a lot of time with Mark so we like speed we like cars
we like you know performance and so um I wanted to experiment with something and um when Mark posted his benchmarks about the you know how Nitro is Fuster there was a lot of controversy about you know does it really matter that Nitro is faster at 100K method execution is like who the hell does that right so I was like okay so if I were to do this which module actually could potentially be great candidate to do this and like 100k maybe websockets CU that's more of a real time communication so I I I picked websocket module and I I sort of created it uh in like you know one week uh but then I quickly realized that I need a way more features uh to make it you know faster to make it feature Rich and the problem is that all these features um tend to be tightly coupled together uh like blob file system uh Fetch and so I I figured okay what about turning this into a more uh a broader Library with you know IO Primitives and that's how the idea was born for this Library specifically and the name was just you know a very old school way of naming things which is react native and the actual name the react native keyword in the library name is the best tactic you can have um I always follow that um so yeah that's uh that's what the library is it's a all all different input output Primitives for react native uh and and and potentially uh for other uh Frameworks as well in the future all right so that that was a really nice brief uh description of what it is and um speaking of nitro modules we've done an episode with Mark he's talking all about it so uh go and check it out um but one thing uh you mentioned the io Primitives so can you like elaborate what Primitives you have on your mind when talking IO Primitives um I'm sure there is way more than that I captured uh but the specifically the one that I was missing was blob uh which is you
know uh this um web API for dealing with binary data uh we also do have uh fetch uh I also have fetch in mind a file system and streams um there might be more but I had to draw the line somewhere so I can release this this year so um not saying this is everything but there's like 100 plus apis in the web spec but uh these are the ones I guess that we work with every day yeah yeah they sound like the most popular ones uh all right so having that in mind um so all these Primitives you just mentioned uh they are done by today uh are they like going to be available on the public release uh what's in the library right now yeah so the release uh will include all of them but I would not recommend using um most of them because they're very V uh work in progress I was that's very honest from you I mean I stated in the Ry actually but um website are pretty much ready for testing and uh what's great about websockets is that they're pretty much stable because I'm using the same API on Android is react native itself so there is not really much that can break on iOS I'm using built-in iOS API so something different but still it is just a proxy to like I did not create websocket module in C++ so there is not many things that can go wrong here um however you know fetch uh file system and and streams this is just my experimentation right now so I'm I'm estimating it will take uh you know up to 3 months because I'm doing quite a few things at the same time um uh to get it done uh so you know feel free to experiment I think streams are pretty exciting because up until today we did not really have a native support for streaming in react native uh but you know uh there are some edge cases especially around dealing with bigger files uh some memory leaks I guess uh so I would treat it as experimental feel free to use it give me feedback um help
me prioritize the features that you know we can uh we can we can ship we can get done in this year and and q1 uh but but yeah they're they're they're they're highly experimental and even if you look at fetch it it does not have like 80% of apis I just created it so I can try you know piping stream yeah that was just a prototype and we obviously need to do the actual work now mhm yeah exactly you need to lay out the framework right you need to the base ground on on top of which you can build so I believe that uh you already have some kind of you know architecture built into this library that is let's say stable right you kind of came up with it at the beginning so maybe let's talk about it right now so what what about the architecture there um so this is this is a very good question and I'll uh I I'll try like there is a lot of things to unbox here um um you know the architecture itself um is is is very modular uh in a way that um when when I started building this project uh I I quickly realized that um one of the challenges that I see with the way things are done today is that uh there was very tight coupling uh between uh the JS apis uh I sort of I call them that web spec apis websocket apis is you know a web API M it is tightly CED with the underlying native implementation um and so I wanted to make a very clear um distinction between what's on the front end and I mean the JavaScript and what's on the back end kind of a um IDL of some sort where you know you break down all the native apis that you need to implement and then on top of those native apis you can start composing um those those high order apis so in case of this architecture that really boils down to um three folders and I mean it directs three folders in the repo uh the first one is
Nitro and that's where I put Nitro specs right so if you guys you know have itward Mark episode I highly recommend again because I'm sure um that will become much clearer but just the tldr on that note is uh with Nitro modules uh in order to generate native code so we can Implement your actual code U you have to write the spec right so you know it's a a convention I have that everything that is related to the API I put in Nitro folder that's the source of truth that's so this is the back end part yeah that's the interface description so it tells the native developer okay um if I'm trying to support this library on Android or on iOS or maybe other out of tree platform these are apis that I have to implement and if I Implement them everything will work so that's the contract here then we have native folder that's where you actually Implement that native code so you know for Android for iOS we have actual web so implementation and then we have the JS implementation which takes those low low lowlevel apis and wraps them into something that reassembles those higher order apis there there is few benefits to this and one of them is obviously that you can use both so if you're migrating your code from web to mobile or if you're writing your code in a crossplatform way you can use those higher order apis but if you need something that gives you more control you can always opt out and call those native apis directly so if we think about something like haptics uh this is very benef icial because haptics uh the web API for haptics only has maybe like five variations of you know the the haptic feedback and on iOS you have I don't know I'm just like talking nonsense but like 25 uh something like that um and and you know how do we map that to web like it's not in the spec right and and I really want this to be web
compliant so you can at least call that as well so I guess that's on the architecture side and and that really boils down to the biggest contract that I have for this project I think uh the biggest highlight we can talk performance we can talk the architecture but I think the biggest goal is the web compliance the actual true web compliance um if you look at react native apis there is a lot of things that are missing and and you know nobody really checks this like we don't really run web compliant test Su it to make sure that our webs implementation in react native uh matches all the different assumptions that are on the web most of the time they don't really matter until they do um you know and then somebody's like why is it not implemented yeah exactly so uh so I mean you know it's not like um you know it's not like uh it really matters for most of the people but uh you know if we really want to make sure that our code behaves the same way 100% when we move the business logic across platforms I do think that having this stable uh the stable architecture is is something that um will just make this uh much easier yeah and actually it's it's a great way to contribute to the react Universe to be honest like you're creating a new library that says react native at the start but it's compliant with web which is also react which is also Universe right so um I like how it all just fits into the picture right now you know you are kind of swimming on this on this wave of the trend and you're like fitting in right in or maybe even creating it right now so yeah I mean I mean there there has been a lot of discussions around this and I think there is a lot of appetite in the community to get this done um this by this you mean what I mean I mean those those web compliant apis um and I
think this is really this is really what this project is slowly turning to be um you know if you if if we if we think about it we really re implement the wheel and I hate it uh because I've worked on the CLI and the biggest problem I had with the CLI was that all the CLI tools uh were doing recreating the same stuff and I was like why do we even do this three times if we could share the internals mhm and so uh if you look at it um you know let's take websockets or or maybe storage uh the same code same API has to be written for react native on two platforms unless you do C++ yeah and then you have native script which has its own and then maybe other Frameworks as well that I did not even mention you also have the web and each web you know depending on the browser engine has different implementation as well so I don't think this should this should really be the way we do things I I do think that we should really figure out a way in in in a world a setup in in which we can just you know make Crea native not only web compliant uh but also do it in a way that all Frameworks uh today and in the future can you know take uh take that as well and benefit from it as well yeah and I I like that because it's kind of killing the old school way because I feel I feel like old school way was that all companies Tech creators whoever there was who was not an open source freak they were just you know keeping everything TOS keeping one ecosystem so that nobody else can contribute to it without using I don't know their programming language Apple for say right back in the days only objective c only Swift that's it nothing else works on Apple then boom let's let's bring the new crossplatform way of doing things and that now evolves into crossplatform as per web per mobile and you know unifying all these apis I like like the
way it works because it it opens Minds right it shows that hey guys we can cooperate we don't need to be like self floating island yeah I mean it definitely it definitely there is definitely a lot of benefits to just controlling that uh especially early stage and I think re native wouldn't be that successful if it started building this community effort I mean what we have to understand about open source is that at the end of the day uh you know it's okay there are projects that driven by foundation and they don't really have any goals in mind but for projects like react and react native uh there is really a lot of business goals behind them and you know meta is putting a lot of effort into running this and and you know obviously it makes a lot of sense to prioritize the things that they do care about yeah um so I guess that's that's one part of the story uh and I also think that you know historically speaking some of these things just wouldn't be possible and I mean you know if we wanted to do this 8 years ago we did not have J SI I and C++ m i I'm not sure if an API was there from node um because you know this is the thing that is this stable abstraction that we can use um for just basically compiling module Wes and plugging to many different Frameworks so I think that you know when I always think about projects like this I I think about connecting the dots that's my favorite allegory and it's like this all connects backwards to all the different smaller breadcrumbs that we as a community and other great folks in the community did over time what we do right now is just it's time that we can now take all them together and potentially create something that could um turn this into a full sort of unified um JS environment all right that's and that's the dream right uh so okay so coming back to the to the
library itself uh we've spoken about modules uh a web modules crossplatform modules architecture yeah the purpose so what were the biggest challenges when you started working on this project did you have these um these moments like you're ah damn this this again I mean I mean the first one sorry Mark was just trying to understand what the hell is going on with Nitro modules um cuz I was I was you know I started using Nitro way before pu release and um so that was before the cool uh documentation page yeah yeah I remember the first one um and you know I'm I'm I'm I always like digging through the code but uh there were times where something just wouldn't work and uh you know I I used to write a lot of C++ at my University um and then early early stage you know when I was working for client projects uh I was doing you know C++ goang and stuff like that but you always need sometime to get up and running again especially with you know languages like this so um there were a few issues with builds and Nitro generally was something that I was trying to figure once I figured it and mark thank thank thank thank thanks to him fixed a lot of things for me um that unblocked a lot of things uh then I think the the biggest um you know um the biggest um moment where I was like um at the edge of like whether we're going to release it at all or not was when I completed it and I'm like okay so now you know the the whole reason that was before I you know came up with the idea of crossplatform modules mhm uh and this is by the way another great thing about open source is that you don't really have to have it all planned out I mean when I started this was just websocket modules and you know it's it's like you start branching out with different ideas as you go and this is really exciting but back in the day the the whole reason
I started working on it was uh you know the um the websocket stuff that was the first tweet I posted and um and and you know I um I figured um okay the websocket API is working now what if we Benchmark it you know and I wrote this Benchmark and I run it and I'm like why this thing is 10 times slower than react native like what is even going on here I'm like oh my God I just lost so much time uh it was supposed to be faster right yeah exactly uh I did run the benchmarks eventually I fixed the benchmarks and you know I made the benchmarks to be the benchmarks I like jokes aside I return number yeah I ended end up fixing the code which was great um I did have uh some discussions with uh some of my friends in the community and I decided uh not to public uh not not I decided just to just to hide I mean not to hide them just get rid of the benchmarks M um the reason was I don't don't really think uh the benchmarks are the reason why this project is so cool and I don't really want to get into the discussion whether my Benchmark methodology is this or that you know I think it's fast it is faster in certain conditions whether that matters or not is a second question but I think if you're thinking about using it I would just think about different benefits like buil-in binary support which which is huge uh thanks to Nitro uh these are the things that I think make the difference not the performance because you know you maybe have something that is slower already anyways like yeah you know premature optimiz is your enemy I say so and this is this is something you learn uh by experience usually right yeah yeah yeah I mean I I I I was lucky to you know work on a few projects where um we had a lot of used memo hooks MH and yeah I can I can 100% certify that U if you use them too too
much uh they will not help you with the performance uh but this is a topic for another stuff I guess compiler podcast or exactly on a side note I can of help uh just having this feeling while while you were speaking I had um like a while ago we had an interview with jar suner the creator of bun JS oh really yeah that's right right here in this uh in this podcast and he also mentioned like how he started with BN he was like you know what I was just building a game and I wanted better package management just I wanted to give it a try oh yeah and so he did that it he did benchmarks as you said it turned out it's much faster he he really reled to open source and then it became much more than just that yeah and again he just wanted to play with it you know he wanted to see if he can make something better than I think npm back than he was using yeah I I love him like I love what he's doing and part of the reason like you know if nothing really mattered and I was retired I would just do crazy open stores projects and I would do them um you know all the time and so um these projects I would pick crazy languages that I and the fact that he picked Z yeah is like uh is like oh my God like I love him and so when I met with my friends uh here at KY and we were about to uh uh and we were about to do some crazy stuff together I was like okay we know what we want to do but now let's talk about the crazy language we're going to use and they're like oh yeah let's use this let's use that and I'm like okay Zig is so cool so the fact B uses Zig is cool I think you know he's really passionate about what he's building and I think he said that the zig actually allowed him to make it this fast like the the the the the techniques that are built into this language and the way he can optimize it but anyway you seen the benchmarks by the way there
is this uh ongoing um animation of 100 times 100K Fibonacci or something like this I haven't with the balls going from left to right left right no I have and so python is going like this I'm going to show it to the camera like this and ban is going like this ban is going as fast as C oh really yeah or or actually is not I don't know but I need to find this animation then it's the fastest out of the all I guess so um good job Jared and the team yes exactly anyway maybe one day um we will actually get the collaboration between ban react native Community because I think right now uh it's still not uh uh pretty well uh supported but coming back to our uh main topic react native fast IO uh as we have spoken about challenges and how you have overcome them I think we can maybe give our listeners viewers a little bit of an idea of what you can actually do with this Library like what's what do you see or where do you see this Library you know thriving the most what kind of projects what kind of tasks what do you think so I think um so I think there is a few things um first of all this is a primitive library and um you will have to use it as a library author if you want to benefit from it say you're building a file picker video library or anything really that works with uh Native Native Native um Native data you can use this and build on top of streams build on top of blob so that it will all become imposable mhm I'm not saying this is perfect because For A Primitive important like that things should really be in the core uh however there are certain limitations with the um existing um Objective C uh to C++ inter on iOS that makes things like supporting binary data a problem okay and um binary data and R buffers natively supported is is what I think is the biggest biggest
advantage of nitro it is not the performance to be honest um so that's one thing if you're building a library use this and then your users will have nice stuff uh the second thing is if you're building a application that is heavy on resources I also use this uh I'm providing some primitive apis to help you like the file system API that will help you pick a file the file picker returns a blob and the blob we have in the library is web compliance so unlike react native it will have dot stream it will have buffer and these are methods that return a readable stream for example so you can do something like blob.
stream and you
can pipe it so I mean either you can pipe it or you can use the fetch from the library and you can write fetch as a request body you just put the blob okay and there is nothing in the memory yeah it's all lazy as soon as the fetch request starts being executed The Blob will be piped chunk by chunk to the network and so I have this video on my Twitter where I stream upload 1.
2 gig
file and the memory is like not even picking up nice uh subject to I guess one memory leak but that's irrelevant so I guess the point is that uh the memory stays flat so if you're building anything that really works with the data I would say this is huge mhm and then you know websocket module support this out of the box there is no additional native dependencies Beyond nro because webset uses same uh internals on Android as react native anyway and uh built-ins on iOS so uh anything real time uh and you know this is just where your creative mind can can can can really go uh because you know web socket also supports streaming binary data so if you have an image you can stream it with websockets and we're actually going to stream and pass an actual binary data so we're not going to serialize it to
string so you know if you're if you want to stream an image over webs or if you're using grpc or something like that for any procedure calling uh this is great and because you can save a lot of time yeah realizing is not the fastest and we're just getting started because I did not really mention web RTC and all those different apis you know when you think about it you can pretty much redefine every single API so um I guess these are the use cases and now what we have to do is we have to um we have to just get started so um that that's what I would say is is is a good getting started so so from the like more abstract level let's say you know if you have up like you know Snapchat back in the days or something that is uh allowing you for live calls with the video or just streaming the pictures of more big files and storing areat Library it yes yes and and to be to be even more specific historically you would have to write those uh that code natively right uh if you wanted to stream upload a big file on iOS or Android you would have to write this code natively I guess and you would pretty much build the same abstraction with streams MH um now you don't have to do this anymore uh we don't have support for background tasks yet uh but these are all the things that we have uh on our road map in mind so typically the idea here is that you can um you will potentially be able to build all these I mean this is not changing anything as far as you know I was not it was not possible to build something in the past what this makes possible is you can just write it once in JavaScript now and and and if you have this code already on the web which you you might have in a web worker or of some sort yeah it should just work so that's uh that's nice that's nice because the abstractions you
have and if you think about web compliance if you learn this really once you can just write it right you don't have to figure all the different Native apis or even maybe delegate this you can just write it and or rewrite it but you can just reuse the assumptions you have exactly all right that that is fun so there's nothing more for people to just try to use it if you have such an apple ready such a project just drop it and try to make it work and see how it affects your project because this is interesting like as you said those benchmarks you don't know different projects may have different environments and these benchmarks might be completely different right yeah I I guess yeah I would recommend trying it out and you know what I what I have to admit here is that I really stretched the release of this project um one lesson that I have learned is that you have to release early and and and break things and I'm I'm I'm quoting you know Mark um the Zak not Mark RAV although um although he also has some nice quotes I'm not sure if I can actually publicly State them but uh here is the point I should have released this Library two weeks ago I'm very honest the problem was I was like okay maybe it's not ready yet I'm going to finish it and then you know 5:00 a.
m.
at the gym in the in New York I was jet locked I wake I woke up I I went to do my workout and and this idea another Library came through my mind uh the AI agent and I'm like we'll get there we'll get there God I'm I'm building this you know and then two weeks pass like that and I'm okay I should have released it because I would already have feedback from the people and and when I have feedback I know how to operate and execute so uh going to release it finally tomorrow um because you know when you release early there is less
pressure If you make if you stretch it it's like oh big release comes up and it's not really big I'm just I'm just switching the T yeah that's that's very interesting what you just said because I have literally uh read that uh you know there was like on LinkedIn you get sometimes those posts by great Founders like top 10 things I've learned during my career and one of them is like there is no big release like just accept it there's no big release nobody cares when you release your app it will grow through the time I mean you know uh I was thinking about those ideas yesterday and what came to my mind was that i h i like one of my projects needs to be very successful because unless I mean until that happens they will just call me crazy you know but when it becomes successful your crazy ideas turn are turned into a guideline basically so until that happens I'm just the crazy guy uh shipping five things at a time um but you know this is uh this is pretty sick actually you know I I I don't know I think my eyes are even like you know sort of like swirling aware like I'm not aware like looks like I'm I'm you know I'm I'm not mentally present in this room like I'm just staring somewhere this is a remote go man yeah I know I mean that's the Deep uh deep deep Flow State you know um which I envy you I honestly would love to be there right now because you you said you are stretching this uh release date dude you are like the person who ships the fastest from the people I like follow or no and you still talk about strength in release I mean I I have to I have to catch up you know I I've been I've been um oh my God I I I swear a lot so I need to really adjust my language here but I've been uh let's say playing around with uh different uh uh different uh ecosystems for the past two years you
know AI web 3 they will eventually come together so I'm not saying that was a wasted time but God I'm so excited to be back because you know here it's like I open my laptop and one week is gone and I I don't even know what I'm doing I'm just you know I'm just hacking on stuff so um yeah you're not uh doing science you are just bringing Innovation yeah although I wish I had the PHD because you know um especially in the age of AI there is the the it is fascinating how I think uh degree is becoming more relevant I guess because this is more related to science every day yeah yeah with coding was like ah you don't need this University just go to a boot camp I'm I'm I'm happy that I finished my uh my first degree um yeah humble brag of course humble brag uh even though you know what's funny um I was searching for something on my email lately and I I have this very old conversation with the I don't know was this uh translation in English but you know this this this person that's running the the the the office uh at the University when you have yeah yeah yeah yeah so she she emailed me that there they need some papers for me to sort of print the diplom for me like the photo and stuff and I'm like I respond every 3 months saying oh I'm sorry I was outside of the country on a business trip and everybody thinks I'm lying but this is true and then at the end nine months later I say um thank you for your email I will uh I will deliver the photos on Monday uh apologies for the delay and then I say to be very honest I don't really need this diplom so um that's why I was not really you know acting good and I was like okay I finished that University but I don't really need the paper though so you were like proving to the university like look I did what you asked me to do but I don't need you anymore like I
never needed you I mean you know I see what you need nobody never asked me for it it's quite funny I wonder if uh I wonder if you know how many people do this actually but um you know if you put that you finished that at some University like did anybody ever ask you for your diplom like just bring it for the unless you're on the uh you know sort of job employment contract May yeah no never yeah you know could have just finished stford you know exactly and nobody would give a no fact checking yeah just you know talk talk talk nice stuff and exactly uh but I think I feel like that could be separate episode just just for for Giggles but uh let's move on then um so we know the secret sauce I have a question about Secret Sauce but the secret sauce he here was Nitro modules as you mentioned and the architecture basically um so let's talk about um other stuff which means um can you tell us uh like you mentioned we have like four or five um modules right now in the in the library right so the the fetch the blob the system are they all would you say stable enough to start using them in the projects or is it all experimental and you know be careful with all of them I mean I mean websocket is is stable blob uh blob is uh is stable but it it lacks one method uh streaming uh is is is not stable definitely it works but it will break uh and the API may change uh we're trying to figure uh where to draw the abstraction right now we have um Primitives on the native side but we still create uh the readable stream on the JS side and that introduces a bit of an overhead I think the long-term idea for us is to move towards the na API and just have the entire streaming API that you know is entirely web compliant be written on the C++ side mhm potentially pulled from a browser engine like
mozilla's engine or that's probably a good good uh good Community move um the file system it works but there there might be some much cases that I did not think about I think on Android that there is a crash so okay I mean use it so you tell me what's not working and then fetch is also missing stuff I mean they're all working progress the one that is I believe ready for testing and I would say it's better is it's funny how in the read mey I flagged better with the green check like as if it was stable that that it's stable better exactly uh you know um never one.
release though uh so I would say use websockets play around with everything else uh give feedback um issues about you know things that you would like to see uh things that you would do different and if there is anybody passionate about uh that that that subject of crossplatform uh modules also let me know um that is a huge effort you know um we will have to figure out a lot of things when we before we get this done so I really invite everybody to join me and and and and then let's ship it what the best way to to connect against what everybody tells you but just open up get habish I mean the project uh the project is such a low profile now that this is the the easiest way um you know I I I didn't have time to figure the Discord server uh situation so uh so I think when I figure the Discord situation then um I would say Discord so okay um if we figure the Discord out it will be in the show not show notes if it's not there just open up get Hub issue I guess but also Twitter me contact me on Blue Sky whatever works I'm good uh so that is that is not a problem all right all right cool um so we are wrapping this episode up um I think we know a lot tomorrow is the release uh if everything
goes well and I have fingers crossed nothing breaks or no other ideas come to my mind because uh to be very honest I just came up with another one today and that's why you're not getting coffee today that's it yeah you stick to the water but I'm also on the white diet if that's a phrase in English so not a hugee fan of coffee with milk what I'm saying so I um yeah and I also have to use the straw which is you know a bummer but um I mean the things are the way they are and yeah I mean I mean you know the problem here is that uh you know I I spoke with Mark yesterday and he's like oh Mike what are you up to and I'm like I have fire up on my ass and he's like oh what's happening I'm like I'm shipping every day I I basically took inspiration from you and I and ixed it and he's like oh that nice that's cool but keep uh keep this one thing in mind and he he said to me that um um we also talked about lumos but this attitude has serious bad effects on any real life Relationships by the way just a disclaimer you know uh so I I am broadcasting this disclaimer to everybody um because um on one hand I would like to say just get some rest and and and stuff like that but the other you know it's like when you don't finish something you just have troubles going to sleep like I'm exactly yeah dreaming I'm dreaming of people I work with and and about code which I think is weird but I hope people don't mind yeah I mean I mean um oh man so okay so I tell you one more my One More Story you can cut it but uh all right I I I you know we we have this um our head of marketing Amilia um I came up to her on Tuesday and I say Hey listen I had a dream and in this dream I saw you and and and your hair like was cut like completely like you had oh like you know short hair like me MH she has long hair and I'm like I
don't know what that means but it was just weird you know and and she says you know what's funny the day before we had this Workshop um about team building and one of the exercises we had was uh you know pick the Lego um you know figure figure yes that you feel most connected with and she picked the one with the uh short hair oh like okay that is that is getting weird you know that is getting weird I think some energy is floating around so this is what happens when you get in the flow state for too long you start connecting with others yeah so if I had a if I have a dream about this podcast and you and the crew I'll I I make sure to let you know let me say this this way thank you very much uh all right guys um one last note from me at the end uh is well is actually pretty exciting and I know Mike is excited about it too react Universe conference is coming in 2025 and uh we know the dates we know the prices well from the 2nd until 4th of September 2025 react Universe con is coming back to VAV and uh you can as always expect top Minds top speakers who knows maybe this guy will be there again because he was there last year I mean this year and and um yeah you can grab your tickets already this is the spoiler alert no this you know I I really have to figure this uh speaking situation for the future self because you know it's like when you sign up for a speaker slot you're excited but then the day before you're like oh my God why did I sign up for this what am I doing but I do have this friend and he always goes to panels okay and this is smart because pels are the best you get to enjoy all the conference benefits and you can just you know talk about things you're building which is awesome it's like right now yeah EXA exactly cuz with the slides slides are also very exciting but the
problem is um preparing them yeah I don't know anybody who makes them earlier than like two weeks yeah and I'm I'm I'm I'm stretching this already because I usually do it like uh I I'm not doing this two hours before that's my younger self now I do like the day before I mean like I I'm pretty sure our uh podcast producer all would prepare these slides like a month before because that's the way she likes to have everything organized but she already knows uh how to work with me I guess uh we crossed our paths uh before and um I think when when I asked her to look at my slides from The Branding perspective the day before the conference that was the moment she realized I am a uh great person yes uh exactly she's sending us Hearts right now so cool yeah so um I I interrupted you but um I guess um we have the early birds yes we do have early bird whatever is the name now uh early birds I bet I bet and uh the the price is the lowest that it will ever be until the conference right now early birds I will not say the price cuz it's difficult number but you can check it out on the website I'm pretty sure um is the is is the difficult number in Europe because it's in zote and we converted or like I'm I'm curious like I would love to understand the logic between that decimal points but I love it it's such a it's yeah yeah the vat situation I guess yeah I guess so so that would be all everybody uh so stay tuned for the tomorrow's release I mean by the time we release this episode it's already out there so maybe if you had a chance to use the library drop a comment say what you think uh drop an issue if if you find any or even better fix them and uh make a request yes I would love to I would love to and um I think uh from my side I I wanted to say thanks for having me and uh you know I had a discussion
with uh one guy uh in the past and he asked me how can I get better at programming and you know I think a lot of people asked about this uh and I said to him you know I'm not goingon to like I don't like giving advices obviously because you know advice is like it's easy to give advices if you're not accountable for the results of them but I said You know here are the open source projects that I do and if you find anything you know remotely exciting uh just you know get on those projects uh check the issues maybe open PR just get in touch with me and that's how you will become a better programmer so I guess if anybody will have to sort of explore some stuff maybe about iio streaming native code C++ and is like struggling to get started I'm I'm happy to help you you know make the contribution uh so you know just uh yeah I think this is a great idea thanks for you know dropping this and yeah uh awesome get in touch on good and let's let's hack I love it all right everybody thank you very much and again Mike thank you for joining us today here in the studio by person I love it yeah it's it's you when you say back in the studio do you also have this song in your in the back of the hand back in now it's oh my God let me let me actually quickly back in this hipop song it's um oh it's it's it's not just lyrics it's you know uh the beat it's the beat When the Beat is there's like this guy saying bag in the studio I but I I I keep hearing this song throughout the whole day so I don't know that was the destiny that's why you are back in the studio I'll try to remember the name for the next coffee talk so maybe we can uh you know uh risk demonetization and and copyrights on YouTube and just put it uh fa fair use stuff right like 5 Seconds should be
Timestamps
Show
Listen on Spotify
Watch on YouTube
Listen on SoundCloud
Listen on Apple Podcasts
Guests
Mike Grabowski
CTO & Founder
@
Callstack
Host
Jakub Urban
Software Engineer
@
Callstack
[Music] welcome to the react Universe on air brought to you by Kack a total software engineering consultancy and today as always we are having a cup of coffee because this is a coffee talk and I'm not alone here I have my great guest here the OG the the founder of the company the founder of this podcast Mike grabovski hello hello thank you it's a pleasure to be back uh nice to be here uh I don't have my coffee I just have this big glass of water so I hope that I won't need a break throughout the recording cuz you know I happen to drink a lot of this and it's a big glass it is uh but lucky for me I have a big bottle outside of the camera to refill so I'm better than you yeah uh I mean I don't know this is a coffee tug but I will give you that there was no coffee tug back in your days so you might not be I have to I have to get up to speed with you know all the latest updates you'll get there don't worry about it but um it's very interesting why we are here because today uh is 4th of December and today the thing we are going to talk about is not yet released to the public uh if I am not wrong yes you're right uh but if everything goes right um the big release date will be tomorrow so oh okay okay not too long uh from now yeah so let's let's talk about it we are here to talk about react native fast iio it's a new library and uh it's fast obviously uh it's about I and O inputs and outputs but let's hear more from the from the creator of it so Mike what what the hell is this package about oh well this this package you know it's um building libraries in the open source is like um doing a startup you you pivot every day um originally uh it started as an experiment of using Nitro modules uh I really wanted to build something fast and um you know we spent a lot of time with Mark so we like speed we like cars
we like you know performance and so um I wanted to experiment with something and um when Mark posted his benchmarks about the you know how Nitro is Fuster there was a lot of controversy about you know does it really matter that Nitro is faster at 100K method execution is like who the hell does that right so I was like okay so if I were to do this which module actually could potentially be great candidate to do this and like 100k maybe websockets CU that's more of a real time communication so I I I picked websocket module and I I sort of created it uh in like you know one week uh but then I quickly realized that I need a way more features uh to make it you know faster to make it feature Rich and the problem is that all these features um tend to be tightly coupled together uh like blob file system uh Fetch and so I I figured okay what about turning this into a more uh a broader Library with you know IO Primitives and that's how the idea was born for this Library specifically and the name was just you know a very old school way of naming things which is react native and the actual name the react native keyword in the library name is the best tactic you can have um I always follow that um so yeah that's uh that's what the library is it's a all all different input output Primitives for react native uh and and and potentially uh for other uh Frameworks as well in the future all right so that that was a really nice brief uh description of what it is and um speaking of nitro modules we've done an episode with Mark he's talking all about it so uh go and check it out um but one thing uh you mentioned the io Primitives so can you like elaborate what Primitives you have on your mind when talking IO Primitives um I'm sure there is way more than that I captured uh but the specifically the one that I was missing was blob uh which is you
know uh this um web API for dealing with binary data uh we also do have uh fetch uh I also have fetch in mind a file system and streams um there might be more but I had to draw the line somewhere so I can release this this year so um not saying this is everything but there's like 100 plus apis in the web spec but uh these are the ones I guess that we work with every day yeah yeah they sound like the most popular ones uh all right so having that in mind um so all these Primitives you just mentioned uh they are done by today uh are they like going to be available on the public release uh what's in the library right now yeah so the release uh will include all of them but I would not recommend using um most of them because they're very V uh work in progress I was that's very honest from you I mean I stated in the Ry actually but um website are pretty much ready for testing and uh what's great about websockets is that they're pretty much stable because I'm using the same API on Android is react native itself so there is not really much that can break on iOS I'm using built-in iOS API so something different but still it is just a proxy to like I did not create websocket module in C++ so there is not many things that can go wrong here um however you know fetch uh file system and and streams this is just my experimentation right now so I'm I'm estimating it will take uh you know up to 3 months because I'm doing quite a few things at the same time um uh to get it done uh so you know feel free to experiment I think streams are pretty exciting because up until today we did not really have a native support for streaming in react native uh but you know uh there are some edge cases especially around dealing with bigger files uh some memory leaks I guess uh so I would treat it as experimental feel free to use it give me feedback um help
me prioritize the features that you know we can uh we can we can ship we can get done in this year and and q1 uh but but yeah they're they're they're they're highly experimental and even if you look at fetch it it does not have like 80% of apis I just created it so I can try you know piping stream yeah that was just a prototype and we obviously need to do the actual work now mhm yeah exactly you need to lay out the framework right you need to the base ground on on top of which you can build so I believe that uh you already have some kind of you know architecture built into this library that is let's say stable right you kind of came up with it at the beginning so maybe let's talk about it right now so what what about the architecture there um so this is this is a very good question and I'll uh I I'll try like there is a lot of things to unbox here um um you know the architecture itself um is is is very modular uh in a way that um when when I started building this project uh I I quickly realized that um one of the challenges that I see with the way things are done today is that uh there was very tight coupling uh between uh the JS apis uh I sort of I call them that web spec apis websocket apis is you know a web API M it is tightly CED with the underlying native implementation um and so I wanted to make a very clear um distinction between what's on the front end and I mean the JavaScript and what's on the back end kind of a um IDL of some sort where you know you break down all the native apis that you need to implement and then on top of those native apis you can start composing um those those high order apis so in case of this architecture that really boils down to um three folders and I mean it directs three folders in the repo uh the first one is
Nitro and that's where I put Nitro specs right so if you guys you know have itward Mark episode I highly recommend again because I'm sure um that will become much clearer but just the tldr on that note is uh with Nitro modules uh in order to generate native code so we can Implement your actual code U you have to write the spec right so you know it's a a convention I have that everything that is related to the API I put in Nitro folder that's the source of truth that's so this is the back end part yeah that's the interface description so it tells the native developer okay um if I'm trying to support this library on Android or on iOS or maybe other out of tree platform these are apis that I have to implement and if I Implement them everything will work so that's the contract here then we have native folder that's where you actually Implement that native code so you know for Android for iOS we have actual web so implementation and then we have the JS implementation which takes those low low lowlevel apis and wraps them into something that reassembles those higher order apis there there is few benefits to this and one of them is obviously that you can use both so if you're migrating your code from web to mobile or if you're writing your code in a crossplatform way you can use those higher order apis but if you need something that gives you more control you can always opt out and call those native apis directly so if we think about something like haptics uh this is very benef icial because haptics uh the web API for haptics only has maybe like five variations of you know the the haptic feedback and on iOS you have I don't know I'm just like talking nonsense but like 25 uh something like that um and and you know how do we map that to web like it's not in the spec right and and I really want this to be web
compliant so you can at least call that as well so I guess that's on the architecture side and and that really boils down to the biggest contract that I have for this project I think uh the biggest highlight we can talk performance we can talk the architecture but I think the biggest goal is the web compliance the actual true web compliance um if you look at react native apis there is a lot of things that are missing and and you know nobody really checks this like we don't really run web compliant test Su it to make sure that our webs implementation in react native uh matches all the different assumptions that are on the web most of the time they don't really matter until they do um you know and then somebody's like why is it not implemented yeah exactly so uh so I mean you know it's not like um you know it's not like uh it really matters for most of the people but uh you know if we really want to make sure that our code behaves the same way 100% when we move the business logic across platforms I do think that having this stable uh the stable architecture is is something that um will just make this uh much easier yeah and actually it's it's a great way to contribute to the react Universe to be honest like you're creating a new library that says react native at the start but it's compliant with web which is also react which is also Universe right so um I like how it all just fits into the picture right now you know you are kind of swimming on this on this wave of the trend and you're like fitting in right in or maybe even creating it right now so yeah I mean I mean there there has been a lot of discussions around this and I think there is a lot of appetite in the community to get this done um this by this you mean what I mean I mean those those web compliant apis um and I
think this is really this is really what this project is slowly turning to be um you know if you if if we if we think about it we really re implement the wheel and I hate it uh because I've worked on the CLI and the biggest problem I had with the CLI was that all the CLI tools uh were doing recreating the same stuff and I was like why do we even do this three times if we could share the internals mhm and so uh if you look at it um you know let's take websockets or or maybe storage uh the same code same API has to be written for react native on two platforms unless you do C++ yeah and then you have native script which has its own and then maybe other Frameworks as well that I did not even mention you also have the web and each web you know depending on the browser engine has different implementation as well so I don't think this should this should really be the way we do things I I do think that we should really figure out a way in in in a world a setup in in which we can just you know make Crea native not only web compliant uh but also do it in a way that all Frameworks uh today and in the future can you know take uh take that as well and benefit from it as well yeah and I I like that because it's kind of killing the old school way because I feel I feel like old school way was that all companies Tech creators whoever there was who was not an open source freak they were just you know keeping everything TOS keeping one ecosystem so that nobody else can contribute to it without using I don't know their programming language Apple for say right back in the days only objective c only Swift that's it nothing else works on Apple then boom let's let's bring the new crossplatform way of doing things and that now evolves into crossplatform as per web per mobile and you know unifying all these apis I like like the
way it works because it it opens Minds right it shows that hey guys we can cooperate we don't need to be like self floating island yeah I mean it definitely it definitely there is definitely a lot of benefits to just controlling that uh especially early stage and I think re native wouldn't be that successful if it started building this community effort I mean what we have to understand about open source is that at the end of the day uh you know it's okay there are projects that driven by foundation and they don't really have any goals in mind but for projects like react and react native uh there is really a lot of business goals behind them and you know meta is putting a lot of effort into running this and and you know obviously it makes a lot of sense to prioritize the things that they do care about yeah um so I guess that's that's one part of the story uh and I also think that you know historically speaking some of these things just wouldn't be possible and I mean you know if we wanted to do this 8 years ago we did not have J SI I and C++ m i I'm not sure if an API was there from node um because you know this is the thing that is this stable abstraction that we can use um for just basically compiling module Wes and plugging to many different Frameworks so I think that you know when I always think about projects like this I I think about connecting the dots that's my favorite allegory and it's like this all connects backwards to all the different smaller breadcrumbs that we as a community and other great folks in the community did over time what we do right now is just it's time that we can now take all them together and potentially create something that could um turn this into a full sort of unified um JS environment all right that's and that's the dream right uh so okay so coming back to the to the
library itself uh we've spoken about modules uh a web modules crossplatform modules architecture yeah the purpose so what were the biggest challenges when you started working on this project did you have these um these moments like you're ah damn this this again I mean I mean the first one sorry Mark was just trying to understand what the hell is going on with Nitro modules um cuz I was I was you know I started using Nitro way before pu release and um so that was before the cool uh documentation page yeah yeah I remember the first one um and you know I'm I'm I'm I always like digging through the code but uh there were times where something just wouldn't work and uh you know I I used to write a lot of C++ at my University um and then early early stage you know when I was working for client projects uh I was doing you know C++ goang and stuff like that but you always need sometime to get up and running again especially with you know languages like this so um there were a few issues with builds and Nitro generally was something that I was trying to figure once I figured it and mark thank thank thank thank thanks to him fixed a lot of things for me um that unblocked a lot of things uh then I think the the biggest um you know um the biggest um moment where I was like um at the edge of like whether we're going to release it at all or not was when I completed it and I'm like okay so now you know the the whole reason that was before I you know came up with the idea of crossplatform modules mhm uh and this is by the way another great thing about open source is that you don't really have to have it all planned out I mean when I started this was just websocket modules and you know it's it's like you start branching out with different ideas as you go and this is really exciting but back in the day the the whole reason
I started working on it was uh you know the um the websocket stuff that was the first tweet I posted and um and and you know I um I figured um okay the websocket API is working now what if we Benchmark it you know and I wrote this Benchmark and I run it and I'm like why this thing is 10 times slower than react native like what is even going on here I'm like oh my God I just lost so much time uh it was supposed to be faster right yeah exactly uh I did run the benchmarks eventually I fixed the benchmarks and you know I made the benchmarks to be the benchmarks I like jokes aside I return number yeah I ended end up fixing the code which was great um I did have uh some discussions with uh some of my friends in the community and I decided uh not to public uh not not I decided just to just to hide I mean not to hide them just get rid of the benchmarks M um the reason was I don't don't really think uh the benchmarks are the reason why this project is so cool and I don't really want to get into the discussion whether my Benchmark methodology is this or that you know I think it's fast it is faster in certain conditions whether that matters or not is a second question but I think if you're thinking about using it I would just think about different benefits like buil-in binary support which which is huge uh thanks to Nitro uh these are the things that I think make the difference not the performance because you know you maybe have something that is slower already anyways like yeah you know premature optimiz is your enemy I say so and this is this is something you learn uh by experience usually right yeah yeah yeah I mean I I I I was lucky to you know work on a few projects where um we had a lot of used memo hooks MH and yeah I can I can 100% certify that U if you use them too too
much uh they will not help you with the performance uh but this is a topic for another stuff I guess compiler podcast or exactly on a side note I can of help uh just having this feeling while while you were speaking I had um like a while ago we had an interview with jar suner the creator of bun JS oh really yeah that's right right here in this uh in this podcast and he also mentioned like how he started with BN he was like you know what I was just building a game and I wanted better package management just I wanted to give it a try oh yeah and so he did that it he did benchmarks as you said it turned out it's much faster he he really reled to open source and then it became much more than just that yeah and again he just wanted to play with it you know he wanted to see if he can make something better than I think npm back than he was using yeah I I love him like I love what he's doing and part of the reason like you know if nothing really mattered and I was retired I would just do crazy open stores projects and I would do them um you know all the time and so um these projects I would pick crazy languages that I and the fact that he picked Z yeah is like uh is like oh my God like I love him and so when I met with my friends uh here at KY and we were about to uh uh and we were about to do some crazy stuff together I was like okay we know what we want to do but now let's talk about the crazy language we're going to use and they're like oh yeah let's use this let's use that and I'm like okay Zig is so cool so the fact B uses Zig is cool I think you know he's really passionate about what he's building and I think he said that the zig actually allowed him to make it this fast like the the the the the techniques that are built into this language and the way he can optimize it but anyway you seen the benchmarks by the way there
is this uh ongoing um animation of 100 times 100K Fibonacci or something like this I haven't with the balls going from left to right left right no I have and so python is going like this I'm going to show it to the camera like this and ban is going like this ban is going as fast as C oh really yeah or or actually is not I don't know but I need to find this animation then it's the fastest out of the all I guess so um good job Jared and the team yes exactly anyway maybe one day um we will actually get the collaboration between ban react native Community because I think right now uh it's still not uh uh pretty well uh supported but coming back to our uh main topic react native fast IO uh as we have spoken about challenges and how you have overcome them I think we can maybe give our listeners viewers a little bit of an idea of what you can actually do with this Library like what's what do you see or where do you see this Library you know thriving the most what kind of projects what kind of tasks what do you think so I think um so I think there is a few things um first of all this is a primitive library and um you will have to use it as a library author if you want to benefit from it say you're building a file picker video library or anything really that works with uh Native Native Native um Native data you can use this and build on top of streams build on top of blob so that it will all become imposable mhm I'm not saying this is perfect because For A Primitive important like that things should really be in the core uh however there are certain limitations with the um existing um Objective C uh to C++ inter on iOS that makes things like supporting binary data a problem okay and um binary data and R buffers natively supported is is what I think is the biggest biggest
advantage of nitro it is not the performance to be honest um so that's one thing if you're building a library use this and then your users will have nice stuff uh the second thing is if you're building a application that is heavy on resources I also use this uh I'm providing some primitive apis to help you like the file system API that will help you pick a file the file picker returns a blob and the blob we have in the library is web compliance so unlike react native it will have dot stream it will have buffer and these are methods that return a readable stream for example so you can do something like blob.
stream and you
can pipe it so I mean either you can pipe it or you can use the fetch from the library and you can write fetch as a request body you just put the blob okay and there is nothing in the memory yeah it's all lazy as soon as the fetch request starts being executed The Blob will be piped chunk by chunk to the network and so I have this video on my Twitter where I stream upload 1.
2 gig
file and the memory is like not even picking up nice uh subject to I guess one memory leak but that's irrelevant so I guess the point is that uh the memory stays flat so if you're building anything that really works with the data I would say this is huge mhm and then you know websocket module support this out of the box there is no additional native dependencies Beyond nro because webset uses same uh internals on Android as react native anyway and uh built-ins on iOS so uh anything real time uh and you know this is just where your creative mind can can can can really go uh because you know web socket also supports streaming binary data so if you have an image you can stream it with websockets and we're actually going to stream and pass an actual binary data so we're not going to serialize it to
string so you know if you're if you want to stream an image over webs or if you're using grpc or something like that for any procedure calling uh this is great and because you can save a lot of time yeah realizing is not the fastest and we're just getting started because I did not really mention web RTC and all those different apis you know when you think about it you can pretty much redefine every single API so um I guess these are the use cases and now what we have to do is we have to um we have to just get started so um that that's what I would say is is is a good getting started so so from the like more abstract level let's say you know if you have up like you know Snapchat back in the days or something that is uh allowing you for live calls with the video or just streaming the pictures of more big files and storing areat Library it yes yes and and to be to be even more specific historically you would have to write those uh that code natively right uh if you wanted to stream upload a big file on iOS or Android you would have to write this code natively I guess and you would pretty much build the same abstraction with streams MH um now you don't have to do this anymore uh we don't have support for background tasks yet uh but these are all the things that we have uh on our road map in mind so typically the idea here is that you can um you will potentially be able to build all these I mean this is not changing anything as far as you know I was not it was not possible to build something in the past what this makes possible is you can just write it once in JavaScript now and and and if you have this code already on the web which you you might have in a web worker or of some sort yeah it should just work so that's uh that's nice that's nice because the abstractions you
have and if you think about web compliance if you learn this really once you can just write it right you don't have to figure all the different Native apis or even maybe delegate this you can just write it and or rewrite it but you can just reuse the assumptions you have exactly all right that that is fun so there's nothing more for people to just try to use it if you have such an apple ready such a project just drop it and try to make it work and see how it affects your project because this is interesting like as you said those benchmarks you don't know different projects may have different environments and these benchmarks might be completely different right yeah I I guess yeah I would recommend trying it out and you know what I what I have to admit here is that I really stretched the release of this project um one lesson that I have learned is that you have to release early and and and break things and I'm I'm I'm quoting you know Mark um the Zak not Mark RAV although um although he also has some nice quotes I'm not sure if I can actually publicly State them but uh here is the point I should have released this Library two weeks ago I'm very honest the problem was I was like okay maybe it's not ready yet I'm going to finish it and then you know 5:00 a.
m.
at the gym in the in New York I was jet locked I wake I woke up I I went to do my workout and and this idea another Library came through my mind uh the AI agent and I'm like we'll get there we'll get there God I'm I'm building this you know and then two weeks pass like that and I'm okay I should have released it because I would already have feedback from the people and and when I have feedback I know how to operate and execute so uh going to release it finally tomorrow um because you know when you release early there is less
pressure If you make if you stretch it it's like oh big release comes up and it's not really big I'm just I'm just switching the T yeah that's that's very interesting what you just said because I have literally uh read that uh you know there was like on LinkedIn you get sometimes those posts by great Founders like top 10 things I've learned during my career and one of them is like there is no big release like just accept it there's no big release nobody cares when you release your app it will grow through the time I mean you know uh I was thinking about those ideas yesterday and what came to my mind was that i h i like one of my projects needs to be very successful because unless I mean until that happens they will just call me crazy you know but when it becomes successful your crazy ideas turn are turned into a guideline basically so until that happens I'm just the crazy guy uh shipping five things at a time um but you know this is uh this is pretty sick actually you know I I I don't know I think my eyes are even like you know sort of like swirling aware like I'm not aware like looks like I'm I'm you know I'm I'm not mentally present in this room like I'm just staring somewhere this is a remote go man yeah I know I mean that's the Deep uh deep deep Flow State you know um which I envy you I honestly would love to be there right now because you you said you are stretching this uh release date dude you are like the person who ships the fastest from the people I like follow or no and you still talk about strength in release I mean I I have to I have to catch up you know I I've been I've been um oh my God I I I swear a lot so I need to really adjust my language here but I've been uh let's say playing around with uh different uh uh different uh ecosystems for the past two years you
know AI web 3 they will eventually come together so I'm not saying that was a wasted time but God I'm so excited to be back because you know here it's like I open my laptop and one week is gone and I I don't even know what I'm doing I'm just you know I'm just hacking on stuff so um yeah you're not uh doing science you are just bringing Innovation yeah although I wish I had the PHD because you know um especially in the age of AI there is the the it is fascinating how I think uh degree is becoming more relevant I guess because this is more related to science every day yeah yeah with coding was like ah you don't need this University just go to a boot camp I'm I'm I'm happy that I finished my uh my first degree um yeah humble brag of course humble brag uh even though you know what's funny um I was searching for something on my email lately and I I have this very old conversation with the I don't know was this uh translation in English but you know this this this person that's running the the the the office uh at the University when you have yeah yeah yeah yeah so she she emailed me that there they need some papers for me to sort of print the diplom for me like the photo and stuff and I'm like I respond every 3 months saying oh I'm sorry I was outside of the country on a business trip and everybody thinks I'm lying but this is true and then at the end nine months later I say um thank you for your email I will uh I will deliver the photos on Monday uh apologies for the delay and then I say to be very honest I don't really need this diplom so um that's why I was not really you know acting good and I was like okay I finished that University but I don't really need the paper though so you were like proving to the university like look I did what you asked me to do but I don't need you anymore like I
never needed you I mean you know I see what you need nobody never asked me for it it's quite funny I wonder if uh I wonder if you know how many people do this actually but um you know if you put that you finished that at some University like did anybody ever ask you for your diplom like just bring it for the unless you're on the uh you know sort of job employment contract May yeah no never yeah you know could have just finished stford you know exactly and nobody would give a no fact checking yeah just you know talk talk talk nice stuff and exactly uh but I think I feel like that could be separate episode just just for for Giggles but uh let's move on then um so we know the secret sauce I have a question about Secret Sauce but the secret sauce he here was Nitro modules as you mentioned and the architecture basically um so let's talk about um other stuff which means um can you tell us uh like you mentioned we have like four or five um modules right now in the in the library right so the the fetch the blob the system are they all would you say stable enough to start using them in the projects or is it all experimental and you know be careful with all of them I mean I mean websocket is is stable blob uh blob is uh is stable but it it lacks one method uh streaming uh is is is not stable definitely it works but it will break uh and the API may change uh we're trying to figure uh where to draw the abstraction right now we have um Primitives on the native side but we still create uh the readable stream on the JS side and that introduces a bit of an overhead I think the long-term idea for us is to move towards the na API and just have the entire streaming API that you know is entirely web compliant be written on the C++ side mhm potentially pulled from a browser engine like
mozilla's engine or that's probably a good good uh good Community move um the file system it works but there there might be some much cases that I did not think about I think on Android that there is a crash so okay I mean use it so you tell me what's not working and then fetch is also missing stuff I mean they're all working progress the one that is I believe ready for testing and I would say it's better is it's funny how in the read mey I flagged better with the green check like as if it was stable that that it's stable better exactly uh you know um never one.
release though uh so I would say use websockets play around with everything else uh give feedback um issues about you know things that you would like to see uh things that you would do different and if there is anybody passionate about uh that that that subject of crossplatform uh modules also let me know um that is a huge effort you know um we will have to figure out a lot of things when we before we get this done so I really invite everybody to join me and and and and then let's ship it what the best way to to connect against what everybody tells you but just open up get habish I mean the project uh the project is such a low profile now that this is the the easiest way um you know I I I didn't have time to figure the Discord server uh situation so uh so I think when I figure the Discord situation then um I would say Discord so okay um if we figure the Discord out it will be in the show not show notes if it's not there just open up get Hub issue I guess but also Twitter me contact me on Blue Sky whatever works I'm good uh so that is that is not a problem all right all right cool um so we are wrapping this episode up um I think we know a lot tomorrow is the release uh if everything
goes well and I have fingers crossed nothing breaks or no other ideas come to my mind because uh to be very honest I just came up with another one today and that's why you're not getting coffee today that's it yeah you stick to the water but I'm also on the white diet if that's a phrase in English so not a hugee fan of coffee with milk what I'm saying so I um yeah and I also have to use the straw which is you know a bummer but um I mean the things are the way they are and yeah I mean I mean you know the problem here is that uh you know I I spoke with Mark yesterday and he's like oh Mike what are you up to and I'm like I have fire up on my ass and he's like oh what's happening I'm like I'm shipping every day I I basically took inspiration from you and I and ixed it and he's like oh that nice that's cool but keep uh keep this one thing in mind and he he said to me that um um we also talked about lumos but this attitude has serious bad effects on any real life Relationships by the way just a disclaimer you know uh so I I am broadcasting this disclaimer to everybody um because um on one hand I would like to say just get some rest and and and stuff like that but the other you know it's like when you don't finish something you just have troubles going to sleep like I'm exactly yeah dreaming I'm dreaming of people I work with and and about code which I think is weird but I hope people don't mind yeah I mean I mean um oh man so okay so I tell you one more my One More Story you can cut it but uh all right I I I you know we we have this um our head of marketing Amilia um I came up to her on Tuesday and I say Hey listen I had a dream and in this dream I saw you and and and your hair like was cut like completely like you had oh like you know short hair like me MH she has long hair and I'm like I
don't know what that means but it was just weird you know and and she says you know what's funny the day before we had this Workshop um about team building and one of the exercises we had was uh you know pick the Lego um you know figure figure yes that you feel most connected with and she picked the one with the uh short hair oh like okay that is that is getting weird you know that is getting weird I think some energy is floating around so this is what happens when you get in the flow state for too long you start connecting with others yeah so if I had a if I have a dream about this podcast and you and the crew I'll I I make sure to let you know let me say this this way thank you very much uh all right guys um one last note from me at the end uh is well is actually pretty exciting and I know Mike is excited about it too react Universe conference is coming in 2025 and uh we know the dates we know the prices well from the 2nd until 4th of September 2025 react Universe con is coming back to VAV and uh you can as always expect top Minds top speakers who knows maybe this guy will be there again because he was there last year I mean this year and and um yeah you can grab your tickets already this is the spoiler alert no this you know I I really have to figure this uh speaking situation for the future self because you know it's like when you sign up for a speaker slot you're excited but then the day before you're like oh my God why did I sign up for this what am I doing but I do have this friend and he always goes to panels okay and this is smart because pels are the best you get to enjoy all the conference benefits and you can just you know talk about things you're building which is awesome it's like right now yeah EXA exactly cuz with the slides slides are also very exciting but the
problem is um preparing them yeah I don't know anybody who makes them earlier than like two weeks yeah and I'm I'm I'm I'm stretching this already because I usually do it like uh I I'm not doing this two hours before that's my younger self now I do like the day before I mean like I I'm pretty sure our uh podcast producer all would prepare these slides like a month before because that's the way she likes to have everything organized but she already knows uh how to work with me I guess uh we crossed our paths uh before and um I think when when I asked her to look at my slides from The Branding perspective the day before the conference that was the moment she realized I am a uh great person yes uh exactly she's sending us Hearts right now so cool yeah so um I I interrupted you but um I guess um we have the early birds yes we do have early bird whatever is the name now uh early birds I bet I bet and uh the the price is the lowest that it will ever be until the conference right now early birds I will not say the price cuz it's difficult number but you can check it out on the website I'm pretty sure um is the is is the difficult number in Europe because it's in zote and we converted or like I'm I'm curious like I would love to understand the logic between that decimal points but I love it it's such a it's yeah yeah the vat situation I guess yeah I guess so so that would be all everybody uh so stay tuned for the tomorrow's release I mean by the time we release this episode it's already out there so maybe if you had a chance to use the library drop a comment say what you think uh drop an issue if if you find any or even better fix them and uh make a request yes I would love to I would love to and um I think uh from my side I I wanted to say thanks for having me and uh you know I had a discussion
with uh one guy uh in the past and he asked me how can I get better at programming and you know I think a lot of people asked about this uh and I said to him you know I'm not goingon to like I don't like giving advices obviously because you know advice is like it's easy to give advices if you're not accountable for the results of them but I said You know here are the open source projects that I do and if you find anything you know remotely exciting uh just you know get on those projects uh check the issues maybe open PR just get in touch with me and that's how you will become a better programmer so I guess if anybody will have to sort of explore some stuff maybe about iio streaming native code C++ and is like struggling to get started I'm I'm happy to help you you know make the contribution uh so you know just uh yeah I think this is a great idea thanks for you know dropping this and yeah uh awesome get in touch on good and let's let's hack I love it all right everybody thank you very much and again Mike thank you for joining us today here in the studio by person I love it yeah it's it's you when you say back in the studio do you also have this song in your in the back of the hand back in now it's oh my God let me let me actually quickly back in this hipop song it's um oh it's it's it's not just lyrics it's you know uh the beat it's the beat When the Beat is there's like this guy saying bag in the studio I but I I I keep hearing this song throughout the whole day so I don't know that was the destiny that's why you are back in the studio I'll try to remember the name for the next coffee talk so maybe we can uh you know uh risk demonetization and and copyrights on YouTube and just put it uh fa fair use stuff right like 5 Seconds should be
Show Transcript

After almost two years, Mike Grabowski, the first host of Callstack’s podcast, is back. In this Coffee Talk, however, he’s joining Kuba as a guest. The two are discussing the recently released React Native FastIO - a library designed to boost I/O operations inside React Native applications.

What started out as an experiment of using Nitro Modules to build something incredibly fast and efficient, Mike’s work has led to the creation of a library that offers a variety of I/O primitives, including blob, fetch, file system, and streams. React Native FastIO aims to provide developers with powerful, native-like capabilities while maintaining web compliance, setting a new standard for handling complex I/O tasks in React Native.

Blazing fast I/O for React Native built on top of Nitro

  • The evolution of FastIO from a simple Web Socket module to a comprehensive library with various I/O primitives,
  • Detailed explanation of the I/O primitives included in React Native FastIO, such as blob, fetch, file system, and streams,
  • Architectural approach, focusing on modularity and separation between front-end and back-end processes,
  • Challenges faced during the development process,
  • Significance of web compliance in React Native FastIO and its impact on cross-platform development,
  • Use cases for React Native FastIO, highlighting scenarios where you can make the most of the library, e.g., in resource-heavy applications and real-time data handling,
  • Future roadmap, including potential expansions and improvements.

More about React Native FastIO

Need to boost your app’s performance?

We help React Native teams enhance speed, responsiveness, and efficiency.

Let’s chat
Link copied to clipboard!
//
Insights

Learn more about

Performance

Here's everything we published recently on this topic.

Sort
//
Performance

We can help you move
it forward!

At Callstack, we work with companies big and small, pushing React Native everyday.

React Native Performance Optimization

Improve React Native apps speed and efficiency through targeted performance enhancements.

Monitoring & Observability

Enable production-grade monitoring and observability for React Native apps with real-time insights and alerts.

Release Process Optimization

Ship faster with optimized CI/CD pipelines, automated deployments, and scalable release workflows for React Native apps.

React Compiler Implementation

Use React Compiler to achieve instant performance benefits in your existing applications.