start	end	text
0	5200	Talk is about building secure reproducible data infrastructure with Nix and NixOS.
5800	12080	So building data infrastructure is still surprisingly... I'm close to the mic.
12080	19140	Building data infrastructure is still surprisingly, to you I assume, manual.
19460	26660	Us data engineers, we stitch together storage and catalogs and query engines with one-off scripts.
26660	37580	And when we try to move that stack across environments, say from dev to a colo, to an air gap lab, things break a lot.
37680	47220	So with Nix and NixOS, it's possible to define everything as code and run the same stack and all its dependencies anywhere in a reproducible way.
47540	49880	So that's the premise behind this talk.
49880	59260	And before we define what a lake house, a data lake house, not real estate here, is, I want to talk about what it isn't.
59420	67960	So traditional data warehouses, databases, they're optimized for reliability and performance, but they're really rigid.
67960	70500	So they require a lot of upfront data modeling.
70500	73460	They rely on ETL pipelines to load data.
73460	83440	They typically only scale vertically, which becomes really expensive and really complex when you have a large volume of data, which everybody wants to have.
83440	87300	So data lake houses took the opposite approach.
87300	90300	So this was born in the era of Hadoop.
90300	97060	These are store-everything-first data tools.
97520	99160	They worry about structure later.
99160	104140	Store-it-first, just the E of the ETL, put it all in, figure it out later.
104440	106160	They scale horizontally.
106460	112460	They're great for collecting a bunch of stuff all at once, but they're messy, they're disorganized.
112460	116720	It's really hard to actually extract any information or value from.
117040	122640	The combination, the game changer, is the two combined.
122640	131100	So a data lake house brings all of the benefits from both types of data storage.
131100	144900	It's built on object storage like a data lake, but it layers on transactional guarantees, ACID transactions, metadata management, all the things you expect from a warehouse.
145200	150120	And the critical layer of this is the open table formats.
150740	153480	And I'll explain what those are.
153820	160020	But these support features like time travel and version control, these are things that make a data lake house functional.
160220	163100	So I told you what it wasn't.
163860	165300	So what is it?
165300	170100	There's three main minimal components for a data lake house.
170420	172360	The first is object storage.
172780	177780	To work for large amounts of data, that object storage has to be optimized for scale and throughput.
177780	182220	It has to be able to store structured, unstructured, semi-structured, all kinds of data.
182220	185560	Anything from parquet to logs to models.
185680	187500	And then on top of that is open table format.
187500	191300	So this is where I tell you what I told you in the last slide, but more in detail.
191420	195640	So this is Apache Iceberg, Apache Hudi, Delta Lake.
195720	202620	The OTFs are what introduces transactional semantics into object storage.
202620	212220	What takes the data lake, the database, and puts it in the data lake, making a data lake house.
212700	216680	So it tracks data files, schema changes.
217460	223020	This gives us really cool things like time travel, partition pruning, consistent multi-rider support.
223020	228040	It's what makes it worthwhile as a data infrastructure.
228600	231040	And the last part is compute.
231730	237420	This is your query engine, and this could be something like Trino, or Dremio, or DuckDB.
237660	244540	Depending on whether or not you need distributed execution, or BI dashboards, or fast local analytics.
244660	249220	And the beauty of this architecture, the whole point of it, is that you can swap and drop.
249220	252400	So your compute can be anything, or it can be many things.
253160	260060	But together, all of these three things is the minimal requirement for a data lake house.
261460	267500	But if you're actually going to do it, if you're actually going to make a data lake house, you also need a catalog.
267820	272680	So catalogs, anything but futzing around, need a catalog.
272680	277540	So Iceberg Catalog is where your actual metadata gets managed.
277980	285660	It maps logical table names to metadata, so every time you write to a table, Iceberg will generate a new snapshot.
285660	298580	And this snapshot references a manifest list, which naturally points to manifest, which then points to the actual data files that are in Parquet.
298580	300560	So it's a metadata tree.
300840	306520	So the catalog stores the latest snapshot ID, the schema versions, the partition specs, the table properties.
306520	309720	It's the GitHead pointer for your data.
310580	319480	So you can use a catalog for a snapshot-based query, so you can select all the data as it existed in this specific point in time.
319480	325720	You can do rollbacks, so if you mess up your data, which happens a lot, you can just roll back to the point when it was good.
325800	334780	You can do branching, so you can do a Git-like... it turns your data lake house into a Git-like system.
334780	345740	So you can do branching, so you can have dev and prod, you can have, this is my fudsing around space, this is Daniel who always drops all his tables space, so on and so forth.
345740	353200	You can do auditability, so metadata is appended... auditability... so metadata is append-only.
353200	355000	Object storage is immutable.
355100	361140	So you get a full history of all the changes that you have ever made, if you want to.
361740	376060	Decide what your snapshot retention will be, but that means you can... it's really important for fields where auditability is an important feature for enterprise data.
376060	379320	Then you... so there's a couple... that's what it does.
379320	383220	There's like three or four really good ones.
383220	384800	They are open source.
384800	391940	It's Nessie Polaris, which is donated to the Apache Foundation by Snowflake.
392180	395620	It's designed to be embedded, which is kind of a neat feature.
395780	401000	Gravitino is really neat, because it works past and forward.
401000	408300	So it works with things like Hive and stuff like that, but also with Delta Lake, Apache Iceberg.
408300	413020	So you can go front, and you can go back, and it can go all around, and it's also an Apache project.
413020	414180	Great.
414900	420620	If you're bridging legacy and modern, this is your guy for catalog.
421200	432600	So all three support REST APIs, which makes it really easy to plug into engines that I was talking about, those query engines like Trino and Spark and Dremio, and also, of course, object storage that also relies on REST.
432600	436520	This whole stack is based on REST API.
436520	439920	So, Nessie, you probably spent all that time explaining what it is.
439920	444060	You're probably asking yourself, but why would I do that?
444280	453460	So this is a diagram showing where the lake house sits in an entire AI infrastructure.
453460	462060	So the center, data lake house, this is where everything lands, tabular data, training sets, vector embeddings, models, sensor logs.
462060	463680	And I'm not trying to just repeat buzzwords.
463680	466280	I'm just trying to explain why you'd want to build one, right?
466600	472300	Your application data, it's your storage, it's your retrieval layer, it's everything.
472920	475080	It's the heart of your stack.
475080	480180	And then on the left, it's like your hugging face.
480420	486160	It's where you manage your models, data sets, your collaborative spaces, all that stuff.
486520	489460	It's where you can store and share and reuse models.
489460	492180	And on the right, you have your ML op stack.
492180	503480	So this is the AI lifecycle and action and data moves back and forth from this space as you make and create features, as you make and recreate models.
504440	506380	And then you have a vector database.
506380	509400	So those are the cool things like LanceDB and PineconeDB.
509520	514280	And those are optimized for fast similarity search and powers rack.
514280	519140	And all of this is querying object storage directly without migration.
519140	522020	So you can't have, it's the minimum file requirement.
522020	527140	If you want any of that stuff, you want all that stuff, you have to have a data lake out.
528280	537740	Okay, so and then of course, at the foundation, you have Nix, which declaratively defines and deploys the whole, all of it, right?
538080	545360	From infrastructure to services, to pipelines, to security, to, you know, the whole networking, everything.
545360	549340	Soup to nuts, that's where it is, ideally, you know.
549500	559000	Okay, so what, you're probably asking me right now, so what if I already have Docker or Podman or Kubernetes?
559000	561660	Because I feel like I'm not tall enough for this, sorry.
562220	564680	I don't think it's an either or situation.
564720	568920	You know, you can integrate Nix with two existing workloads.
568920	577880	So in fact, you might need to do that because not everything is a Nix OS package yet, which is why you lovely people are here supporting the community.
578600	587480	But, you know, many teams, data teams, particularly, that's what I know about, we use Docker for deploying services and running analytics jobs already.
587480	591520	So Nix can slot into those workflows and actually make it better.
591580	601960	I've heard it said that Nix is a better Docker compose than Docker, but I'll leave that to your interpretation.
602620	607820	But you can use Nix to build container images reproducibly, and there's a couple of different ways to do that.
607820	614780	You can use docker-tools.build-image, and it lets you define the container and all of its dependencies entirely in Nix.
614780	620000	Or you can use Nix 2 container to build OCI images and push them to a registry.
620860	628540	But either way, you get fully versioned deterministic containers that behave in the same way in dev, in CI, in prod.
628540	632600	And this makes Nix a great tool, even in container-heavy environments.
632600	636420	And you can use this to lock down builds and remove guesswork from your Docker pipeline.
636420	640420	So you can have it all.
641840	644980	So but where does Nix actually fit in?
644980	651240	So at its core, I mean, you might be familiar, but for those who aren't, Nix is a package manager.
651240	656200	It builds software and systems with declarative specifications.
656200	661080	So that means if your inputs don't change, your outputs don't either.
661080	662240	Not ever.
662260	667740	So it should work wherever you put it.
667740	681220	So with Nix OS, that extends to an operating system, and you define your full system configuration of the file, things like services, user, firewall, rules, TLS, certs, file systems.
681740	685080	Nix OS builds those all.
685080	688100	So this is a real declarative infrastructure.
688240	697340	There's no provisioning script, no bash, glue, no step 14 install, JDK once again, over and over again.
698220	707520	It's the same configuration builds your entire stack on your laptop, on your rack, on an edge box, wherever you want to put it.
707520	713720	It's portable, reproducible, version-controlled, and that's exactly what we want.
714480	731180	When we're designing critical infrastructure like data infrastructure, I'm giving this talk in part because I feel like data infrastructure is being left behind out of when we talk about critical infrastructure, but it is, as I said, in the heart of this stack.
731180	736200	So do protect your data.
736200	744420	So this is how, essentially, we move from fragile, one-off setups to infrastructure that you can deploy like software.
744420	753020	Okay, so a flake house, flake house is data lake, lake house on Nix, right?
753020	758980	So what do you exactly do you want to define in a Nix flake?
758980	764740	So you want MinIO, which is, or whatever, your on-prem object storage software.
764740	775200	You need Iceberg, that's your open table format, that's where all the cool stuff about data lake house, time travel, evolution, partition, you need it.
775960	782880	A catalog like Nessie or Gravitino or Polaris, so you get version control on your data.
783140	793460	Chino, Spark, DuckDB for compute, TLS, IAM, network policies, you need systemd to manage the whole thing.
793460	798460	So the stack is entirely in Nix, or it could be.
798460	808060	This is somewhat aspirational, which we will get into why or how the aspiration begins or becomes, right?
809480	818260	All right, so, and then once the stack is defined in a flake, once your flake house is defined in a flake, we can deploy it anywhere.
818260	823180	So it can go, like I said, on a laptop, in dev, edge, wherever.
823460	832300	The point is, there's no manual tweaks, no drifts, no reconfiguring, just deploys like code.
832980	836920	So this approach gives some really clear advantages.
837980	852840	Obviously, security and control, so all your services, object storage, your catalog, your query engine, they should all deploy behind your trust boundary if you deploy it on-prem.
853600	859240	You have all your access control is defined for everything, every place you try to deploy this.
859240	864720	This means you know what's running, who can talk to what, and how it was built.
865180	867800	The operational simplicity is another point.
867800	879160	So Nix OS modules make deployment and update consistent across environments, which is really important, especially since so many in data, when so much is done locally.
880140	884520	You know, data exploration, feature selection is often done on a laptop.
885800	894980	But it needs to be extrapolated to a full data set, your full production system, and this can do that.
895580	899120	It makes automation safer and onboarding safer.
899940	902460	And then the third is scale and portability.
902760	913820	Like I was saying, you can deploy it from your laptop to your colo, and there's no drifts, it's reproducible.
913820	919560	It's scaling out becomes a matter of just replicating known good systems.
919560	926640	So it makes your data infrastructure predictable, testable, easier to move.
932460	936860	But there's some challenges with this approach.
936860	953080	So the primary problem is that, or challenge, is that key components like Iceberg, Apache Iceberg, Nessie, Polaris, the catalogs, and Iceberg itself aren't available as Nix packages yet.
953080	964680	So there's no official modules or system services for these components, which means you'd have to wrap them as binaries or run them as containers, or Docker, or whatever.
964680	970040	But that breaks the full declarative integration, which is the cool part of what I was talking about.
970040	973720	So , you know, a little, a tiny bummer.
974480	977100	And then service orchestration.
977100	985040	So there's really not a great way to express service dependencies across components.
985040	997180	So, for example, ensuring that, you know, MinIO is online before the catalog initializes, or that Trino doesn't start before the Iceberg tables are reachable.
997180	1003780	It has to look manually scripted, so it's not...
1003780	1019780	And then, you know, defining the networking policy, defining encrypted communication across access control is possible, you can do it, but it's still a little fragile, especially with self-search.
1020880	1025640	It's a little, it's a little, it's a little pain point.
1025640	1035860	And then at secret management, so in object storage and MinIO and anything that's S3, you saw the whole stack, it's all S3, like, compatible.
1035860	1053940	And the problem is that, or challenge, is that there's a tool called SOPS Nix that helps with integrating services that expect secrets as environmental bars like S3 compatible.
1054940	1055980	Anything?
1056440	1064160	But these, it's a little inconsistent, so it would be cool if it was, like, you know, more, less friction.
1064640	1085580	So the, you know, the foundation, as we saw, the benefits are really clear, but, you know, there's room to grow, and I think primarily the room to grow, the where to grow is to have modules, modules for Nessie, Polaris, Gravitino, and Apache Iceberg.
1085680	1088100	And those are really foundational elements.
1088100	1089580	You got two out of the three of the stack.
1089580	1092100	Remember the three components of a data lake house?
1092280	1095640	Object storage, open table format, and query engine.
1095640	1106020	Well, you got query engines, because you got Spark, and you got Trino, and you got object storage, because you have MinIO, but you're, you know, it's that middle bit.
1106540	1108880	It's a little, you know.
1109760	1116900	So if you care about data infrastructure, or you just want to expand what Nix can do, you know, this is your moment.
1119400	1124200	And, you know, sort of the idea that building data infrastructure is still really fragile.
1124200	1136360	You know, it's stitched together with scripts and tribal knowledge, and it's just tuned for one environment, so it makes it really hard to move without breaking.
1137060	1149980	So this is a really great alternative that Nix and NixOS offer to treat data infrastructure like code, where you can define your whole stack declaratively, version it, run it anywhere.
1151580	1158180	And so if you're working on anything like this or want to, you know, let's talk.
1160120	1160780	Thank you.
