#7 – James Long: Actual Budget, Hybrid Logical Clocks & Absurd-SQL
Apr 9, 2024
auto_awesome
In this episode, James Long, creator of Actual Budget and Absurd-SQL, discusses building Actual Budget, implementing syncing solutions, transitioning to different platforms, and bringing SQLite to the browser. Topics include using SQLite in Electron apps, collaboration in local-first apps, challenges in desktop-mobile app integration, and navigating async issues in WebAssembly. The conversation also explores the evolution of web development, programming models, and the role of React.
Building Actual Budget involved creating a syncing solution and expanding to mobile/web platforms with re-used code.
Absurd SQL aimed to overcome web data storage limitations by replicating SQL Lite functionality in IndexDB.
Transitioning mobile apps to web platforms involved storing SQL Lite blocks in IndexDB with transactional semantics.
Efficient web development practices, such as minimizing file sizes and optimizing processing, improve performance.
Deep dives
Transition from Electron App to Web Development
The speaker expressed a desire to raise industry standards and criticized certain aspects of web development. This led to a transition from building an Electron app to exploring development on the web. The challenge of bringing SQL Lite, a key component of the Electron app, to the web was overcome by leveraging WebAssembly and SQL.js for data storage in IndexDB, replicating the file system behavior of SQL Lite in the browser.
Innovating Data Storage: Absurd SQL Project
The introduction of the Absurd SQL project aimed at resolving the limitations of data storage on the web by implementing a unique solution to leverage SQL Lite-like functionality. By storing SQL Lite blocks in IndexDB and mapping the locking semantics of SQL Lite to IndexDB's transactional semantics, the project successfully enabled reading and writing blocks with locking capabilities, improving data handling efficiency and offering a viable alternative for web-based data storage.
Adapting Mobile Apps to Web Standards
Faced with the challenge of adapting mobile apps to web standards, the approach involved creating a solution to store and access SQL Lite blocks in IndexDB with transactional semantics, mimicking the file system lockings of SQL Lite. This innovative method overcame limitations on the web by efficiently managing data storage, enabling a seamless transition from mobile apps to web platforms with improved data handling capabilities.
Balancing Web Development Challenges
The speaker acknowledged the challenges of balancing web development demands with the need for efficient data handling. By leveraging IndexDB to store SQL Lite blocks and implementing locking semantics for data integrity, the project aimed at improving data management on the web. Despite time constraints limiting ongoing project maintenance, the Absurd SQL project showcased an innovative approach to enhancing data storage functionality and compatibility across platforms.
Influential Impact of Efficient Web Development Practices
Efficient web development practices, such as minimizing file sizes and optimizing processing, have a significant impact on performance. By avoiding large file sizes and inefficient processes, developers can enhance web app speed and reduce CPU load. These practices are crucial in achieving high-performance web applications.
Adoption of Advanced Storage Mechanisms in Web Development
The introduction of innovative storage mechanisms like the Origin Private File System (OPFS) is revolutionizing web development. OPFS provides a file system representation that allows locking individual files and improving data persistence. Its adoption indicates a shift towards more sophisticated and secure storage solutions in web development.
Challenges and Innovations in Asynchronous Code Execution
The discussion highlights the challenges and impact of asynchronous code execution, particularly in handling callbacks, promises, and async/await functions. The complexity of managing asynchronous operations and potential performance overhead is addressed. Exploring alternative approaches, like synchronous executions and leveraging shared memory across threads, offers potential solutions and improvements in code performance.
The guest of this episode is James Long, the creator of local-first app called Actual Budget and the absurd-sql project which helped to pave the way to bring SQLite back to the browser. This conversation will explore his journey of building Actual Budget including implementing a syncing solution from scratch and expanding from an Electron app to mobile and the web while re-using most of the code.