GopherCon 2014

Desarrollando una base de datos de alto rendimiento con Go

Ben Johnson  · 

Presentación

PDF (pincha para descargar)

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

yeah so you guys can hear me in the back good I reckon so yeah I like to write databases in my free time that's kind of a weird hobby to have but I really like writing them and go and it's just you know goes just a fun language to write stuff down

so this is about writing high-performance databases and and go so before we really get into this let's talk about like when people say they write a database is really two different things they're talking about you can either have a database server

so this is kind of remodel your your data there's like my sequel Oracle you know it's a document database it's a relational database and it written runs in like a separate program what's here you get some one thing separate a separate app and

then you know you have some kind of network API to get to it and that you know I wrote a server called sky which does behavioral analytics we take event streams in you can analyze them and there's a database library which is really where you have it inside

of your program itself it's a real low-level and a database servers typically use database libraries as well so you have like level DB LM DB Berkeley DB and I have handles all this stuff like blocks and pages and like little nitty-gritty details so I wrote

another library called bolt which is in this more in this vein so despite those actually both being called databases they're totally different things to write an interesting in their own right and you might think that you know this doesn't really apply

to you guys because you're never gonna write a database but you know ultimately we all access data that's what programs do and just databases are this very pure form and like a very isolated kind of use case for it so things you can kind of like you

know really figure out about your programs and and how to optimize them so you know the hardest part about writing databases and go is that you get asked this question all the time like why did you write it and go which is a big it's a big pain people

always think you should write in C write in Java you know they're kind of the standard languages but you know when I actually started writing sky originally I wrote in see and I wrote it you know I wrote it once and I rewrote it and wrote it again and

just rewrite up to rewrite and everything I realized is there's a lot of my code doesn't actually need to be run like blazingly fast you know like things like like adding a user doesn't need to be like screaming fast but you know that had this

bucket of all these things that are actually you know just need to be pretty fast and then things that really need to be like really darn fast and you have like URI execution that's that's really your main uh I mean I think you're looking at when

you're trying to get data a degree database you have large volumes most applications are you know or Reed intensive so it's really where you want to optimize obviously this depends on your your workload as well so you know different databases have

different trade-offs but I would say most applications are very read heavy so you know you know mileage may vary and there's also you know the other thing that databases aren't just about speed like raw power you know we're getting cheap hardware

cheaper and all that stuff other things like easy deployment like we have docker I mean there's a whole ecosystem around just docker and how to deploy stuff easier you know things like user from the api's you know JSON over HTTP is a huge pain I'm

trying to do see just it's rough and just simple debugging you know you go to go and you get a nice stack trace you know what's going on in there great profiling tools you get some stuff and see but it's it's a little rough but you still have

this question of you know how do you make those fast parts really fast so you know the easiest option you can do is just write and see oh it's kind of the cheap way to go this is the way I want this guy originally so the plus side of this is you get all

[ ... ]

Nota: se han omitido las otras 2.048 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.