- 12
- 200 757
CompSciGuy
Switzerland
เข้าร่วมเมื่อ 8 ธ.ค. 2022
I'm a software engineer with a Master's degree in Computer Science with a passion for distributed systems. But here we do all things related to computer science.
How Radioactive Cows Destroyed Soviet Computer Systems
In 1986 a train station in the middle of Russia had a problem: their computer cargo routing systems were crashing. This stopped the entire train network. But this same problem had occurred before, from radioactive sand in the material chips were made from, to cosmic background radiation. This nearly made Google go bankrupt. All because of radioactivity causing bit flips on memory cells that became (too) small.
My website: compsciguy.me/
My website: compsciguy.me/
มุมมอง: 1 344
วีดีโอ
Why Today's Databases Are Impossible Without GPS
มุมมอง 1.3K8 หลายเดือนก่อน
Linearizable distributed databases were impossible. Instead the entire industry moved to NoSQL (Bigtable, MongoDB). But in 2012, Google showed how to build a distributed database with "Spanner". The item that solved everything was GPS. Instead of using it for positioning, they used it for time. #database #computerscience #softwareengineer
I’ve been using SQL wrong this whole time
มุมมอง 24K11 หลายเดือนก่อน
I've just never not used it to its full potential. Most people have used SQL at some point - but also just stick to the basics. When we need to do something complex, we instead do it in another programming language and send multiple queries. Even though it's very simple to solve in SQL. In this video I show 3 basic building blocks that will really supercharge your SQL usage - and make you an ex...
The Sneaky Way SQL Lies to You and Destroys Your Data
มุมมอง 1.2Kปีที่แล้ว
SQL transactions might seem easy. But most databases have a hidden complexity causing your data to be silently corrupted. If you don't know about it - eventually it will take down your systems and leave you unable to resolve the issues. The problem is that most are not aware of SQL transaction isolation level.
The Only Database Abstraction You Need
มุมมอง 11Kปีที่แล้ว
You are interacting with databases wrong. You shouldn't use ORMs even though they are the default for many instead of SQL. ORMs are bad and constrict you unnecessarily. You should prefer to use SQL and after this video you will. By using SQL you will supercharge the usability of your database. Although there are nice areas to use ORMs - like database migrations. Also, sorry about my voice, I wa...
This is Google's Worst Mistake with Protobuf (it cost them millions!)
มุมมอง 3.7Kปีที่แล้ว
Required fields in protobuf have caused countless outages - sadly we don't have any public postmortems from the outages. Optional fields are what you should use, otherwise you will definitely need to deal with incidents.
The Only External System You Need
มุมมอง 52Kปีที่แล้ว
You are using Postgres wrong. It can be used to vastly simplify your web app architecture. Postgres can replace: Kafka, Redis, MongoDB and any other infrastructure you use. At least it will work for your use case, because you probably don't have millions of users.
Don't Use REST APIs in your Frontend, Use GraphQL
มุมมอง 1.8Kปีที่แล้ว
GraphQL is a query language built to: be flexible and batch efficiently. Facebook built (and open sourced) it to get around shortcomings in REST. If you build any complex web apps with large APIs it should be on your list of things to use. #restapi #softwareengineer
Don't Use REST APIs in your Backend, Use gRPC
มุมมอง 41Kปีที่แล้ว
gRPC let's you specify the request/response/functions and generates the code to do RPC to the API server. It's cheaper and smaller requests. Handles security out of the box. Let's you avoid crazy API migrations.
Protobuf - How Google Changed Data Serialization FOREVER
มุมมอง 58Kปีที่แล้ว
Protobuf is second to JSON as the most common data serialization format. By volume of data stored, it's probably first - as it's created to solve JSON's problems when working "at scale". It allowed Google to scale their code base to levels it would have otherwise. Without it the big tech co, surely would not be where it is today.
Spanner - How Google Changed Databases FOREVER
มุมมอง 2.7Kปีที่แล้ว
Google's Spanner database is one of the first true distributed SQL databases. Scaling basically infinitely, it's a marvel of engineering that few companies can even consider emulating. One being CockroachDB. In this video you will find out how it works.
I Built a Stock Trading AI that Made Me...
มุมมอง 3.3Kปีที่แล้ว
We create an AI algorithm based on encoder/decoders (LSTMs) to trade on the stock market. The AI invested into the stock market in a week and you'll find how good it was in the video. Oh, and we also tried out some "normal" quant strategies.
oh yes, the perils of breaking binary compatibility
The only ORM that didn't suffer from the N+1 and select all problem I ever saw was "Linq to SQL", not the EntityFramework, the original one that only worked with SQL-Server, that was the thing, its translation of the LINQ from C# to SQL was almost perfect.
oh yes, "WONTFIX" is a solution, and get out of the soviet union.
Too biased.
My God! We never seem to stop misunderstanding and misusing technology! GRPC does not fix your performance problems, poor abstractions and bad knowledge of the basics. In fact it's just another can of worms.
imagine working on same team with this guy and you still using rest. man good luck to you defending your choice!
thanks got I read the comments before watching the vid.
Robinson Kenneth Perez Scott Harris Lisa
Thomas Charles Jackson Larry Davis Jessica
he talks about performance and uses python as the server.. oh yea.. i love it already
Incomplete - He needs to slow down and give more details. What about float double etc.
3:05 is ridicules now that I learn SQL, it's nuts in fact. Thing is I never really cared about it before when I knew only how to use ORM.
this is perfect! im creating an ai mircoservice for my app and this technology would be perfect as the ai mircoservice is called upon by my main api to get the closest coordinates based on a list.
Although this maybe useful in some projects please also research the tradeoffs that Protobuf introducing
Very interesting, thank you!
маладес
That assumes that management would allow it, but management believes that REST is the way to go. You don't buy Gucci bags because you need and handbag do you?
This would need very hot cows to (not) work.
So they were sending the radioactive cows eastwards so that they could mix them with the non radioactive ones so that the meat, on average, was not contaminated ? How's the steak Sergei ?
Go vegan
no, go capitalist
Protobuff dosent's "change" anything about serialization, real programmers used Binary formats since 90s. It's sad that web devs are so ignorant
Seems like you are the ignorant one here...
you sound like you use arch btw
@@yayz_ I use windows 11 pro btw.
name one thing prisma cant do i will switch to raw dog
how do i know this guy is german, when he said 99.9 nein nein nein NEIN NEIN
during CompSciGuy , 172 views , 16 hours - Raw
thats a wild story man
Probuf best practices: "Don't Add a Required Field", "Don’t Change the Type of a Field", "Rarely Use an Integer Field for an ID"
ill never take advice from people who use windows software willingly
if we just had a ProtobufMessage.safeParse(blob).as__AllRequiredFieldsPopulated(), without the parsing error, then everything would have been fine
too much code for this gRPC thingy, i'm stickig to REST all day.
Honestly having been forced to use ORMs at work, and also having to migrate between databases (for bad reasons, don't ask); when moving between databases, you WILL find inconsistencies in ORMs where they handle a migration set just fine in one db, but utterly fail on another engine
making rest api requests from DATABASE ? hard pass...
Heh, yeah I wouldn't recommend it, just couldn't come up with a use-case that fit neatly with the rest of the topic I was talking about
It seems that by the comments people are generally opposed to this. I personally like the idea of a "jack of all trades" database like postgresql because it keeps everything in one place. No need to orchestrate a bunch of different services. Ome good example is saving a record from the front end and not having to then call a separate message queue. The database takes care of it for you. It also ensures that no matter what or who saves something to the database the message always gets cued on the database side.
Such code throws error on my side TypeError: Cannot read properties of undefined > const message = proto.mypackage.
Super
Bunch of butt hurt ORM users in the comments.
There are more fundamental problems: int8, int16 are not there anymore so it will surely waste network resources. Also in C++ editors, finding the names for get is not easy. You better look in the .proto files, since the .h file from protobuf is a horrible file to find your way. For simple things, just create a socket to communicate in 5 minutes for complicated things with many messages then protobuf or mosquitto is the better option. for communicating to many devices, protobuf is wrong and you need mqtt wit mosquitto.
Thanks. I'm struggling to understand how to use the google protobuf. This was very helpful. There is a way to have an auto-generated code from the proto right?
Love the conclusion. I have spent so much time convincing people they don't need a distributed SQL and just a highly available setup or NoSQL (speed related). There are so many ways to resolve most client requirements other than distributed SQL.
Keep doing this video they are very good, thanks
Great video, thanks!
A backend in python will never be fast anyways 😂. Just teasing. Thank you for this grpc lesson
Thanks for this video. You raised very good points which has benefitted me immensely. Your video also led to a follow-up video by thePrimeGeon netflix guy. So thanks 😊
I do something similar with currency conversion. My application periodically queries conversion rates on all the currencies we support and caches the data, then we just calculate the exchange and inject the values into the SQL query. No need for adding functions to PG/My or anything fancy. A caveat for this method is wildly fluctuating currencies like Zimbabwe or Venezuela that may become outdated very quickly, but our use case only requires major currencies like USD, CAD, AUD, GBP, EUR, CNY, JPY, THB, and other European ones, so mileage may vary. Sometimes the simple option is the best, like now NASA spent millions developing a pen that can write in zero-G, whilst the Soviets used pencils.
wtf are you talking about. most of the arguments are silly.
Dont use grpc in your backend. Use graphql.
Nice! Flatbuffers have the same problem?
You need to know sql anyways .Orm is great tool , if u have complex queries you will debug thus anyways and put some optimisation , ORM does not matter here. SQL != ORM . SQL BUILDER != Object Relational Mapping . Author lacks understanding this. You can write sql and use ORM to populate items.
If that would be me, in case of currency on the backend I would rather pull conversion rates first (with possibility of caching it if this endpoint call frequently), then during request I would use CTE like: WITH "conversion_rates" ("currency_from", "currency_to", "rate") AS ( VALUES ('USD', 'EUR', 123), (...) ) and then use it in expression in other CTE/subquery
subliminal messaging worked. I subbed
Absolute bullshit. Everything you have stated here can easily be mitigated by a modern ORM and a developer whos IQ is above room temperature.