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

Loading player…

Attila Gazso: Felfele: a mobile-first, decentralized social app and protocol on Swarm

SwarmWed, Oct 9, 2019, 12:00 AM

Attila Gazso: Felfele: a mobile-first, decentralized social app and protocol on Swarm This talk is a case study about how we built a mobile-first, decentralized social app and protocol using Swarm exclusively as its backend. I will talk about how we can define higher level social application specific data structures using Swarm primitives, as well as the challenges in privacy and versioning. About Attila Attila has a background working on fault-tolerant, distributed and decentralized systems for more than a decade., Recently his main interest is decentralized apps on mobile. He is a fan of open-source and functional programming. Attila is one of the founders of Felfele Foundation.

Transcript

hey guys I'm Attila and I would like to talk about felfela which is which is a social app based exclusively on swarm as its back-end first of all I would like to talk about us and why we did this so basically the yeah at the moment I don't know if you are happy with the social app you are using but I wasn't and I met with a lot of people who weren't for different reasons some people were worried about privacy some people didn't like the fact that most of these apps optimized for engagement which means that they want to use as much as your attention as it's possible and after a while the whole social media experience get to a point where I would just using my phone scrolling the feed and after 30 minutes later I did not have any idea what I looked at what was going on what happened with my friends and then I just thought that this is not really good I just wasted 30 minutes and so yeah what happened is that I deleted the Facebook app and then I missed getting some news I miss getting updates from my friends so then I started building a simple app where you could follow news and then I realized that yeah I could build an app which could help me to share my updates with my friends but then it would require me to build a kind of a blogging engine and have a server and this kind of stuff and why I can do that but most of my friends are not developers so obviously you cannot expect anyone to install a server a blog engine use social media in a way that was used back in the 90s and the 2000s so we were yeah basically I met a lot of people with similar issues and we started talking about it and then we figured that maybe there is another way to do that and we started doing some research and it turns out that there is this new kind of decentralized systems I found ipfs first and I found scuttlebutt and I also found swarm and then I had an ex colleague who started working with Victor and Victor just we met with Victor and they wanted us to work on some app for swarm and I said that hey I got this idea to to build a decentralized app and we talked and it turns out that swarm could be perfect for this so we we started talking about this and this was about a year ago and when we met in Ljubljana and since then we managed to get a core team of four or five people to work on this app and also we have advisors like Victor and we set up a foundation and we have greg over as our visor in the frontage and amongst others and so we started getting some funding and we starting working on this and basically we we figured out that the basic problems with social networks as they are currently cannot be fixed in the same way that like building a company with VC money and building it in the same way because the the way how they operate right now is actually in the so the the model of Facebook how they make money is basically collecting data about you and then I basically sell advertised a your data to advertisers or like target advertisement to you and then this makes a lot of money actually this makes so much money that this is this few world the the biggest growth in the in the in the history of companies that like Facebook and Google and this kind of business models they have had the biggest growth ever in terms of money so we figured that if we make a for-profit company and if we are serious about making money we won't be able to compete that kind of business models because they figured out what's the most [Music] profitable was most most profitable and legal way to make money so if you if you are serious about making money then you have to find an alternative and also we found out that there are a lot of incentivization problem with their models so they want you they actually need your attention and that's actually counterproductive from the point of users so we wanted to build something else that doesn't require your attention much more than necessary it social media should be a tool to be able to communicate with your family with your friends with nobody inside your communication manipulating you to do this or do that or buy some things as in real life so we basically want to build a communication tool that works as communication works in real life with your friends it's like imagine that it's how this would be if there will be always someone standing when you are talking with your friends there will be someone who is standing next to you listening to your conversation and then you talk about this do you want to buy that and you know is soliciting stuff that you don't need mmm we we figure that we want to build some kind of different thing and also right now we figured that we'd swarm it's possible to build a social application of a that private that actually puts you puts you in control and you know what happens right now is that Facebook and Google is redefining the meaning of privacy so they want you to think about privacy that okay we take your data and we don't give it to anyone else but at the first place they shouldn't take our data so that's not a good deal because yeah historically the the cost of storing your data was so high that was that was a blocker for growth for these kind of companies so imagine that ten years ago when you start with Facebook imagine that it would have cost you ten dollars per month then nobody would have signed up and then nobody would have used it but right now the actual storage costs of data for like social media app can be like dollar cents per year and imaging that I say you that okay you can have privacy you can have all your data private and you have to pay one cent per year what's the problem with that I think everyone could afford this but the problem is that right now is that there is no way you can pave on some per year because all the credit cards companies start charging from our Commission and then the minimum amount you can transfer is two three dollars so whatever we needed some kind of we need you need some solution for this and hopefully this is going to be at home or other currencies and for the data storage solution we can use swarm and by the way we just released the larva version last week so if you want to try out this is an app advil I will talk about you can try it and download it right now so basically what I want to talk about in this presentation is that how we found out that you can use sperm for this kind of applications and yet one thing we figured out that in a social app for example on Facebook you had a lot of friends from different circles of you really have your childhood friends you have your family you have your colleagues your ex colleagues your exes and all kinds of people that you don't necessarily want to mix up and also you might want to differentiate between different hobbies and different interest that you have so we thought that you might want to have different identities in this app right now we have only one because having different identities introduces a lot of complexity but eventually we plan to support multiple identities so how do we do this on one farm basically we are creating interim keepers for that you have a private key you have an address you can be accessed with that this is not perfect we have we but at least we know the advantages and disadvantages yet nobody can memorize the private keys and if you have several of them then it's even worse and then you cannot type it so you cannot copy it on the clipboard and you have to be careful about it and it's very hard to enforce these rules even for us who who are aware of the problems but it's very difficult for to explain actually people who were not developers so yeah it's something that we expect that some other companies in this space will figure out a solution for this and we might be able to cooperate with them for example you port is also amazing his solution on a tram keeper so that might be it but at the for the time being I think it's a good enough solution and then it has advantages like you can generate this on the device you can generate as many as you want you can you don't need to have a centralized authority to issue these keepers and yeah it has the disadvantage is that if you lose it then nobody nobody will be able to restore it for you so this is something that needs to be solved from a UX perspective and then there are in a social and normal social media apps you have I mean we have text images links but you will also have like video and other media that you can create and you can share and for that swarm also provides BCC uploads downloads so that is covered it works pretty well actually right now before it wasn't that stable but right now it's pretty good and pretty fast actually after that we have so when you are when you share your post with others we we call it channels that you create a channel you put your posts in it and then you can share it with others we imagine that in the future you will be able to create different channels and based on their different environment topics people who you want to share it you can choose to share in different channels basically channels a unidirectional connections so you put something in it and whoever follows the data we received the data and they will see the updates and you can make this symmetric so if you have a channel and I have a channel and we share our Channel use it for two-way communications and sperm feeds are perfect for this so for the basic use cases of our social media app swarm by itself without blockchain provides good enough primitives and then you can get started obviously you will have to when the incentivization layer will go live then you will have to be able to somehow get money on this and be able to pay for the feast or storage and network fees but but yeah that's another problem that vivia solve and we get to this point where swarm will have this as well so we will see and so far we have good experience that the student solutions are quite easy to use so what we created basically is a protocol so that you can these these social media primitives that I was talking about so that you can share post images whatever image in channels and you can follow channels these kind of things for this we created a protocol because we felt that the primitives provided by swarm are too low-level for application developers so you don't want to deal with the details of fields the at box level as whatever it's for for me it's very exciting but for an application developer in general they just want to deal with the the abstraction level that they are dealing with which is like posts and feeds and stuff like that so what we figured out is that how you can represent this timeline in swarm feeds basically you have a timeline with aust and we create two farm fields for each channel say so or your or your timeline one of them is a list of your posts and that's kind of a linked list very similar to the timeline structure of Erebus or the timeline structure that have you used before so basically you have you have a post which has a link to a previous post so you have a link of a list of post and then the latest post link you put enough in a feed and then every time you create a new post you update the structure and that means that if you have a pointer to anywhere in any post in the time then you are able to go and fetch all the previous posts that happened before and why that works good for synchronization and for storing your data and sharing it between your devices usually we don't use this but we created another feed another swarm feed that we call the recent post feed which is an optimization for quick access to the updates where we just simply store in this in this example we as I said N equals 5 we store just 5 latest posts but in actually we store 20 but for illustration it just 5 in here and also we have something that usually it's not associated with social apps but we have a CLI so ok I have to find this so basically we created a CLI so that you can so that we can we can yeah we can manipulate tests and access the data from from the command line as well and actually I want to do this experience that has this work so that was a password that is you say she didn't see but good luck remembering it so so this is an example that you can you can you can create a post from the command line and that makes for developers that makes very easy to test out features and you don't have to do everything inside an app and we did the integration test with its form using this so I will just run this command real quick because I have one minute left and hopefully it will send you an update so those of you who have the app installed then you can just check out the file for a feed have a foundation feed and then you can see the update surprised me that that will work okay sorry a quick one more thing versioning so yeah one problem with swarm and actually all these immutable systems that you put it out and your data becomes their data is the API in a sense that the data is out there and if you want to access it then you have to have some code to be able to process it but imagine that you create new versions new versions new versions then in order to access it you will have to have all the transformation code from version one to the current version and this can be problematic so I I don't know how you will solve this maybe we will just live with it and so yeah on our roadmap we have private encrypted shared channels because right now everything what you have what you are sharing is going through a public gateway that actually is not the public network of swarm but public Gateway that we operate and then that's what we want to avoid with the light client or the light node so that we can have encrypted access and private data and after that we can do comments and messaging we will participate in the hackathon with Louise to work on some group messaging ideas then we can have private groups then we can have multiple identities and yeah that's just from the technical standpoint that we want to build up on the this protocol force form and yeah if you feel like that it's if you feel if you like this project you can donate on github you can contribute on github you can donate ETH you can spread the word on any kind of forms that you find on our website and yeah basically that's it [Applause] - turns any questions just UX question how does this actually work I just downloaded it trying it so how does the communication work between channels so it's using we have we installed a swarm gateway right now it's every communication goes through it but the goal is to be part of the globus or network eventually and yeah it uses so when you install the app we create an atrium private key for you you have an address and then that address you can share with others and then other people can follow your address with we create a link based on it you share you show it to other people they the app recognizes it follows them and when you send updates create a new post then they will get the updates they they are actually when it's based on so sort of feeds are based on polling so be are basically every few hours we are trying to refresh the feed and then when there is new data we show it to you not yet Nathan yeah so this is in the alpha version you consider anything public and consider anything that disposable so you may lost you user data River we might do a swarm migration the new version and that might lose all your data that's awful that's a disclaimer okay thank you very much [Applause]

Automatic transcript — names and jargon may be misspelled.