TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Go and SQLite in the Cloud

145 pointsby subomiover 2 years ago

12 comments

markuswover 2 years ago
Hey! I&#x27;m the author of the article. Saw a sudden influx of traffic from HN and found the post here.<p>Happy to answer any questions. Although SQLite is so dead-simple-but-awesome that you probably don&#x27;t have any. :D<p>Anyway, hope you enjoy it and learn a thing or two.<p>Markus
评论 #33897716 未加载
评论 #33897233 未加载
评论 #33901052 未加载
评论 #33898056 未加载
评论 #33905744 未加载
评论 #33896819 未加载
cube2222over 2 years ago
It&#x27;s also a really nice combo for simple automation lambdas that need some state and you want an ergonomic DB without paying for full RDS.<p>Go + Lambda + EFS + SQLite work great for that.
评论 #33906329 未加载
评论 #33900197 未加载
评论 #33897804 未加载
simscitizenover 2 years ago
It doesn&#x27;t strike me as the best language for embedding SQLite given the need to constantly cross the Cgo boundary. But I&#x27;m sure it still works fine.
评论 #33898904 未加载
评论 #33899514 未加载
评论 #33897782 未加载
leg100over 2 years ago
How does one perform deployments with go+sqlite? With a client-server database such as postgres your app and database are on separate servers, and you can perform a blue-green, canary, etc, deployment of the app, spinning up new servers running the new version alongside the servers running the old version, before shutting down the servers running the old version.<p>But with sqlite you&#x27;d have to perform a hot-upgrade, surely? i.e. shut down the old version and quickly fire up the new version, with a small window of downtime in between.<p>Note: I see Litestream&#x2F;LiteFS allows distributed deployment (both in beta).
评论 #33898971 未加载
LVBover 2 years ago
This is a good article that neatly covers a lot of the tips I&#x27;ve seen spread across various posts, talks, etc. Thanks!<p>I&#x27;m curious what experience you or others have dealing specifically with the write concurrency elements of this setup, should you find it is actually an issue. I&#x27;ve occasionally seen mention of restructuring things to queue writes within the app (e.g. having a single writer goroutine fed with a channel), but I be interested in more details about when folks hit the point of needing to do that, and what they did (and did it help?)
评论 #33899113 未加载
评论 #33899358 未加载
评论 #33899917 未加载
rtukpeover 2 years ago
This is nice, I&#x27;ve used Litestream for a personal project. I wonder how it compares to something like rqlite [1] with larger datasets<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;rqlite&#x2F;rqlite" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rqlite&#x2F;rqlite</a>
评论 #33895752 未加载
mlangenbergover 2 years ago
I feel that I am spoiled with a great graphical user interface being available to explore MySQL databases in the form of Sequel Ace for macOS, to the point that I sometimes load an sqlite database in MySQL just to be able to browse through it with Sequel Ace.<p>Any recommendations for a macOS GUI for sqlite that comes close to Sequel Ace? I have tried DB Browser for SQLite, but that feels a bit outdated to be honest.
评论 #33899875 未加载
siliconc0wover 2 years ago
Still not convinced sqlite is a good default, you can also run mysql&#x2F;postgres locally which allows you similarly eliminate network hops and gives you the option to separate out things down the road. I&#x27;m not sure how Sqlite handles concurrent readers&#x2F;writers these days but you&#x27;ll probably at least end up scaling concurrency even in the early stages for things like async tasks.
评论 #33898913 未加载
sakopovover 2 years ago
I&#x27;ve become really interested in SQLite when I heard about Litestream. What kind of deployment strategies do folks use to deploy SQLite and Litestream for production use? Also, AFAIK writes can only be done via master instance, so how do you control read&#x2F;writes from multiple app instances?
评论 #33898834 未加载
fyresalaover 2 years ago
You won&#x27;t gain much by the combination of golang, sqlite and the cloud. You can&#x27;t scale out and the cloud layer only makes sqlite slower. I can&#x27;t see any reason not using RDS other than it&#x27;s more expensive.<p>I would only say this is a quick way to run up an application with a cheap VPS for a beginner.
评论 #33896074 未加载
评论 #33896997 未加载
评论 #33896270 未加载
评论 #33896358 未加载
评论 #33903499 未加载
评论 #33897252 未加载
评论 #33897025 未加载
评论 #33896612 未加载
评论 #33896354 未加载
hackerbrotherover 2 years ago
FYI-- it appears your Mastodon link needs &quot;op&quot; changed to &quot;io&quot;!
评论 #33897205 未加载
SergeAxover 2 years ago
I was a big fan of SQL as a language since meeting it in MS Access 95, but today I strongly believe that it became obsolete and too clumsy. I am now in favor of something more strict and structured, like MongoDB fully JSON-powered queries. Unfortunately, Mongo currently is heading directly into corporate hell, and with their uncanny license there&#x27;s no way FOSS community will touch anything related with 6 foot pole in a nearby future.