New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Real time chain data for an awesome UX with Alexandre Bourget

ETHGlobalFri, Oct 9, 2020, 12:00 AM

Real time chain data for an awesome UX with Alexandre Bourget from dfuse

Transcript

okay so first of all I'm Alex I'm CTO at diffuse and here was a team here we have a sponsoring booth and we're an infrastructure provider but I want to know a little bit more about you guys where are you coming from and what's here what are you here to do like your hacker what's your level of knowledge of a theorem in general so please okay okay cool okay cool in theory I'm you know a bit more yeah okay okay cool okay okay cool perfect perfect okay okay cool okay cool okay and why do you guys came here why do you guys come here yeah to this hat to this talk okay okay okay so I'm going to quickly explain what we do okay in simple terms I'm sorry for the camera and and then I can demo a few things of what we can do okay if you have any questions on this however you stopped me so a diffuse we have base layer infrastructure that we offer so we can think of something like in Fira or alchemy or some other providers of nodes but what we do is that we crack the egg open of the blockchain and we pipe this data into an infrastructure that allows you to query the Chane a lot faster a lot cheaper and with greater guarantees and what a node gives you so we're able to search the whole blockchain some things you would do on in fearow would take a lot a lot of calls and you will get on our platform with a lot faster under one second which can search the whole history and then you can have a lot more granular terms so if you're looking for something that called your contract or from or two you can pass those variables you can search for a particular method particularly spined by that or that account there's a lot more granularity and what we expose as a search language so it means that your application can do less work and less lines of code to feed their UI that search engine also his streaming and is capable of going back in the history but also stream in the future same search terms you can then from the point you receive like let's say the fast last 50 transactions that match your query taking that little cursor and you can then search for word for any new things happening on the chain but the particularity is that this so maybe you all not know but if areum is eventually consistent like you could have a transaction transferring a million dollars it's in a block but it might not be true again in three seconds maybe there's another block that will come and take proceedings so in normal cases developers need to handle that in code they need to get a new block and then if there's another block it takes proceedings do all the operations to reverse certain transactions and then reapply the new block and maybe there's two blocks that came so you need to handle all these edge cases are very difficult where's our end point you crater once and we're going to navigate all these things for you we're going to send you an undo signal and a redo signal or you know the next blocks that matched your query so you always have one thing to think about one linear stream and that feature there is aware of the Forks is aware of the reorganization that happened when the network gets into that eventually consistent state which is a database term right those little cursors are fork aware so if you disconnect for an hour and come back we will still navigate a posteriorly that's Mork for you and still give you the guarantee that you'll never miss a beat so that's one thing are there any questions about that yes we mean how how how to make it great or how to use it so the engine that we built is aware of the consensus algorithm of the different chains we're rolling out right so that means the thing that reorganizes how it chooses the longest chain on the etherium or actually it's the most voted its most votes with the uncles and all that right so there's a little algorithm that decides what's the longest chain right now more weight and that's how we're gonna decide to undo this segment that is not true anymore and then apply the new blocks but that's part of the search engine that is also historic and also you know streaming with the protocol does that make sense yes your linear feet will save undo true and then reapply the other things as they go so it's sort of corrected on the fly but linearly for you you don't need to handle the graph aspect of it right so that's greatly simplified for developer you have one include if your own web thing you just NPM and then you can do a search query to be streaming that's all dealt with a graphical interface by the lib and streaming a subscription and then you get the feed and with the grep ql interface we provide you can select only the payload you need like you select just a fun a bunch of feeds and put that directly in your mobile app so all of a sudden it's not incredibly costly to just access your app from mobile users for example does that make sense isn't that cool it's cool it's even cooler when you've run into all the headaches you need to write to handle that and for those who know I'm just pitching a few other things like competitors often offer a big pool of nodes and then users hit the load balancer and they hit all different nodes but those different nodes are like master master replicated so one could be at block 5 502 in this one 503 and then you hit another one it's 505 but you haven't seen 504 so you need the client needs to distinguish all these things and navigate the inconsistencies over the nodes which you want to load balance but the diffuse platform offers one unified view if we gave you something anything you come back we'll give you then the subsequent will it be able for you to sort of navigate back and ensure that you never miss a beat because it's a holistic view of the network if we've shown you a fork we'll always be able to navigate you out of it if you haven't shown you a fork we'll never show it to you does that make sense isn't that even more cool it's pretty cool okay so there's another feature that I want to highlight because we just released that and that can make your apps during this week a lot flash here so I don't know if you've went to different adapts I went to uni swap before the revamp just recently and I sent a few dollars and then set the transaction and there was zero feedback from the app I was like scared because I sent a few dollars more than a few maybe too much and and I had no feedback the transaction was sent I had no clue if it was settled I had no clue the progress and that's scary right you don't want to have people live that because they were gonna distrust very fast so the end the end point we're providing is what we call a transaction lifecycle endpoint and it's a simple endpoint for you but in the backend we listened to the network everything that's flowing through the networks and blocks in a different force and all of that and we will send you a single simple stream of what is happening for that particular transaction so if it gets into AB life it's been seen on the network we're gonna send you it's pending and then we could give you some estimates and then we can eventually we don't have that right now rolled out probabilistic finality how long we could expect that to be in a block and then if a block arrives it minds it we send you the changes when all the information about the block then again just the bits that you want so that you can show your user it's in a block and then if you have another confirmation we send you that signal to if it's gets forked then we're gonna send you its fork it's back into the pending if it's replacement you know all these transaction states that you don't want to care about we send it in a linear stream so that you could hook it up to small UI and then your users are more comfortable right as a sort of of abstraction we want to give to the chain so that people developing application it's a no-brainer to make the UX great right so that's what we enable do you have any questions about these things that you fast no it's great no questions at all so right now we released the platform's the different components on EOS we have seven networks there and we have a few private networks for customers and right now in aetherium released on may net and Rob's 10 yes we're at we're looking at other chains we're trying to so our focus is developers we're making the tools not for token holders we're not shifting the business for token holders or focus is great developer tools okay so what I can do is show you a little thing I'm sorry I'm not gonna connect to this okay I'm gonna go around and show you just a little example because it's slick okay we built a small block Explorer it's called et HQ look it's called hhq it looks like that I don't care about the block Explorer it's just a marketing ploy because we built that in four days but in there it shows it's just a you know a way to resurface the API you cuz what all you see done here is actually something you can do directly from the API it's this is uh yeah it's a segue for developers to learn it's not a block Explorer just for you to observe right although I have to say that this block Explorer is because of the data we provide the deepest block Explorer on the market because so for those who know transactions on a theorem have internal transactions and they can like you send some dollars here it could have side effects to transfer 70 million dollars and do 70 transfers under the hood right you don't easily normally see that when you look at transactions on a theorem but this block Explorer actually the diffuse platform so let me show so this one has 19 calls so the diffuse platform offers all that tree of calls and for each of these calls we can provide like all the state changes all the balance changes all the fees that were in cured and the reasons for the fees there were minor fees and you know gas cost whatever and and all this is also available through the API and the search engine allows you to search down to that level so you can search inside transactions you could say who called my contract but not just from the exterior also who called it as a side-effect of the execution of another contract so you have and all these internal transactions are real transactions they're not less important like this is it's on the same setting but most infrastructure providers don't make them shine at the same setting right so we didn't want that we wanted to have all the data available for search and friend Xing for taking decision trading decisions whatever you're building if you want to read the chain the most profound way and the easiest way really is is is to pluck out a graph QL query I'm gonna show you in just a moment just I would want to announce that during the hackathon if you have a great you if you're building a great experience on top of the fuse we have five prizes that right two thousand dollars the first and a thousand a thousand five hundred five hundred okay and what we're looking at is we want but we love great user experiences if you guys build a great user experience and because of the things in there you're able to do so you know because we have widgets that are crisp and and and reactive to what's happening and give a great user experience that's what will value you guys are going to shrine we're gonna shine too so that's a win-win and so can't wait to see what you guys gonna be building want me to show you the graph QL API here or what are you most interested in right want to see that so like we purposely in in the mahat we hit it so our goal is to hear what you see in the graphic you in the Explorer is to have a button to then show the graph QL everything is done in this page you can just copy paste and go in and play with it so this here Oh just boom alpha I think that's one of them so this here's an example of me let me I'm game I'm gonna grab a pending transaction on ether scan this one okay and it's boring because you don't see it so this is streaming here we saw the transaction on the network oh now we had another transaction it's now in block and then we're going to see confirmations coming in so this is three main the first one we saw was the transition that told us I've seen the transaction we saw the transaction here and then it's in a block and there we have new confirmations and the transition is confirmed and that goes up and up okay you'll see that in the little widget up there let me show you the widget instead so I'm gonna take another another pending transaction on ether scan so is that good here that's pending by the way our API will provide you with at least two to three seconds faster response and when you get on ether scan the our API will send you that information before ether scan will refresh their page and show that to you so you get a better experience for your users instead of sending them to eat their scan and also so you see the little widget there well okay it's shown of the things already otherwise would be in pending state you see all the state transitions here happening and also the the latency of block propagation on our platform is approximately 1 to 2 seconds faster than competitors so if you want to have the information the quickest you're better off here because of the infrastructure we built it's like tentpoles you know that are stuck together if the block arrives it's pushed directly to your UI the latency is very minimal between all these all these steps and it's filtered through search so there's still a lot of power there but it's a it's difficult to compare and there's one thing I wanted to add but I don't remember okay did he have any other questions you want to see more right like you'd like to see the screen huh of course yeah yeah you just you create an account on there because you all have a token so that you could eventually set rate limiting options when you deploy that to production this is you can sketch of millions of users with that platform right you can set that and decide oh I want to you know this sort of growth if it goes it's being abused I want to sort of cap it so you create API keys that have those capacity and then and then you just when you queries send that as a token and then you can query this the generous free tier the whole thing is hosted and you can yeah for the whole weekend and we have a we have coupons if you ever want to go like crazy and download I don't know to 300 million all the blocks of the chain and all that you get to get the coupon you'll be able to do that no problem does that make sense ok look we'll give you the coupons where's the coupon they're our booth oh yeah we'll have you some of the booths yeah you can pick up a few ones if you have students you know until then so the thing is with that too what we've seen from customers adopting our solution in comparison so one of our customers was one of the top users of the top infrastructure on a theater let's say okay three third largest customer in terms of volume and they switch to that and they were able to kill 90% of their code because a lot of the code was handling the intricacies of load-balanced knows that our master master and and not in the same spot and also the reliability that this provided means that even mid block they could be interrupted because the cursor was replaying or we putting them back inside the navigation of a block right so the reliably they got like it could cut off so much junk so that means that if you want to get started it's a lot easier to get started and if you want to get it right you don't need to do much right because you you'll have it right because they the bulk of the work is done on the server right okay I don't want to stretch it too much but if you have any questions I mean I told you to interrupt me yeah go ahead yeah that's public it is public I mean it's an imperfect Explorer we're gonna improve it because we want to just show the digifuse platform but it's still a good it's good good you know piece and when our goal is that you could slowly discover the search terms when you click on things if you click on the little thing here the account it's gonna craft a query that you now discover you can say from this address or to this address so you have things in both directions and then you can craft and change that query and see the different listing is very fast that makes sense if Q dot app and there's Rob's 10.8 Q dot app yeah and otherwise it's diffused at i/o we've just revamped the docs so you have all the graphic your schema there's a few missing things if you have any comments on the in the we've done a lot of work on the getting started material if you have any hiccup by all means poke us come and see us call us in and we're gonna go in and hack it and release under your foot we're gonna ship it a bunch of the core engineering king is here to to make sure everything is that top-notch ok I had 25 minutes so there's one minute left if you haven't any other question I'm happy to accept otherwise though let you go hack I mean yes my gold for yeah yeah so if you so what we love value as I said is the the user experience if what you build it doesn't need to be a web front and if you have a command-line tool or I don't know something simpler but it's able to react to what's happening on the chain because it's using those api's like it makes your application shine and it makes our API shine that's what will value this and how that's how will judge the best use and the best user experience made possible by the chain that makes sense yes well I want you to build great things right if you build great things that are meaningful not just because it's a quick hack to use defuse alright because you're building something great and diffuse it's part of it I mean that's where we both win right does that make sense I got a lot of nodding yeah yeah ok that's it thank you for coming go hack in there and be happy

Automatic transcript — names and jargon may be misspelled.