CrismarMoz
(Crismar Mejia)
1
Hi folks,
I’m learning more about Caddy and I saw an opportunity to build a SQLite Storage Backend.
I’d love some feedback or suggestions.
TODOS:
- I still need to implement Lock and Unlock(yay, distributed locks).
- I want to implement a
docker build
- I want to make the path configuration standard. (Default to
~/certmagic.db
)
2 Likes
matt
(Matt Holt)
2
Hey, thanks for sharing Chrismar!
What is your use case for sqlite as a storage backend?
CrismarMoz
(Crismar Mejia)
3
I don’t have a use case. I have used SQLite before and thought it would be a good challenge to learn how to build modules.
1 Like
Mohammed90
(Mohammed Al Sahaf)
4
Ooh exciting!! SQLite is the
s knees 
There are two things to consider:
-
Without WAL, SQLite supports single-writer-multi-reader. I believe locking might be able to leverage this.
-
Locks on NFS is broken, so that might impact any locking mechanism. It’s documented in SQLite’s FAQ:
https://www.sqlite.org/faq.html#q5
That said, I wonder how Litestream or LiteFS can affect this implementation 
1 Like
CrismarMoz
(Crismar Mejia)
5
I had a look at the FAQ and you’re right about single writer. I dare say it could work in WAL mode as the FAQ doesn’t say otherwise.
I’ll look into LiteFS as it seems like they already did the heavy lifting of making distributed stuff work.
Thanks for the feedback!
2 Likes
system
(system)
Closed
6
This topic was automatically closed after 30 days. New replies are no longer allowed.