Is JSON Blazingly Fast or...?

preview_player
Показать описание
Is Json really that slow? Can the most popular interchange format really be that bad?

### Twitch
Everything is built live on twitch
### Editor

Join this channel to get access to perks:

### Links

#vim #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

JSON is like the python of language, slow but convenient to use

ginowadakekalam
Автор

Great video. Thanks for introducing me to Deku.

I think there is a lot of information left out here. I'm gonna outline my opinions below even if they don't matter:

1. JSON is not for computers it's for humans. Trouble shooting binary requests isn't easy.
2. GZIP compression can greatly reduce the bytes over the wire. JSON with lots of repeating keys can greatly benefit from gzip.
3. A lot of the time the database is your actual bottleneck and serialization doesn't matter for performance. In fact, 1, 600 requests per second is more than most companies/services will ever see.
4. Having the document define the schema allows for flexible data. You can't just send arbitrary data with a binary protocol. This has pros/cons.

For a public facing web service that only receives a couple thousand requests per second I would pick JSON over any other structured binary protocol almost every time. Yes there is a cost to simplicity but there is also a cost to complexity. Make it easy for internal (engineers) and external (users) to troubleshoot. Just use JSON unless you have identified that serialization is the bottleneck in your endpoint.... For most endpoints/services, I would wager serialization is not the bottleneck.

MrMw
Автор

These videos are getting better and better both in quality and entertainment factor :)

CemKavuklu
Автор

Hey, did you like the video? I really enjoy making this kind of content. That's fun. Do you think I should do something with promises? (MAKE A COMMENT, Do not respond, YouTube has the worst notifications)

ThePrimeagen
Автор

BLAZINGLY SLOW. Thanks for another great technical video! I hadn't actually thought about it until now, but this explains perfectly why we use protobuf so much in embedded work

scottiedoesno
Автор

It would be nice to see a video comparing sending JSON/XML/Apache Avro/Protobuf over the wire with Rust/Go/JS. Great video, as always;

VanDelao
Автор

I can't stop loving this content. JSON is something I use daily but never really think about. A deeper than usual deep dive, yet still accessible. Thank you my good man

alexgochenour
Автор

Binary formats are difficult to maintain and scale at certain points, as ThePrimeagen notes, it's also not easy to version; you'll have to change your parser to read data correctly, or know where to take up unused space to give room for future improvements without breaking the protocol.

But it's really good for real-time systems that need to deliver a lot of data in a small amount of time. For example game servers where feedback should be fast and responsive both on the client and across other clients with different network conditions at 60fps, while also dealing with other systems like rendering.

dealloc
Автор

These types of videos are super valuable and I really appreciate the way you go into the technicalities and explain these topics. Loving the format!

camillenovak
Автор

Absolutely loving these performance deep dives! Keep ‘em comin!

Dayun
Автор

Love this form of content Prime! 👍 You make harder concepts (for me anyway) as digestible as possible! So invaluable.

drborisyum
Автор

It kinda landed right at the best moment, as I'm trying to improve the performance of our microservices where are transferring millions of JSON messages and can see the real cost of JSON serialize/deserialization growing super fast. I was studying GRPC and just learned about this protobuf here, thanks again for sharing this kind of content!!!

filipebraganca
Автор

Amazing video as always, please keep them up!

GeekMasher
Автор

I interned at an insurance company where the way they received new insurance data was through a single string that was about 5000 characters long and parsed it by slicing that string at intervals and it almost always caused issues with encoding because it used ascii encoding and all the responses were in utf-8 so it had a billion safeguards that would always break when someone entered a non ascii character.

I'd say it doesnt get more blazingly fast than this but its written in the most cursed and blazingly slow C# code ive ever seen in my limited experience. Best part is they moved to c# from java like 7 years ago but just kept this system instead of rewriting it to use xml or "jizzle"

Omikronik
Автор

Recently I was comparing Deno and Rust. What surprised me was how much simple JSON response weigh...

js-nyru
Автор

Your production quality has gone up and the humor is on point. Today I decided to subscribe! I can officially say that I like this channel now :) great content my dude!

kortes
Автор

Loving this series! This is great content covering topics that aren't too easy to find, most of YT is for junior devs.

moodynoob
Автор

Your jokes in this type of developer/programming videos is funny and unique and I would love to see more of em keep up the good work.

sunnyheheheh
Автор

Very informative and comedic video, thanks :) Keep up the good work TheScienceagen

thehibbi
Автор

been watching a lot of your videos, I feel like your newer 'hot take' videos on blogs are fine and all, but you're a good teacher and I'd like to see more of these more informative/objective vids from you because you're a pretty good teacher when you do this sort of content!

paulgupta