xtemplate VS hashfs

Compare xtemplate vs hashfs and see what are their differences.

xtemplate

A html/template-based hypertext preprocessor and rapid application development web server written in Go. (by infogulch)

hashfs

Implementation of io/fs.FS that appends SHA256 hashes to filenames to allow for aggressive HTTP caching. (by benbjohnson)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
xtemplate hashfs
3 3
68 344
- -
9.0 2.6
8 days ago 4 months ago
Go Go
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

xtemplate

Posts with mentions or reviews of xtemplate. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-10.
  • ETag and HTTP Caching
    4 projects | news.ycombinator.com | 10 Apr 2024
    I've also been dissatisfied with http caching not utilizing content hashes enough. If you're using server side templating one issue is that it's not efficient to calculate the hash while you're running the template, it would need to be precalculated to be efficient enough to use.

    So I wrote https://github.com/infogulch/xtemplate to scan all assets at startup to precalculate the hash for templates that use it, and if a request comes in with a query parameter ?hash=sha384-xyz and it matches then it gives it a 1 year immutable Cache-Control header automatically. If a file x.ext has a matching x.ext.gz/x.ext.zst/x.ext.br file then (after hashing the content to make sure it matches) client requests that support it are sent a compressed version streamed directly from disk with sendfile2. I call this "Optimal asset serving" (a bit bold perhaps).

  • Show HN: XRss: An RSS Reader and web stack demo powered by Htmx
    3 projects | news.ycombinator.com | 2 Sep 2023
    Yes, that would be useful. Basically, what you have in https://github.com/infogulch/caddy-xtemplate/blob/master/tem... - but without Caddy dependencies and with a way to use any router library (I use gorilla/mux).

    I would make the templates library take a callback function for every public template: func(method, path string, template).

    Then the user could add any custom logic to register the route handler and execute the template with any application specific inputs.

hashfs

Posts with mentions or reviews of hashfs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-10.
  • ETag and HTTP Caching
    4 projects | news.ycombinator.com | 10 Apr 2024
    An approach like https://github.com/benbjohnson/hashfs allows file names to be updated at runtime to be content hashed. This removes the need for the extra "304 Not Modified" API calls from the client. This content hash based file renaming is usually done using a build step which renames files. For applications where the static file serving and HTTP request processing are done in the same application, this can be done in memory without a build step for file renames.

    I am using that approach in my project https://github.com/claceio/clace. It removes the need for a build step while making aggressive static file caching possible.

  • Show HN: Clace – Platform for secure internal web applications
    6 projects | news.ycombinator.com | 18 Oct 2023
  • A Github Gist implementation of the upcoming io/fs interface (go 1.16)
    2 projects | /r/golang | 13 Jan 2021
    About io/fs, there is also this implementation: https://github.com/benbjohnson/hashfs which demonstrates a less obvious (until it clicks that you can build a FS that works on top of another one!) but really practical use case.

What are some alternatives?

When comparing xtemplate and hashfs you can also consider the following projects:

xrss

clace - Clace is a web app deployment platform for internal tools. Clace is a reverse proxy and container orchestrator, providing GitOps workflow and OAuth support in a single lightweight binary. Clace is cross platform across Linux, Windows and OSX.

go-plugin - Golang plugin system over RPC.

gistfs - A Go io/fs filesystem implementation for reading files in Github gists.

certmagic - Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured