News for hackers. Stuff that matters.
Re:The Baked Data architectural pattern by laputan_machine on Thursday July 29, 2021 @08:25AM (#27995606)
It's perfect for serverless, like lambdas?

For small datasets (<100MB), perhaps, but I disagree with the author that this scales well. I wouldn't want to be deploying a multi-gigabyte binary every time i make a change to the dataset...

Re:The Baked Data architectural pattern by fddhjjj on Thursday July 29, 2021 @08:38AM (#27995717)
It depends on your deployment setup? Or the frequency of dataset changes?

I check-in a one-line change and CI/CD kicks off a docker build and push. A multi gigabyte binary is pushed to AWS ECR every time. I hardly notice. One benefit is the consistency. Small change. Pushed. Large change. Pushed. Dataset. Pushed. New OS, new code, new lib, new data all the same.

Maybe it doesn’t scale to frequent updates? If you are streaming me data, I can’t update my image every second..

Re:The Baked Data architectural pattern by tlarkworthy on Thursday July 29, 2021 @08:58AM (#27995941)
no, it's no good for big data sets because lambda warmup time and RAM consumption is proportional to binary size.

Just reference the data as a URL to static storage, problem solved.

Re:The Baked Data architectural pattern by HelloNurse on Thursday July 29, 2021 @09:20AM (#27996188)
> no, it's no good for big data sets because lambda warmup time and RAM consumption is proportional to binary size

What binary size? What RAM consumption? With a SQLite database or something similar you'll have a small and possibly unchanged program, one or more large replaced database files, and only the unavoidable reloading of actually used index pages contributing to memory use and "warmup" after an update.

Of course if instead of relying on some efficient DBMS that manages indexing and caching you have to discard and reload a large file in its entirety after an update in order to hold all its content in memory your database is part of the problem and not part of the solution.

Re:The Baked Data architectural pattern by simonw on Thursday July 29, 2021 @10:46AM (#27997164)
Weirdly Cloud Run claims that cold start time isn't coupled to the size of the binary.

I find that larger database files on Cloud Run do need to be assigned a higher amount of RAM though, or they fail to start - but I'm not sure if that's a bug in how my code works. I've not yet spent much time tweaking SQLite parameters.

Re:The Baked Data architectural pattern by fddhjjj on Thursday July 29, 2021 @05:33PM (#28001770)
We switched from deployment:

> I wouldn't want to be deploying a multi-gigabyte binary every time i make a change to the dataset...

To runtime startup:

> lambda warmup time

And cost:

> RAM consumption is proportional to binary size

Re:The Baked Data architectural pattern by simonw on Thursday July 29, 2021 @10:44AM (#27997149)
I have a few projects running on Cloud Run that deploy around a GB of SQLite data. Works pretty well! Not so great above 2GB though, at that point the model of deploying a copy of the data with each deploy stops working so well.

This pattern is mostly useful for content-oriented sites with human editors. It's pretty rare for any human-edited publication to generate more than a few hundred MBs of structured data!

Re:The Baked Data architectural pattern by tantalor on Thursday July 29, 2021 @09:39AM (#27996389)
> multi-gigabyte

I forgot how to count that low

Re:The Baked Data architectural pattern by ramoz on Thursday July 29, 2021 @12:04PM (#27998052)
I deploy AI to prod. Low data gravity in high performant envs (SSD relevant here) is a common component.

~4.1TB raid0 on a bunch of ssds xN distributed nodes we depoly, leveldb shards & client in the app.

Daily updates, blue/green needed