Privacy-First Architecture

Rate this content
Bookmark

Local-first community created a fresh new architecture for our world dominated by cloud. In this talk, Andrey Sitnik, will advocate for local-first architecture, delve into its unique futures, and provide real-world production experience.


This talk is helpful for every engineer because it contains multiple steps to improve privacy. From simple first steps without rewriting the app to profound revisions utilizing local-first architecture- there’s something for everyone.

This talk has been presented at JSNation 2024, check out the latest edition of this JavaScript Conference.

FAQ

Developers should care about privacy because the software they create can significantly impact user privacy. Protecting user data ensures that individuals' personal information is not misused or leaked, which can have serious consequences. Moreover, adhering to privacy principles can fill the void that materialistic gains cannot, fostering a more ethical and responsible development culture.

Open source software was created in the 80s not just to provide free libraries without payment, but to allow users to control and modify the software running on their devices. This concept was more about ownership and control rather than cost-free usage, reflecting a political stance on user autonomy.

Encryption, symbolized by the 'S' in HTTPS, ensures that data transmitted over the internet is secure and unreadable by unauthorized parties. This technology was developed with the belief that secure communication protocols would fundamentally change the world by protecting user data from eavesdropping and tampering.

Data brokers collect information from various sources, combine it, and sell it to third parties, often without users' knowledge. This can lead to privacy breaches, as sensitive data may end up in the hands of entities with malicious intent. An example is Xmode, which sold data from various apps to a U.S. military contractor, highlighting the risks involved.

Data leaks and breaches occur when unauthorized parties access and steal data from servers. This compromised data can then be sold or misused, leading to severe privacy violations. For instance, Yandex Food Delivery experienced a breach that exposed a year's worth of delivery data, including names, addresses, and phone numbers, posing significant privacy risks.

The notion of 'I have nothing to hide' is problematic because while some individuals may not fear privacy invasions, others, especially those in vulnerable or oppressive situations, do have much to protect. For example, Twitter data has been misused by governments to identify and persecute individuals, demonstrating the broader implications of data collection.

Developers can reduce privacy risks by minimizing data collection and using privacy-focused tools. Avoiding public CDNs for JavaScript libraries, using self-hosted solutions, and implementing local first approaches are all effective strategies. Local first means storing data locally on user devices and only using servers for synchronization, thereby enhancing privacy.

The 'local first' approach involves storing data locally on user devices rather than on centralized servers. This method ensures that users have control over their own data, reducing the risk of privacy breaches. Servers are used only for synchronizing data between devices, offering both privacy benefits and improved performance.

Developers can persuade marketing teams to stop using Google Analytics by highlighting the drawbacks such as incomplete data due to user opt-outs and privacy concerns. They can propose alternative analytics tools that do not compromise user privacy and offer uniform data collection without the need for intrusive pop-ups.

Local first improves application performance by storing data locally, which reduces latency and allows for faster data retrieval. This method also simplifies server architecture, making it easier to scale and reducing the need for extensive backend development. The decentralized nature of local first applications can lead to quicker feature delivery and a more responsive user experience.

Andrey Sitnik
Andrey Sitnik
29 min
13 Jun, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Building JavaScript Apps and Privacy: Understanding the importance of privacy in software development and the impact it can have on the world. Privacy concerns extend beyond targeted advertising and include data leaks and breaches. The connection of multiple pieces of data by data brokers poses a threat to privacy. The local first approach allows for data storage on local devices while still using a server for synchronization. Implementing local first requires a good database and APIs for data storage. Principles like end-to-end encryption and password protection bring benefits but also present challenges. Moving to privacy-focused analytics, using passkeys for encryption, and secure data sharing are ways to protect user privacy.

1. Building JavaScript Apps and Privacy

Short description:

Let's find out what it takes to build a JavaScript application with React and why we should care about improving user privacy. Open source was created in the 80s to enable users to control and change how their devices work. Cryptography and hacking ethics also have political implications. As software developers, we have always been driven by principles, not just salaries. Developing software can have a significant impact on the world, and principles matter more than materialistic questions.

And now, let's find out what it takes to build a JavaScript application with React. Hi, everyone. My name is Andrey Sitnik, and today I will talk about why and how we can improve as a developer users' privacy.

And I know what some of you think, like, come on, nobody has to worry about privacy. Like, we should keep code out of the politics. So, let's talk about this one. This topic. Who uses open source? Do you know that open source was created in the 80s not to have a free library to use without payment, but to be able to control everything which works on your device and to be able to change how it works. So, it was not about like free beer. It was about really own your device, to be an owner rather than a user. And it's pretty political for me.

