Tap to unmute

Http4s Scala Tutorial: Writing an HTTP Server with Purely Functional Scala

  Рет қаралды 22,962

Rock the JVM

Rock the JVM

Күн бұрын

Пікірлер: 55
@georgezorikov3075
@georgezorikov3075 3 жыл бұрын
Wow, I literally started writing my http4s hello world app a week ago. Very convenient! Thank you
@rockthejvm
@rockthejvm 3 жыл бұрын
Nice!
@OxMiroslav
@OxMiroslav 3 жыл бұрын
Finally http4s ! Thank you for that. I didn't find any good resource to learn it.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad it helps!
@abhishes
@abhishes 3 жыл бұрын
This is amazing!!! thank you for doing this!!!
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad it's useful!
@ivanvelikanova9950
@ivanvelikanova9950 3 жыл бұрын
thank you so much for this video. Scala-type system, implicits etc. are blowing my head ... i didn't get time to complete this video yet, hope to finish this soon .... but this is next level.
@PawanKumar-kj8oo
@PawanKumar-kj8oo 3 жыл бұрын
Great tutorial as usual. I was shying away from http4s (instead of using play framework) because of its complexity but now it makes total sense to use it.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad it clicked!
@DinoFancellu
@DinoFancellu 3 жыл бұрын
Definitely move towards http4s. Play is stuck in the past with Futures, zero sign of moving away from them. I say this as a long time Scala Play dev.
@Elodius2
@Elodius2 Жыл бұрын
You're the best, Daniel!
@estebanmarin002
@estebanmarin002 2 жыл бұрын
Thanks for this video. Really help me to digest the HTTP library
@mrajug
@mrajug Жыл бұрын
Excellent tutorial. thanks
@piotr2951
@piotr2951 2 жыл бұрын
Amazing crash curse. Looking forward to the cats introduction
@ohngec07
@ohngec07 3 жыл бұрын
Great video! Should have watched this before I spent hours banging my head against the http4s documentation lol
@alanlewis1625
@alanlewis1625 3 жыл бұрын
Daniel, another terrific video. Thank you. I think it could be slightly improved by having a (very simple) database implementation, rather than a Map. Yes, I realise the extra effort involved, and it would have made the video longer, but it would add a realistic scenario. Or, perhaps another video with a "simplistic" storage and retrieval from a table? Perhaps making use of JDBC or JOOQ? Thanks again for all your efforts.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad you liked it! I wanted to keep this specific to http4s - I'll add full-blown projects on my site soon.
@nayak232
@nayak232 3 жыл бұрын
Do you plan to have any tutorials on scala.js
@rockthejvm
@rockthejvm 3 жыл бұрын
Something in particular you're interested in?
@PawanKumar-kj8oo
@PawanKumar-kj8oo 3 жыл бұрын
@@rockthejvm Use common / shared case classes in http4s server and scalajs client (maybe using laminar lib)
@RenatoRaeffrayBarbosa
@RenatoRaeffrayBarbosa 2 жыл бұрын
Great video, Daniel! I'm looking information on how to get repeated query parameters in Scala http4s/dsl. Or even get all parameters and handle it. Do you know how we could achieve it? This is pretty silly thing in other languages, such python or java, but in scala looks like quite convolute. Thank you buddy!
@rockthejvm
@rockthejvm 2 жыл бұрын
OptionalMultiQueryParamDecoderMatcher. The difference from the video is "Multi".
@ThesamBETH
@ThesamBETH 3 жыл бұрын
Thanks very much for this tutorial.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad you liked it!
@shyam2305
@shyam2305 3 жыл бұрын
Great tutorial. Covers important areas about encoding/decoding of URL points. Error handling with 'year' was too short and quick, IMO. Could be elaborated a bit more. 3rd requirement to POST (create) director is missed. What is the idea behind having HttpRoutes as typed to F[_] : Monad instead of IO ? HttpRoutes is anyways tied to cats provided Monad. So, what is the advantage? Thanks a lot for all your efforts.
@rockthejvm
@rockthejvm 3 жыл бұрын
Will cover more in-depth in a course!
@bilalf
@bilalf 3 жыл бұрын
Thank you!!
@lovejohnson5426
@lovejohnson5426 3 жыл бұрын
This is amazing
@rockthejvm
@rockthejvm 3 жыл бұрын
Thanks!
@dmitrytrofimenko4419
@dmitrytrofimenko4419 3 жыл бұрын
Awesome. Like, subscribing. Keep doing, fellow
@sergeibatiuk3468
@sergeibatiuk3468 2 жыл бұрын
Are actors in the tutorial typed?
@apratimtiwari
@apratimtiwari Ай бұрын
Could you please help with POST? I am unable to decode a particular request using circe or native http4s jackson library.
@apratimtiwari
@apratimtiwari Ай бұрын
I found the answer in your blog post :) !!! Thank you so much.
@cavidxalilov2968
@cavidxalilov2968 3 жыл бұрын
thank you for perfect tutorial. but it does not compile. maybe I do smth wrong. Error: could not find implicit value for parameter encoder: io.circe.Encoder[cats.effect.IO[cats.effect.IO[Option[String]]]]
@reddot_22
@reddot_22 Жыл бұрын
is there solid JWT or OAuth for http4s? I always feel security is left on such a mist of bad documentation.
@rockthejvm
@rockthejvm Жыл бұрын
Try tsec: jmcardon.github.io/tsec/docs/http4s-auth.html
@reddot_22
@reddot_22 Жыл бұрын
@@rockthejvm Thank you King 🙏🙌
@АлександрКлёвый-г2б
@АлександрКлёвый-г2б 10 ай бұрын
Это просто о...но! Daniel, what do you think about Rust & Go? It will be pretty cool oneday to see some technical tutorials from you about both of this!
@M4rvin66
@M4rvin66 2 жыл бұрын
What would be an alternative to Cats IO? Is the use of tagless final and higher kinded types really helpful here?
@rockthejvm
@rockthejvm 2 жыл бұрын
There's Option, Either, monad transformers, ZIO
@afiefsholichuddin
@afiefsholichuddin 3 жыл бұрын
Is there a way to simplify those route handler? maybe an episode 2 for this? :D
@rockthejvm
@rockthejvm 3 жыл бұрын
What else would you like to see?
@afiefsholichuddin
@afiefsholichuddin 3 жыл бұрын
@@rockthejvm maybe a "simplified" route handler with for comprehention? Not sure if that possible, I am still learning scala fp 😅
@krasavchikable
@krasavchikable 3 жыл бұрын
Good, but too simple video. I would like to know http4s deep, best practices and so on. I hoped you write mini app as microservice in full fp way with movie/director repository, some other services, then you combine all this services and http4s. I wait next episode.
@rockthejvm
@rockthejvm 3 жыл бұрын
In-depth stuff is coming too on my site: rockthejvm.com
@BloodnutXcom
@BloodnutXcom 3 жыл бұрын
While I appreciate the type class abstraction to support an effect monad, I have to say that it makes for horrendous boilerplate code. And not only just carrying that F[_]: MONAD everywhere, but also the dsl imports, asJson calls without the option to declare a default serializer and even the final ".resource.use(never)" is just meh and should have been simplified under some "run" method. The first time I needed to use http4s I was relatively new to cats ecosystem and had to use ZIO monad with it. That was a lesson in frustration.
@rockthejvm
@rockthejvm 3 жыл бұрын
I empathize. This is why I shot this video, to ease the frustration for beginners.
@BloodnutXcom
@BloodnutXcom 3 жыл бұрын
@@rockthejvm hopefully ZIO-WEB comes around soon to be a adequate replacement
@peterstorm_io
@peterstorm_io 3 жыл бұрын
Awesome tutorial, though I'm sad you call the functions "magic", as they are well... just functions. When you do Play, or Spring, or almost any other server framework, those _are_ using magic, with their annotations... http4s is not :D
@rockthejvm
@rockthejvm 3 жыл бұрын
Sufficiently advanced magic becomes indistinguishable from technology.
@theMarhaenist
@theMarhaenist 3 жыл бұрын
http4s = "http for (4) scala"
@rockthejvm
@rockthejvm 3 жыл бұрын
Yep!
Doobie Tutorial: Scala, Databases and pure Functional Programming
41:22
FS2: Typed Functional Streams in Scala
18:40
Rock the JVM
Рет қаралды 9 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
ZIO HTTP Tutorial, Part 1: Endpoints and Middleware
24:49
Rock the JVM
Рет қаралды 4,2 М.
http4s: pure, typeful, functional HTTP in Scala - Ross Baker
37:15
What the Functor? | Functors in Scala | Rock the JVM
24:43
Rock the JVM
Рет қаралды 12 М.
Scala: Beyond the basics with Christopher Batey
48:05
Devoxx
Рет қаралды 49 М.
Idiomatic Error Handling in Scala | Rock the JVM
26:45
Rock the JVM
Рет қаралды 9 М.
Top 10 Skills to Learn to Be a Scala Developer
28:13
Rock the JVM
Рет қаралды 16 М.
Microservices and gRPC in Scala with FS2 and Scalapb
27:45
Rock the JVM
Рет қаралды 3,7 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 334 М.
Ten Steps to Mastering the Fetch API
2:19:52
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 50 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН