Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ajayvk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
ajayvk
2y ago
Wanted to add some context about why this approach made sense for Clace. Clace is built for use cases where a team wants to deploy web tools for internal use. Tens or hundreds of (small) apps can be hosted on one machine. Clace provides blu
92.
▲
by
ajayvk
2y ago
There is a `version files` command to list the files for a version, including the SHA. I plan to add an export command also to make diff easier
93.
▲
by
ajayvk
2y ago
If you mean how do backups, there are tools like https://litestream.io/ which help with SQLite backup to S3 (or other cloud storage)
94.
▲
by
ajayvk
2y ago
Clace runs natively on Windows and macOS, it does not have to run in a container. It can then start containers, either Linux or Windows (the specs https://clace.io/docs/container/overview/#app-specs are Linux
95.
▲
by
ajayvk
2y ago
Yes, most browsers accept Brotli compressed data, so there is no need to decompress
96.
▲
by
ajayvk
2y ago
I meant there is no Clace implementation which uses the file system instead of the database. That would be required for a direct benchmark. For dev mode apps, Clace loads files from disk, but that dev mode has many differences from the prod
97.
▲
by
ajayvk
2y ago
For Hypermedia driven web apps, interactions within a page return small HTML fragments. For larger UI changes, a full page update is recommended (the Multi Page Application MPA style). The scenario of a user staying on a page for long and g
98.
▲
by
ajayvk
2y ago
If it helps, that cleanup is not implemented currently. I did not want the cleanup to be done as part of regular app update/delete. The plan is to add a vacuum/purge type of command, which expressly does this cleanup, and document
99.
▲
by
ajayvk
2y ago
100K/day is less than 2/second. I think those numbers need to be updated on the SQLite page. For a read heavy workload, like serving static files, SQLite can do much more. Since the content caching headers are set, the browser wil
100.
▲
by
ajayvk
2y ago
Clace is meant to be portable and easy to operationalize. It runs on Linux/macOS/Windows. The only external dependency is Docker/Podman for starting containers. Depending on particular filesystem features would make it much m
101.
▲
by
ajayvk
2y ago
Clace can be used to build hypermedia driven UI's, using Go templates and HTMX. https://clace.io/docs/develop/templates/#static-function gives the content hashed file name, the templates have to use that
102.
▲
by
ajayvk
2y ago
Great to get a SRE perspective. The de-duplication uses a SQLite table using a primary key that is the SHA256 of the file contents. There is not much code on top of that. The one complexity is knowing when it is safe to actually delete a fi
103.
▲
by
ajayvk
2y ago
I am the author (of the blog post and of the Clace project). Clace is built for one specific use case: internal web apps, to run locally or on a shared server, for use by a team. Clace is not a general purpose web server. It is an applicati
104.
▲
by
ajayvk
2y ago
In terms of performance, the content hash based file name approach is easier to implement with SQLite storage. The content hash has to be generated just once during file upload, not every time the web server is restarted (or using a build s
105.
▲
by
ajayvk
2y ago
Swapping symlinks is possible. Using a database (sqlite specifically) has other benefits, like being able to do deduplication, backups are easier, compressed content can be stored, content hash can be stored etc.
106.
▲
by
ajayvk
2y ago
I have been building https://github.com/claceio/clace , a project which makes it easier to manage web apps for internal use (locally and across a team). SQLite is used to store static files. This post talks about the re
107.
▲
Using SQLite as storage for web server static content
(clace.io)
273 points
by
ajayvk
2y ago
|
126 comments
108.
▲
by
ajayvk
2y ago
mTLS support has been added for apps. Docs are at https://clace.io/docs/configuration/authentication/#client-c... . Release v0.7.5 has the change
109.
▲
by
ajayvk
2y ago
This could be done using a system cron job which runs clace app update-metadata conf --promote container.idle_shutdown_secs=180 /myapp at every 6pm and then runs clace app update-metadata conf --promote container.idle_shutdo
110.
▲
by
ajayvk
2y ago
I created https://github.com/claceio/clace/issues/33 to track this
111.
▲
by
ajayvk
2y ago
Thanks, need to make the docs less verbose in some places :-) https://clace.io/docs/configuration/authentication/ lists the supported auth mechanisms for apps. A builtin system account is the default. The OAu
112.
▲
by
ajayvk
2y ago
For VOLUMES defined in the Containerfile, Clace creates named volumes which are retained across container updates. This is useful for log files and any data volumes use by the container, including SQLite database files. If there is an app w
113.
▲
by
ajayvk
2y ago
For webapps which are accessed as web pages or through API, looking at the API activity will indicate whether the app is being actively used. Clace currently uses no new API calls with last 3 minutes as indicating idleness. This is aggressi
114.
▲
by
ajayvk
2y ago
Starting on K8s will make scaling down difficult. Starting without K8s for Clace makes it possible to control the developer experience better. Adding K8s and scaling up can be done later. At an abstract level, Kubernetes is used for managin
115.
▲
by
ajayvk
2y ago
Clace currently is single-node. It uses a SQLite database for app metadata (which is what allows it to support atomic updates across multiple apps). I will be adding multi-node support soon. The user will have to bring their own Postgres da
116.
▲
by
ajayvk
2y ago
Yes, I used the Containerfile name since is more neutral. The file format is same across Containerfile and Dockerfile. Clace works with either file name.
117.
▲
by
ajayvk
2y ago
Clace is built in go as a reverse proxy. Clace uses https://github.com/google/starlark-go as its configuration language. This allows full Hypermedia driven apps to be built in Clace, running within the main Clace proce
118.
▲
by
ajayvk
2y ago
Clace is more of an AppServer than a PaaS solution. Docker Compose is not supported currently. If you have a postgres database and want to deploy multiple apps which access the same database, then Clace provides blue-green staged deployment
119.
▲
by
ajayvk
2y ago
An example to create an app is clace app create --approve --spec image --param image=ghcr.io/gchq/cyberchef:latest --param port=80 - cyberchef.localhost:/ This creates a Cyberchef app from its image at https:/&#x
120.
▲
Show HN: Clace – Application Server with support for scaling down to zero
(github.com)
72 points
by
ajayvk
2y ago
|
28 comments
More ›