Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Oswald:700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" media="screen" href="mdview.css">
<title>My Trading Application</title>
</head>
<body>
import akka.actor.{ActorSystem, Props, Actor}
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy._
import scala.concurrent.duration._
class Supervisor extends Actor {
override val supervisorStrategy =
OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case _: ArithmeticException => Resume
@richardimaoka
richardimaoka / MyActorIncarnation.scala
Last active June 18, 2017 14:06
Akka Actor's restart and stop followed by actor re-creation
//Place it under src/main/scala/my/actor
package my.actor
import akka.actor.SupervisorStrategy.{Restart, Stop}
import akka.actor.{Actor, ActorInitializationException, ActorKilledException, ActorRef, ActorSystem, DeathPactException, OneForOneStrategy, PoisonPill, Props, SupervisorStrategy}
import akka.pattern.ask
import akka.util.Timeout
@richardimaoka
richardimaoka / MyThrottle.scala
Last active June 24, 2017 14:15
Demonstrate Akka Stream's throttle
package my.stream
import java.text.NumberFormat
import java.util.Locale
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Keep, Sink}
import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler}
import akka.stream.testkit.TestSubscriber
import akka.stream.testkit.scaladsl.TestSource
package my.akka
import akka.actor.{Actor, ActorRef, ActorSystem, PoisonPill, Props}
import akka.pattern.{Backoff, BackoffSupervisor, ask}
import scala.concurrent.Await
import scala.concurrent.duration._
class Child extends Actor {
package my.akka.typed
import java.io.{PrintWriter, StringWriter}
import akka.serialization.{SerializationExtension, SerializerWithStringManifest}
import akka.typed.scaladsl._
import akka.typed.scaladsl.adapter._
import com.typesafe.config.{Config, ConfigFactory}
object MySerializer {
package example
import akka.persistence.typed.scaladsl.PersistentActor
import akka.persistence.typed.scaladsl.PersistentActor.{ Effect, CommandHandler }
import akka.actor.typed.{ Behavior, Terminated }
import akka.actor.typed.scaladsl.Actor
import akka.actor.ActorSystem
import com.typesafe.config.ConfigFactory
object AkkaTypedPersistenceNoAdapter {
package example
import akka.actor.ActorSystem
import akka.stream.Attributes.LogLevels
import akka.stream.scaladsl.{Sink, Source}
import akka.stream.{ActorMaterializer, Attributes}
object Main {
def main(args: Array[String]): Unit = {
implicit val system = ActorSystem("exampleSystem")
AWSTemplateFormatVersion: "2010-09-09"
Resources:
# Define VPC and Subnet
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
Tags:
- Key: Name
Value: techempower-vpc

Overview

I’m looking for Scala developer roles, where I can remotely work from Japan. If your system is mainly based on Akka, written in Scala, I could be a candidate for your team. I am familiar with Akka/Scala especially about the core behavior of Akka Actor and Akka Streams. I could help in implementating Akka-based systems efficiently, avoiding common pitfalls to cause maintenance burden.

Unfortunately it's difficult for me to move outside Japan, but in terms of timezone/work hours I am fully flexible. I can work in hours your local team members are working.