Another example, like cryptography. Right now, everything has HTTPS in the beginning. And this S means secure encrypted. And encryption was created, the whole philosophy under this encryption. In the 90s, it was created by the idea that protocols and software, which are not available in the market right now, will change the world which we will live in the future. And that people definitely changed the world which we live today. Or like hacking ethics. It contains a very interesting rule to mistrust the authority. And to me, it's pretty political. So, software developer was always about principles, was always about principles. And it was about like new things to think about, salaries, Silicon value, et cetera. Because just a few like recently, whole society sees us as fighters against the system rather than, you know, people who are helping the system for high salaries in the Silicon value. Okay. But why I should care about the politics? First, because today, you can develop, you know, a software which controls the screen of the software. The software will control you. Like the software, it's really like change the world where we live in the future. Second, because materialist question could not answer the most important questions. Why? And this is why like salary doesn't, there is no salary which will be able to fill the hole in your soul. But like principles can.

2. Privacy Matters

Short description:

Privacy is important, and there are reasons to care about it. People often dismiss privacy as only being about targeted advertising, but it goes beyond that. Data brokers collect data from various applications and sell it to shady clients. Data leaks and breaches are also common, and even if your company doesn't work with data brokers, your data can still be exposed. A real-life example involves a food delivery service losing a year's worth of data, including personal information. While some may argue that storing only emails is not a big deal, privacy should still be a concern.

But there is many revolution. I can say that like only privacy is important. So, privacy does not mean that you should care about everything. It's okay to have sympathy for everything. But you know, pick two or three just special for you.

There is no reasons how I can explain why privacy is better. But I can explain my reasons. So, a lot of people think privacy is not important because privacy is just for better advertisement. You know, this Google just to show me a better ads. Data broker is a company which buy a data from the many, many different applications, combine them and sell to very shady clients. Four years ago, journalists found a very creepy case when data broker called Xmode collected data from the Quran app, Muslim dating app, Craiglist, many apps and sell to the U.S. military contractor. It's creepy shady to be honest. Okay. But like we don't work with data brokers. Why I should care if my company like doesn't work with them? You know, if you don't sell the data, it doesn't mean the data will not be available for everyone.

There is such things called data leaks or like data breaches. It's when hackers take the data from your servers and like sell it. There is a way, and right now it's more and more. And if you like, if you save any data to your server, in some moment it will be leaked in my opinion. There is a very interesting example. A few years ago, Yandex food deliveries like Russian Uber Eats, they lost data for the whole year about the deliveries. Whole year of all deliveries contain data with your first and last name, delivery address, delivery time and phone. And people even create a very nice application, map application, where you can, you know, Google and easily find some person in this data. Imagine what your relatives could find in this data. For instance, what if you told your grandma that you will not eat her pie because you are not hungry? But then she will go and find that just 30 minutes later you ordered some Chinese food. Okay. But like in my application, we don't have really private data. You know, we just store emails. So it's not a big deal.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
Understanding React’s Fiber Architecture
React Advanced Conference 2022React Advanced Conference 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
The Eternal Sunshine of the Zero Build Pipeline
React Finland 2021React Finland 2021
36 min
The Eternal Sunshine of the Zero Build Pipeline
For many years, we have migrated all our devtools to Node.js for the sake of simplicity: a common language (JS/TS), a large ecosystem (NPM), and a powerful engine. In the meantime, we moved a lot of computation tasks to the client-side thanks to PWA and JavaScript Hegemony.
So we made Webapps for years, developing with awesome reactive frameworks and bundling a lot of dependencies. We progressively moved from our simplicity to complex apps toolchains. We've become the new Java-like ecosystem. It sucks.
It's 2021, we've got a lot of new technologies to sustain our Users eXperience. It's time to have a break and rethink our tools rather than going faster and faster in the same direction. It's time to redesign the Developer eXperience. It's time for a bundle-free dev environment. It's time to embrace a new frontend building philosophy, still with our lovely JavaScript.
Introducing Snowpack, Vite, Astro, and other Bare Modules tools concepts!
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
React Summit 2022React Summit 2022
17 min
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
Top Content
Today's Talk discusses building flexible, resilient, and future-proof React components using composition and configuration approaches. The composition approach allows for flexibility without excessive conditional logic by using multiple components and passing props. The context API can be used for variant styling, allowing for appropriate styling and class specification. Adding variants and icons is made easy by consuming the variant context. The composition and configuration approaches can be combined for the best of both worlds.
Remix Architecture Patterns
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Remix Architecture Patterns
Top Content
This Talk introduces the Remix architecture patterns for web applications, with over 50% of participants using Remix professionally. The migration from single page applications to Remix involves step-by-step refactoring and offers flexibility in deployment options. Scalability can be achieved by distributing the database layer and implementing application caching. The backend for frontend pattern simplifies data fetching, and Remix provides real-time capabilities for collaborative features through WebSocket servers and Server-SendEvents.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.