The best Hacker News stories from All from the past day
Latest posts:
Figma Slides
Figma Slides
One Million Checkboxes
One Million Checkboxes
Show HN: Triplit – Open-source syncing database that runs on server and client
Hey HN, we’re Matt and Will, the co-founders of Triplit (<a href="https://www.triplit.dev">https://www.triplit.dev</a>). Triplit is an open-source database (<a href="https://github.com/aspen-cloud/triplit">https://github.com/aspen-cloud/triplit</a>) that combines a server-side database, client-side cache, and a sync engine into one cohesive product. You can try it out with a new project by running:<p><pre><code> (npm|bun|yarn) create triplit-app
</code></pre>
As a team, we’ve worked on several projects that aspired to the user experience of Linear or Superhuman, where every interaction feels instant like a native app while still having the collaborative and syncing features we expect from the web. Delivering this level of UX was incredibly challenging. In each app we built, we had to implement a local caching strategy, keep the cache up to date with optimistic writes, individually handle retries and rollbacks from failures, and do a lot of codegen to get Typescript to work properly. This was spread across multiple libraries and infrastructure providers and required constant maintenance.<p>We finally decided to build the system we always wanted. Triplit enables your app to work offline and sync in real-time over websockets with an enjoyable developer experience.<p>Triplit lets you (1) define your schema in Typescript and simply push to the server without writing migration files; (2) write queries that automatically update in real-time to both remote changes from the server and optimistic local mutations on the client—with complete Typescript types; (3) run the whole stack locally without having to run a bunch of Docker containers.<p>One interesting challenge of building a system like this is enabling partial replication and incremental query evaluation. In order to make loading times as fast as possible, Triplit will only fetch the minimal required data from the server to fulfill a specific query and then send granular updates to that client. This differs from other systems which either sync all of a user’s data (too slow for web apps) or repeatedly fetch the query to simulate a subscription (which bogs down your database and network bandwidth).<p>If you’re familiar with the complexity of cache-invalidation and syncing, you’ll know that Triplit is operating firmly in the distributed systems space. We did a lot of research and settled on a local first approach that uses a fairly simple CRDT (conflict-free replicated data type) that allows each client to work offline and guarantees that they will converge to a consistent state when syncing. It works by treating each attribute of an entity as a last writer wins register. Compared to more complex strategies, this approach ends up being faster and doesn’t require additional logic to handle conflicting edits between concurrent writers. It’s similar to the strategy Figma uses for their collaborative editor.<p>You can add Triplit to an existing project by installing the client NPM package. You may self-host the Triplit Server or pay us to manage an instance for you. One cool part is that whether you choose to self-host or deploy on Triplit Cloud, you can still use our Dashboard to configure your database or interactively manage your data in the Triplit Console, a spreadsheet-like GUI.<p>In the future, we plan to add APIs for authentication, file uploads, and presence to create a Supabase/Firebase-like experience.<p>You can get started by going to <a href="https://triplit.dev">https://triplit.dev</a> or find us on Github <a href="https://github.com/aspen-cloud/triplit">https://github.com/aspen-cloud/triplit</a>. Thanks for checking us out and we are looking forward to your feedback in the comments!
Show HN: Glasskube – Open Source Kubernetes Package Manager, alternative to Helm
Hello HN, we're Philip and Louis from Glasskube (<a href="https://github.com/glasskube/glasskube">https://github.com/glasskube/glasskube</a>). We're working on an open-source package manager for Kubernetes. It's an alternative to tools like Helm or Kustomize, primarily focused on making deploying, updating, and configuring Kubernetes packages simpler and a lot faster. Here is a demo video (<a href="https://www.youtube.com/watch?v=aIeTHGWsG2c#t=17s" rel="nofollow">https://www.youtube.com/watch?v=aIeTHGWsG2c#t=17s</a>) with quick start instructions.<p>Most developers working with Kubernetes use Helm, an open-source tool created during a hackathon nine years ago. However, with the rapid growth of Kubernetes packages to over 800 packages on the CNCF landscape today, the prerequisites have changed, and we believe it’s time for a new package manager. Every engineer we talked to has a love-hate relationship with Helm, and we also found ourselves defaulting to Helm despite its shortcomings due to a lack of alternatives.<p>We have spent enough time trying to get Helm to do what we need. From looking for the correct chart, trying to learn how each value affects the components and hand-crafting a schemaless values.yaml file, to debugging the final release if it inevitably fails to install, the experience of using Helm is, for the most part, time consuming and cumbersome.<p>Charts often become more complex, requiring the use of sub-charts. These umbrella charts tend to be even harder to maintain and upgrade, because so many different components are bundled into a single release.<p>We talked to over 100 developers and found that everyone developed their own little workarounds, with some working better than others. We collected the feedback poured everything we learned from that into a new package manager. We want to build something that is as easy to use as Homebrew or npm and make package management on Kubernetes as easy as on every other platform.<p>Some of the features Glasskube already supports are<p>Typesafe package configuration via UI or interactive CLI to inject values from other packages, ConfigMaps, and Secrets.<p>Browse our central package repository so there is no need to look for a Helm repository to find a specific package.<p>All packages are dependency-aware so they can be used and referenced by multiple other packages even across namespaces. We validate the complete dependency tree - So packages get installed in the correct namespace.<p>Preview and perform pending updates to your desired version with a single click of a button. All updates have been tested in the Glasskube test suite before being available in the public repository.<p>Use multiple repositories and publish your own private packages (e.g., your company's internal services packages, so all developers will have the up-to-date and easily configured internal services).<p>All features are available via UI or interactive CLI. You can also manage all packages via GitOps.<p>Currently, we are focused on enhancing the user experience, aiming to save engineers as much time as possible. We are still using Helm and Manifests under the hood. However, together with the community, we plan to develop an entirely new packaging and bundling format for all cloud-native packages. This will provide package developers with a straightforward way to define how to install and configure packages, offer simple upgrade paths, and enable us to provide feedback, crash reports, and analytics to every developer working on Kubernetes packages.<p>We also started working on a cloud version. You can pre-signup here in case you are interested: <a href="https://glasskube.cloud" rel="nofollow">https://glasskube.cloud</a><p>We'd greatly appreciate any feedback you have and hope you get the chance to try out Glasskube.
Show HN: From dotenv to dotenvx – better config management
Show HN: From dotenv to dotenvx – better config management
Show HN: I built a JavaScript-powered flipdisc display
Show HN: I built a JavaScript-powered flipdisc display
I found a 1-click exploit in South Korea's biggest mobile chat app
I found a 1-click exploit in South Korea's biggest mobile chat app
The case for not sanitising fairy tales
Local First, Forever
Microsoft removes documentation for switching to a local account in Windows 11
Polyfill supply chain attack hits 100K+ sites
Ball: A ball that lives in your dock
Ball: A ball that lives in your dock
Microsoft breached antitrust rules by bundling Teams and Office, EU says
Julian Assange has reached a plea deal with the U.S., allowing him to go free