Scala with ZIO: Introduction to Fibers

  Рет қаралды 11,593

Rock the JVM

Rock the JVM

Күн бұрын

Пікірлер
@sherwin96
@sherwin96 3 жыл бұрын
Sounds like a new zio course is on the way 😃
@rockthejvm
@rockthejvm 3 жыл бұрын
relatively soon! 😅
@theyreMineralsMarie
@theyreMineralsMarie 3 жыл бұрын
This is such a nice abstraction for concurrency. I use Project Reactor as part of Spring WebFlux at work and wish it had some of the lower level control that ZIO appears to give you. I like that it blends the concepts of threads found in C with the expressiveness of functional programming.
@mankoxyz
@mankoxyz 3 жыл бұрын
Great stuff, you should do more videos on ZIO.
@rockthejvm
@rockthejvm 3 жыл бұрын
Will do!
@DiegoFerreiradaSilva
@DiegoFerreiradaSilva 3 жыл бұрын
thank you and more videos about zio please!
@rafaeldelgado7860
@rafaeldelgado7860 3 жыл бұрын
Great video! Thank you! It would be great if you could make more with ZIO. ZIO rocks!
@rockthejvm
@rockthejvm 3 жыл бұрын
More to come!
@rk-fx9wc
@rk-fx9wc 2 жыл бұрын
Absoultely awesome video, thank you so much! Do you consider to record a video about the Error handling in ZIO? It'd be so great!
@rockthejvm
@rockthejvm 2 жыл бұрын
Good idea - might do a video there
@GVLPedro
@GVLPedro 3 жыл бұрын
Hi Daniel, we want more about ZIO !! I think ZIO 2 is available and it is faster than version 1, maybe it is a good point to continue... thanks a lot!!
@rockthejvm
@rockthejvm 3 жыл бұрын
Will do! ZIO 2.0 is close to RC, will have more content out as soon as it becomes stable.
@HoD999x
@HoD999x Жыл бұрын
but interrupt doesn't stop an already running process, it just prevents the jump to the next step, right?
@rockthejvm
@rockthejvm Жыл бұрын
Yes - there is a way of stopping the thread itself via thread interrupts, but that mechanism is nasty.
@Sando816
@Sando816 2 жыл бұрын
Thank you very much to share!
@thajafsal
@thajafsal 3 жыл бұрын
Zio is just so useful and easy.
@shishe1984
@shishe1984 3 жыл бұрын
I love how you explained all of this. I still have one question though: is there a criteria on how the fibers get dispatched to the execution context? With other frameworks such as Play, you could have different execution contexts, and then you could explicitly move the spawned threads/futures to the corresponding context as to avoid blocking certain parts of the application with them. Do fibers follow a similiar philosophy?
@rockthejvm
@rockthejvm 3 жыл бұрын
It's certainly possible.
@alexandrutudor6195
@alexandrutudor6195 3 жыл бұрын
By this video, I can understant that scala Futures will be deprecated in exchange for ZIO? I'm a bit confused and hope I'm not wrong, but you can use Futures very easily for concurrent programming :d Why I would use ZIO, a new library instead of the benefits of the language? Or, this is really a FP concept (how somebody said below). thx
@rockthejvm
@rockthejvm 3 жыл бұрын
Scala Futures aren't going anywhere. ZIO was invented to 1) avoid callback-based concurrent applications ("callback hell"), 2) simplify Scala code, 3) avoid unnecessary abstractions (e.g. overdoing tagless final)
@lac4793
@lac4793 3 жыл бұрын
Thanks, Daniel, this video is absolutely incredible. I'm wondering if, There are other reasons besides the reasonable low cost of canceling a running fiber (thread) to use fiber instead of normal thread?
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad to hear you liked it! The fact that fibers are cheap and small is the main reason why we should use them.
@miguelguzman8217
@miguelguzman8217 3 жыл бұрын
Hey love your videos! They've helped me several times however I find them a little to abstract sometimes. For example it is not clear to me how can I consume the result of the fibers, I might want to send information to two databases (one on postgres and another on oracle) at the same time, but how can I know when both fibers have completed and how can I report to console or logs if the operations succeeded? Or maybe fibers can only do side-effects and are not effective to return any information and perform an action on the information? Keep up the good work!
@rockthejvm
@rockthejvm 3 жыл бұрын
There are many combinators that work with the results of fibers - probably a topic for a future video
@miguelguzman8217
@miguelguzman8217 3 жыл бұрын
Cool! Thanks for taking the time to make great content like this! Looking forward for your next videos.
@imranfp
@imranfp 3 жыл бұрын
You really rocks :) but being a viewer I would expect, if you could also explain the concept with visual examples, as you have mentioned in your few videos about Actors. Overall, waiting for your "Functional Programming Concept", "ZIO", "Cats Effect 3" and "Functional Micro services" courses.
@rockthejvm
@rockthejvm 3 жыл бұрын
visual explanations & diagrams take a lot of work - you can expect them in the courses :D
@iFunktion
@iFunktion 2 жыл бұрын
I'm guessing this is an old tutorial, intellij is asking to implement environmentalTag and bootstrap? And won't run properly without them, what does this mean?
@iFunktion
@iFunktion 2 жыл бұрын
Solved it, with "object ZioFibers extends zio.ZIOAppDefault" That covers the overrides it seems :)
@BloodnutXcom
@BloodnutXcom 3 жыл бұрын
The U in UIO means Uninterruptible because it can't fail (E is Nothing)
@rockthejvm
@rockthejvm 3 жыл бұрын
I forgot where names came from - thanks!
@angelooparah4223
@angelooparah4223 3 жыл бұрын
It actually stands for Unexceptional (for that reason: it cannot fail)
@BloodnutXcom
@BloodnutXcom 3 жыл бұрын
@@angelooparah4223 is it? Huh, my bad
@kyotin1
@kyotin1 3 жыл бұрын
Awesome video!
@mayonesacosmica
@mayonesacosmica 3 жыл бұрын
somebody has some quantum influence
@mayonesacosmica
@mayonesacosmica 3 жыл бұрын
at least Bob and Alice think so
ZIO Kafka with Scala: A Tutorial
42:29
Rock the JVM
Рет қаралды 8 М.
What the Functor? | Functors in Scala | Rock the JVM
24:43
Rock the JVM
Рет қаралды 12 М.
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
A Tour of ZIO
1:02:33
Ziverge
Рет қаралды 19 М.
Intro to Cats-Effect (Gavin Bisesi)
54:54
thoughtbot
Рет қаралды 16 М.
Cats Effect 3: Introduction to Fibers
22:23
Rock the JVM
Рет қаралды 13 М.
ZIO App Architecture by Kit Langton
51:50
Ziverge
Рет қаралды 7 М.
Structuring Services in Scala with ZIO and ZLayer
34:29
Rock the JVM
Рет қаралды 20 М.
Tagless Final in Scala
36:13
Rock the JVM
Рет қаралды 11 М.
Scala: Beyond the basics with Christopher Batey
48:05
Devoxx
Рет қаралды 49 М.
Cats with Scala: Essential Type Class Hierarchy, Explained
35:00
Rock the JVM
Рет қаралды 19 М.
Given and Using Clauses in Scala 3 | Rock the JVM
20:24
Rock the JVM
Рет қаралды 6 М.
Java Structured Concurrency - a Comprehensive Guide
45:49
Rock the JVM
Рет қаралды 3,2 М.
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН