(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package net.petitviolet.ex.persistence.task | |
import akka.NotUsed | |
import akka.actor._ | |
import akka.pattern.ask | |
import akka.stream.actor.ActorSubscriberMessage.{ OnComplete, OnNext } | |
import akka.stream.actor.{ ActorPublisher, ActorSubscriber, OneByOneRequestStrategy, RequestStrategy } | |
import akka.stream.{ ActorMaterializer, ClosedShape } | |
import akka.util.Timeout | |
import org.reactivestreams.Publisher |
scala.concurrent.Future
let asynchronous programming easily.
We can process a code block asynchronously by providing it to Future.apply
.
The timing to start processing is just Future.apply
invoked. (also, needs a idling thread.)
Therefore, pay attention to the timing to call it.
We already have an NFS server so the next step is to install NFS client as a StorageClass. We'll use kubernetes nfs-client-provisioner.
Since the provisioner will need to interact with Kube API and we have RBAC enabled, the first step is to create a ServiceAccount.
curl https://raw.githubusercontent.com/kubernetes-incubator/external-storage/master/nfs-client/deploy/auth/serviceaccount.yaml