Hacker News new | ask | show | jobs
by dotmethod 1068 days ago
It's definitely fast enough.

Sending pageviews as POST requests is extremenly cheap on the nodejs + mongo backend. And for the admin part, for summarising data over time and querying, mongodb's aggregation pipeline can take you quite far, without the slightest optimisations (indexes or dedicated timeseries collections). But just as a disclaimer - I haven't done the performance tests at large scale yet with storywise's dataset. But I guarantee it'll be fast enough for small, medium, and moderately large sites, as is right now.

Perhaps some people tend to underestimate a tool's performance, and over-estimate the intensity of their own use-cases on the tool. I think any database or server-side framework would get the job done for something as simple as tracking pageviews. Perhaps storywise will even support other databases in the future, to make it easier for people to self-host on their existing databases - postgres, mysql, sqlite, etc.

Could it be done more efficiently? Absolutely. Use rust (or even golang) for the backend; use clickhouse for the database. You'll likely save ~30-40MB of RAM for the nodejs runtime. And you'll be able to query data blazingly fast with a dedicated analytics database, made for the purpose. But at what cost? At the cost of simplicity.

IMO, full-stack typescript is much easier to work with for a project like this, and mongodb is an easy database to either use as a service (for free even) or self-host.

My point with Storywise was - I want a simple tool; simple to host, simple to use, simple to build features on (of course - only if the feature is simple enough...). I leave the complicated stuff for the other similar tools, there are plenty of them out there.