This is the source code to Franz, a native desktop client for Apache
Kafka I've been working on for the past ~three years or so. Around
2021, I started using Kafka at a startup and I didn't like any of
the clients that were available at the time, so I decided to build
my own in my spare time[1]. I wanted a solid native experience
on the Mac that wasn't web based and didn't require any Docker
containers to run.<p>A few months ago, I decided to make the code source-available[2]
in part because I like the idea of my users being able to see the
code they're running and in part because I want to showcase that
one can build serious applications with Racket. The app also has a
somewhat unusual architecture: the "backend" (the "core" folder)
is written in Racket, the Mac "frontend" (the "FranzCocoa" folder)
is Swift + Cocoa/SwiftUI[3, 4], and the two sides communicate over
pipes. The Windows and Linux versions (the "FranzCross" folder)
reuse the Racket core and implement the frontend using a wrapper
around Racket's cross-platform GUI toolkit[5, 6]. My goal is to
eventually port the frontend for the latter two platforms to use
their native toolkits directly as well (see [3] for some more
details re. Windows).<p>Happy to answer any questions!<p>[1]: <a href="https://defn.io/2022/11/20/ann-franz/" rel="nofollow">https://defn.io/2022/11/20/ann-franz/</a><p>[2]: <a href="https://defn.io/2023/08/10/ann-franz-source-available/" rel="nofollow">https://defn.io/2023/08/10/ann-franz-source-available/</a><p>[3]: <a href="https://defn.io/2023/03/19/racketfest-talk-2023/" rel="nofollow">https://defn.io/2023/03/19/racketfest-talk-2023/</a><p>[4]: <a href="https://defn.io/2022/08/21/swiftui-plus-racket-screencast/" rel="nofollow">https://defn.io/2022/08/21/swiftui-plus-racket-screencast/</a><p>[5]: <a href="https://defn.io/2021/11/07/racketcon-talk-2021/" rel="nofollow">https://defn.io/2021/11/07/racketcon-talk-2021/</a><p>[6]: <a href="https://arxiv.org/abs/2308.16024v1" rel="nofollow">https://arxiv.org/abs/2308.16024v1</a>
In terms of code size, the repo is about 50/50 Racket and Swift:<p><pre><code> $ cloc FranzCocoa FranzCross core/ manual/ --include-lang=swift,racket
355 text files.
244 unique files.
419 files ignored.
github.com/AlDanial/cloc v 1.98 T=0.06 s (2511.1 files/s, 383637.1 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Racket 91 1235 79 9968
Swift 53 1148 132 9438
-------------------------------------------------------------------------------
SUM: 144 2383 211 19406
-------------------------------------------------------------------------------
</code></pre>
But, if I include all the supporting Racket libraries I built for the
app, the ratio changes to about 4/1 in favor of Racket:<p><pre><code> $ cloc FranzCocoa FranzCross core/ manual/ <more paths> --include-lang=swift,racket
1644 text files.
996 unique files.
3334 files ignored.
github.com/AlDanial/cloc v 1.98 T=0.35 s (1871.6 files/s, 168111.5 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Racket 598 5535 356 41295
Swift 65 1316 272 10779
-------------------------------------------------------------------------------
SUM: 663 6851 628 52074
-------------------------------------------------------------------------------</code></pre>
Very interesting to see a Racket/Swift hybrid! Though this seems more of a strict front-end / back-end division, I was reminded at least initially of Shrimp / Goby from Mike Fikes <a href="https://github.com/mfikes/shrimp">https://github.com/mfikes/shrimp</a>
I thought this was <a href="https://meetfranz.com/" rel="nofollow">https://meetfranz.com/</a> until the word “Apache Kafka” and was puzzled.<p>Naming things and name collisions…