CompSciGuy
CompSciGuy
  • Видео 12
  • Просмотров 187 996
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/
Просмотров: 1 299

Видео

How GPS Changed Distributed Databases Forever
Просмотров 1,2 тыс.6 месяцев назад
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
Просмотров 24 тыс.9 месяцев назад
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 Untold Truth About Transactions
Просмотров 1,2 тыс.10 месяцев назад
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
Просмотров 10 тыс.10 месяцев назад
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...
How Data Validation Nearly Destroyed Protobuf
Просмотров 3,1 тыс.11 месяцев назад
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
Просмотров 52 тыс.Год назад
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, Use GraphQL
Просмотров 1,7 тыс.Год назад
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
Просмотров 36 тыс.Год назад
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
Просмотров 52 тыс.Год назад
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,4 тыс.Год назад
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,3 тыс.Год назад
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.

Комментарии

  • @sanjayrajsoni
    @sanjayrajsoni 10 дней назад

    Incomplete - He needs to slow down and give more details. What about float double etc.

  • @markovujanic
    @markovujanic 17 дней назад

    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.

  • @HemitPatel-s3f
    @HemitPatel-s3f 24 дня назад

    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.

  • @slavaslutsker7223
    @slavaslutsker7223 25 дней назад

    Although this maybe useful in some projects please also research the tradeoffs that Protobuf introducing

  • @henrikflamm4843
    @henrikflamm4843 27 дней назад

    Very interesting, thank you!

  • @user-zv3dh6iw2c
    @user-zv3dh6iw2c Месяц назад

    маладес

  • @Koroistro
    @Koroistro Месяц назад

    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?

  • @typograf62
    @typograf62 Месяц назад

    This would need very hot cows to (not) work.

  • @jamesharmer9293
    @jamesharmer9293 Месяц назад

    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 ?

  • @RynaxAlien
    @RynaxAlien Месяц назад

    Go vegan

  • @Kerojey
    @Kerojey Месяц назад

    Protobuff dosent's "change" anything about serialization, real programmers used Binary formats since 90s. It's sad that web devs are so ignorant

    • @1zui
      @1zui Месяц назад

      Seems like you are the ignorant one here...

    • @yayz_
      @yayz_ Месяц назад

      you sound like you use arch btw

    • @Kerojey
      @Kerojey Месяц назад

      @@yayz_ I use windows 11 pro btw.

  • @shreyaspatange8653
    @shreyaspatange8653 Месяц назад

    name one thing prisma cant do i will switch to raw dog

  • @cbxgang
    @cbxgang Месяц назад

    how do i know this guy is german, when he said 99.9 nein nein nein NEIN NEIN

  • @rikeshkarki7014
    @rikeshkarki7014 Месяц назад

    during CompSciGuy , 172 views , 16 hours - Raw

  • @falconmesa2809
    @falconmesa2809 Месяц назад

    thats a wild story man

  • @purpinkn
    @purpinkn Месяц назад

    "That's a lot of boilerplate" *rewrites in Java* Okay bro

  • @KangoV
    @KangoV 2 месяца назад

    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"

  • @Ryan-xq3kl
    @Ryan-xq3kl 2 месяца назад

    ill never take advice from people who use windows software willingly

  • @cat-.-
    @cat-.- 2 месяца назад

    if we just had a ProtobufMessage.safeParse(blob).as__AllRequiredFieldsPopulated(), without the parsing error, then everything would have been fine

  • @michael_ibeh
    @michael_ibeh 3 месяца назад

    too much code for this gRPC thingy, i'm stickig to REST all day.

  • @RasmusFrederiksen169
    @RasmusFrederiksen169 3 месяца назад

    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

  • @ajcgpol
    @ajcgpol 3 месяца назад

    making rest api requests from DATABASE ? hard pass...

    • @MrCompSciGuy
      @MrCompSciGuy 3 месяца назад

      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

  • @bnssoftware3292
    @bnssoftware3292 4 месяца назад

    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.

  • @maksymkoiev8824
    @maksymkoiev8824 4 месяца назад

    Such code throws error on my side TypeError: Cannot read properties of undefined > const message = proto.mypackage.

  • @premkumarsr4021
    @premkumarsr4021 5 месяцев назад

    Super

  • @gregf3021
    @gregf3021 5 месяцев назад

    Bunch of butt hurt ORM users in the comments.

  • @dasstraat
    @dasstraat 5 месяцев назад

    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.

  • @negart7744
    @negart7744 6 месяцев назад

    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?

  • @Siao222
    @Siao222 6 месяцев назад

    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.

  • @lozyodella4178
    @lozyodella4178 6 месяцев назад

    Keep doing this video they are very good, thanks

  • @huveja9799
    @huveja9799 6 месяцев назад

    Great video, thanks!

  • @clusterdriven
    @clusterdriven 6 месяцев назад

    A backend in python will never be fast anyways 😂. Just teasing. Thank you for this grpc lesson

  • @herozero777
    @herozero777 6 месяцев назад

    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 😊

  • @gosnooky
    @gosnooky 6 месяцев назад

    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.

  • @brazenbull36
    @brazenbull36 6 месяцев назад

    wtf are you talking about. most of the arguments are silly.

  • @jongxina3595
    @jongxina3595 6 месяцев назад

    Dont use grpc in your backend. Use graphql.

  • @mti2fw
    @mti2fw 7 месяцев назад

    Nice! Flatbuffers have the same problem?

  • @vahanmkrtchyan2504
    @vahanmkrtchyan2504 8 месяцев назад

    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.

  • @XCanG
    @XCanG 8 месяцев назад

    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

  • @drygordspellweaver8761
    @drygordspellweaver8761 8 месяцев назад

    subliminal messaging worked. I subbed

  • @gdwe1831
    @gdwe1831 8 месяцев назад

    Absolute bullshit. Everything you have stated here can easily be mitigated by a modern ORM and a developer whos IQ is above room temperature.

  • @mdrashidhussain1815
    @mdrashidhussain1815 9 месяцев назад

    nothing in CS is straight A. It all comes with its own compromises You any day need APIs like rest/gql however you try. You have to send data yo some client

  •  9 месяцев назад

    For most people who don't understand isolation levels, isolation levels are usually not what's slowing down their queries. It's usually because they don't know how to add the right indexes. As a sysadmin I've had two customers request that we lower the default isolation level from repeatable read to read comitted. Why? Because Stack Overflow told them that it would fix their deadlock errors 💀 (Repeatable is the default in MySQL, thankfully)

  • @Leonhart_93
    @Leonhart_93 9 месяцев назад

    What is the classical piece in the background? Sounds like something from baroque.

  • @redguard128
    @redguard128 9 месяцев назад

    We always knew about subqueries and functions/procedures in SQL, just that the time those take is way larger than just getting the data and processing it in our programming language of choice.

  • @Homiloko2
    @Homiloko2 9 месяцев назад

    I get that it's an example but for most use cases it'd be better to keep a table with the daily currencies and you call that function to insert new rows when the current day isn't found, instead of calling an external API whenever the query runs. But hey, I had no idea you could integrate Python into SQL which was really neat to see.

    • @pauldriessens715
      @pauldriessens715 9 месяцев назад

      Agree with the extra table. Btw did you use SQL in Python though?

  • @KhoaNguyen96
    @KhoaNguyen96 9 месяцев назад

    Lol I thought you were about to say SQL as "squeal"

  • @ba8e
    @ba8e 9 месяцев назад

    Just get the exchange rates every hour/min/sec and insert them in a table, which is joined in the main query. Making API calls from SQL is stupid.

  • @pzramos
    @pzramos 9 месяцев назад

    The fact that subqueries and CTEs are not common sense sounds frightening, to say the least.

  • @azursmile
    @azursmile 9 месяцев назад

    Think you can simplify the average trade query using "having" keyword. I personally try to avoid named subqueries in all but the most complex queries.

    • @warny1978
      @warny1978 9 месяцев назад

      when you use HAVING, it often postprocesses the results of the main query (not always). Using a CTE, you are sure it preprocesses the fastest query first or parallelise the 2 processes when using the same table.

    • @azursmile
      @azursmile 8 месяцев назад

      ​@@warny1978 often, it is preferable to leave it to the optimiser to determine the processing order. This avoids falling into writing in an imperative style and makes the query easier to follow. Appreciate, this is a balance, and CTEs can also avoid excessive subquery nesting when they are strictly necessary.