GitTrends
tigerbeetle
DISCONTINUED
Our great sponsors
GitTrends | tigerbeetle | |
---|---|---|
8 | 37 | |
707 | 1,012 | |
- | - | |
8.6 | 9.5 | |
2 days ago | over 1 year ago | |
C# | Zig | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
GitTrends
-
Ask HN: Codebases with great, easy to read code?
Thanks for the kind words!
I’ve also published an open-source iOS + Android app to the App Stores, called GitTrends that leverages my AsyncAwaitBestPractices library if anyone wants to see how to use it in a real/live production app!
The source code for GitTrends is available here: https://gittrends.com
-
Visual Studio 2022 for Mac Preview 7 Released
On the bright side, I was able to push a new App Store release for my Xamarin.Forms app, GitTrends, which I couldn't do previously in VS for Mac 2022 Preview.
-
Announcing .NET MAUI Preview 13
Here’s a couple open-source apps I’ve made that you can check out if you’re interested in how to use C# instead of XAML: - GitTrends - An open-source iOS and Android app built in Xamarin.Forms to monitor the Views, Clones and Star history of your GitHub repos - All UI is written in C# using the Xamarin.CommunityToolkit.Markup NuGet package - Also free to download from the iOS App Store and Google Play Store - HackerNews - An open-source .NET MAUI app for displaying the top posts on Hacker News that demonstrates text sentiment analysis of each headline gathered using artificial intelligence - All UI is written in C# using the CommunityToolkit.Maui.Markup NuGet Package
- Cross platform gui frameworks that aren't xaml-based?
-
MAUI Performance issues
For example, here’s an open-source app I’ve published to the App Store, GitTrends, that doesn’t use any XAML.
-
GitHub Profile Views Counter
It’s open source too: https://github.com/brminnick/gittrends
Was GitTrends causing the trouble? I’d love to fix the bug if you found one!
tigerbeetle
-
SQLite Helps You Do Acid
Indeed!
I was so glad to see you cite not only the Rebello paper but also Protocol-Aware Recovery for Consensus-Based Storage. When I read your first comment, I was about to reply to mention PAR, and then saw you had saved me the trouble!
UW-Madison are truly the vanguard where consensus hits the disk.
We implemented Protocol-Aware Recovery for TigerBeetle [1], and I did a talk recently at the Recurse Center diving into PAR, talking about the intersection of global consensus protocol and local storage engine. It's called Let's Remix Distributed Database Design! [2] and owes the big ideas to UW-Madison.
-
20 years of payment processing problems
> By shifting business logic to stored procedures you avoid this.
Thanks, we considered stored procedures to bring the number of database queries down from 18 queries per payment to 1 query per payment. However, that would have provided only an order of magnitude improvement, and brought with it complexity of testing, compared to the state machine [1] we have in TigerBeetle.
At the same time, the biggest performance bottleneck is not only the multiple roundtrips, but the lack of first-class batching in the interface. What we do in TigerBeetle instead, is we send 8192 transfers in a single network request. This brings the network/disk cost equation down from 1 query per payment, to 1/8192 query per payment. It's like group commit, on steroids.
[1] https://github.com/coilhq/tigerbeetle/blob/main/src/state_ma...
> That's also why SQLite is very fast, as it runs in your application's memory as a library. But then your data is tied to the same limitations as the machine the application is on.
We could have made SQLite distributed, but SQLite also does not solve our storage fault model. For example, misdirected reads/writes, lost reads/writes, bitrot in the middle of the committed log. SQLite was also not explicitly designed to be integrated with a global consensus protocol as per ”Protocol-Aware Recovery for Consensus-Based Storage” from UW-Madison. For example, there are optimizations around storage fault tolerance in the commit log that you can do, or around deterministic storage across replicas for faster recovery, that you can't do with SQLite.
I had the experience of being part of a team in 2020 doing performance and safety analysis on Mojaloop [1], the open-source payments switch. The emphasis was mostly to identify performance bottlenecks. For example, graphing waterfalls of database queries, estimating expected vs actual concurrency, digging into latency spikes, timeout interactions, and missed group commit opportunities.
However, on the safety front, one of the most challenging issues was guaranteeing the rollback of funds in the event of failure, as part of the two-phase commit money transfer protocol, and coordinating this across multiple SQL queries, database transactions, Kafka queues, even multiple code repositories, especially as different systems experience clock drift or as disks or machines fail.
You want to ensure that the money either moves, or doesn't move, that it doesn't get lost somewhere in between.
Most payment systems re-implement all this business logic, again and again, so we extracted this from Mojaloop once-and-for-all, to create TigerBeetle [2], an open-source financial accounting database, that provides multi-AZ replication, automated leader election, and two-phase payments out-of-the-box.
[2] https://github.com/coilhq/tigerbeetle (Zig)
> It sounds like payments might be part of the larger concept of declarative programming (DP)
Yes, exactly! The idea with TigerBeetle's state machine [1] is to expose double-entry accounting as higher level financial primitives, so that developers can think in terms of declaring transfers from one account to another. The business logic behind the scenes is detailed, but the interfaces and data structures are simple.
[1] https://github.com/coilhq/tigerbeetle/blob/main/src/state_ma...
> Maybe TigerBeetle could be generalized to support any multi-step distributed process?
That's part of the plan, that the distributed database framework of TigerBeetle can be used as a ”distributed Iron Man suit” to support any kind of state machine.
-
How Safe Is Zig?
It's a pleasure. Let me know if you have any more questions about TigerBeetle. Our design doc is also here: https://github.com/coilhq/tigerbeetle/blob/main/docs/DESIGN....
-
Distributed Systems Shibboleths
> Allowing developers to think about a stream of operations that moves the databases from one legal state to another is super powerful.
It is super powerful. We used this RSM intuition to test TigerBeetle's strict serializability, by verifying state transitions the instant they happen, instead of trying to piece everything together and verify strict serializability after the test run.
Here it is in 49 lines of code:
https://github.com/coilhq/tigerbeetle/blob/477d6df366e2c10fa...
Surprisingly, some of the most powerful distributed systems algorithms or tools are actually deterministic. They're powerful because they can "load the dice" and so make the distributed system more intuitive for humans to reason about, more resilient to real world network faults, and do all this with more performance.
For example, Barbara Liskov and James Cowling's deterministic view change [1], which isn't plagued by the latency issues of RAFT's randomized dueling leader problem. Viewstamped Replication Revisited's deterministic view change can react to a failed primary much quicker than RAFT (heartbeat timeouts don't require randomized "padding" as they do in RAFT), commence the leader election, and also ensure that the leader election succeeds without a split vote.
Determinism makes all that possible.
Deterministic testing [2][3] is also your best friend when it comes to testing distributed systems.
[1] I did a talk on VSR, including the benefits of the view change — https://www.youtube.com/watch?v=Wii1LX_ltIs
[2] FoundationDB are pioneers of deterministic testing — https://www.youtube.com/watch?v=OJb8A6h9jQQ
[3] TigerBeetle's deterministic simulation tests — https://github.com/coilhq/tigerbeetle#simulation-tests
-
Lies we tell ourselves to keep using Golang
This is the chasm problem, where people don't use a technology because people aren't using that technology, thus the technology has difficulty gaining adoption. I did see that Zig does have it's own killer app and startup that's using Zig: TigerBeattle.
-
Ask HN: Codebases with great, easy to read code?
Are we allowed to share repos that we've written? :)
If so, then here's distributed consensus written in Zig:
https://github.com/coilhq/tigerbeetle/blob/main/src/vsr/repl...
Something that differentiates this from many other consensus implementations is that there's no networking/multithreading code leaking through, it's all message passing, so that it can be deterministically fuzz tested.
I learned so much, and had so much fun writing this, that I hope it's an enjoyable read—or please let me know what can be improved!
Control flow statements should always be on their own lines, then it's easy to find all of them by visually scanning top-down, without needing to look all the way down each line.
[1]: https://github.com/coilhq/tigerbeetle/blob/main/src/vsr/repl...
What are some alternatives?
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
GitVersion - From git log to SemVer in no time
raft - Golang implementation of the Raft consensus protocol
LibGit2Sharp - Git + .NET = ❤
Verlite - Automatically version projects via semantic git tags with a focus on being lite, optimized for continuous delivery.
Bonobo Git Server - Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
Co-dfns - High-performance, Reliable, and Parallel APL
GitLink - Making .NET open source accessible!
raft-grpc-example - Example code for how to get hashicorp/raft running with gRPC
Husky.Net - Git hooks made easy with Husky.Net internal task runner! 🐶 It brings the dev-dependency concept to the .NET world!
GitExtensions - Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
NGit - Automated jgit port to c#