# Orbit   Distributed, Real Time Web3 Apps with IPFS and Ethereum

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2017-10-09
- Duration: 11:51
- Topics: blockchain, smart contracts, distributed ledger
- Watch: https://streameth.org/watch/yt-vQrbxyDPSXg
- YouTube: https://www.youtube.com/watch?v=vQrbxyDPSXg

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more.
https://archive.devcon.org/archive/watch/2/orbit-distributed-real-time-web3-apps-with-ipfs-and-ethereum

Samuli Poyhtari gives their talk on Orbit: Distributed, Real Time Web3 Apps with IPFS and Ethereum.

Speaker(s): Samuli Poyhtari
Skill level: Intermediate
Track: Developer Infrastructure
Keywords: web3, p2p, uport, sign, verification, evm, merkle, crdt, data, database, browser, permissions

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 2 was held in Shanghai, China on Sep 19 - 21, 2016.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

[Music] thank you thank you for having me here today uh my name is Sally I'm a software engineer at protocol labs I work on IFS and more specifically on dynamic content so distributed peer-to-peer applications one of the applications I've been working on is called Orban appeared to hear chat application on IP FS which we just integrate it with you port you already seen it earlier here today and the marriage of these two technologies is beautiful so today I'm going to show you Orban with you port and talk about how we build completely distributed applications today and also what we should consider when we build our applications for web 3.0 so if you heard me talking about orbit before you may have had some doubts about the distributed nature of it but today I'm happy to announce that orbit is finally completely distributed and peer to peer there are no servers involved so I'm gonna jump right into the demo and show you the cool stuff can you play the video please so when I open orbit I can log in with is simply with a nickname or I can use you for it um when I choose you for it it will prompt me to authenticate the application I scan the QR code with my mobile app and orbit will pull the profile from the blockchain now when I log in the first time you port will ask me to sign my orbit key which get then gets added to my Newports profile and will work as the public signing key for the messages that I'm sending in in orbit so once I'm logged in I can join double conte channel and start chatting um one of the really cool features of orbit is the file integration with ipfs so I can drag and drop file and folders directly into the chat and share it with the channel on code pictures video audio they all kind of pop right in and you can start directly streaming the videos from the other users um now what you four gives us is the verification that the messages from HUD are really from me if I click on my username once I'm done making bad jokes you can see the you poured profile data right there so my name my location provider is you board and the public signing key that I just added to the blockchain and which is used to sign the messages this is extremely exciting I know who I'm talking with and I can verify the source this you fort is really cool I love it thank you Christian and consensus so I [Applause] wanted to show you another cool demo which I didn't have time to finish but this is called planet Express and it's kind of like Twitter you have a feed where you can post stuff you can pose from repost from other users you can pin them you can um comment on them and and so on and it uses the same technology as orbit does including you port this is really sweet and what you just saw were completely distributed real-time applications with verifiable walk chain base identities running on desktops and browsers today this is what serverless architecture really means and let that sink in for a while because this is absolutely huge where you've come incredibly far in just a few years on underneath orbit there's a peer to peer database called orbit DB um it gives you various types of the databases event log where you can only add messages but you can delete them if he is the same as the event log but you can you and also delete messages a key-value store just like any other key value store you know but peer-to-peer and counters which are really useful for stuff like votes and lights and and so on you can also easily implement other types of databases like index documents or kind of like MongoDB or so on Orbitz DVDs um ipfs lock for database operations log it's an append-only partially ordered eventually consistent Merkle tree of database operations basically a linked list of IVA hashes um so having an operation log allows us to use CR DTS they basically allow us to merge data in a way that there are never conflicts I would highly recommend you to look into CR DD sir they're extremely cool data structures so once we have distributed data structures in place we need to replicate the data between the peers and orbit DV uses IVFs pops up on for propagating the database operations from the operation log to the network so in Orbitz case when I send a message the message gets created and signed with my public signing key the one that was added to my on you Ford profile we then add the operation to the database and the head hash of the operation log gets sent to pops a topic which in this case is the name of the channel and that's how the data gets eventually consistent across the peers and everyone sees the the same data so orbit DV works really nicely for application databases and is quite performant but there's no saving of the database so what would be really cool is to timestamp the hit hash of the log or snapshot it periodically into the blockchain you may think why so complicated why can't we just replicate my sequel databases between the peers in tribute systems time is a very subjective matter and without a central authority we don't know what the order of the messages are and this is what the CR DT sold and this is why they work so well in distributed systems so we have ipfs for storage an append-only lock for data transport C R DT s to create databases on top of on the storage and we have pops up for superfast Messick's message propagation that enables a peer-to-peer application and we have a theorem for authenticating and verifying data people transactions payments and so on combining all these we finally have all the primitives that we need to build truly powerful distributed peer-to-peer applications that also work in the browser on different types of databases dynamic content even live video streaming is possible I can't emphasize enough how profound the sack is so with these new superpowers we should also consider what and how we build our applications we don't want to just blindly follow the web 2.0 paradigms and we need to consider what are the properties of distributed applications today pretty much nothing works if you're not connected to the backbone this is a huge huge problem we need to make sure that our applications work offline first and foremost there's a new trend in web development called progressive web applications which is a great direction but with these technologies offline becomes an inherent implicit property and we can make it so much easier and better for all the developers around the world than it is today um this should be pretty obvious to the crowd here but let's make sure that our applications don't depend on services that can just disappear can be shut down or otherwise to cease to exist we're pretty much locked in with our data do the services we use today we can't share data between applications let it alone and have any control over our personal data this is not cool this is not the internet we wanted we need to make sure that the applications we build can share the data between other programs you know you use um linked data to create relationships between the nuggets of data and use standard data structures as much as possible so you know like a chat message in one chat application is probably the same as it in is in other data application then a feed is just a feed viewed and packaged differently as we develop our attack we also need to make sure to provide a smooth integration path on otherwise the revolution will not happen this is crucial to gain mass adaptation application developers don't care about deeper layers of the stack they just want something that works that they're familiar with and something that works with the technologies that they use today so as an example or DV provides a key value store which on the API lever level is exactly the same as key value stores we have today except it's fear - fear so like say we come really far incredibly far just in a few years and you should all be very proud of what you build so far but there's still a lot of work ahead and I want to leave you with something to think about how can we achieve or solve some of the remaining problems that we still have you can have this one thank you so the way you've or does authentication is fantastic like I said I love it um I wonder how we could use the same or a similar mechanism for doing permissions in a more general way um the mobile use case is a very different from desktops and servers so how can we make all this happen smoothly on the mobile web and you may think this is pretty out there but think about the future of the humankind will soon reach Mars and maybe beyond in our lifetime so how do we make truly interplanetary applications that can work across vast distances times fans and disconnected networks um my personal goal is to put orbit on orbit thank you [Applause] [Music]
