akka-typed - cluster: group router, cluster-load-balancing

Let's start with the router actor for akka-typed.route is divided into pool router and group router.Let's first look at a demonstration of using pool-router: val pool = Routers.pool(poolSize = 4)( // make sure the workers are restarted if they fail Behaviors.supervise(WorkerRoutee()).onFailure[Exception](SupervisorStrateg ...

Posted by scnjl on Thu, 11 Jun 2020 03:02:18 +0200

akka-typed - typed-actor, typed messages

It has been a while since akka 2.6.x was officially released.The core change is the formal enabling of typed-actor s, but there are also big changes in modules such as persistence,cluster, and so on.Name estimation starts with changing traditional anytype messages to strongly typed ones, so you'll want to take a moment to see how this can have ...

Posted by aod on Tue, 26 May 2020 18:22:55 +0200

Summary and solution of various errors reported by Flink

Table is not an append-only table. Use the toRetractStream() in order to handle add and retract messages. This is because the dynamic table is not in the append only mode. It needs to be processed with to retrieve stream tableEnv.toRetractStreamPerson.print() Today, when you start the Flink task, an error was reported as "Caused by: jav ...

Posted by CaseyC1 on Thu, 07 May 2020 10:54:41 +0200

Chapter 3 array related operations of quick learning scala

Recently, I am learning this book, without java foundation. According to the blogger (I am a painter), I wrote the after-school questions. In Chapter 3, the blogger used several kinds of questions, but Xiaobai was not clear about his lack of knowledge. In my own way, I wrote several questions. 3.1 write a piece of code to set a as a n array of ...

Posted by tripleaaa on Mon, 04 May 2020 14:26:33 +0200

Akka writes RPC communication framework to simulate a small case of Worker connecting to Master

Guiding ideology: 1. Using RPC communication framework (AKKA)2. Define 2 classes Master and Worker -------------------------------------------------------------------------------------------------------------------------------Start Master first, then all workers1. After the Worker is started, establish a connection with the Master in the PreSta ...

Posted by kettle_drum on Thu, 30 Apr 2020 17:12:55 +0200

Spark SQL -- spark SQL performance optimization

Article directory 1. Cache table data in memory 2. Parameter optimization 1. Cache table data in memory Performance tuning is mainly about putting data into memory. Caching data in memory can improve performance by directly reading the value of memory. In RDD, use rdd.cache or rdd.persist to cac ...

Posted by abgoosht on Fri, 13 Mar 2020 08:27:46 +0100

Scala -- 3. Functions

In Scala, methods and functions can be almost the same (for example, their definition, use and operation mechanism are the same), but the use of functions is more flexible and diverse. Functional programming is discussed from the perspective of programming mode (normal form). It can be understood as fol ...

Posted by GiaTuan on Tue, 18 Feb 2020 14:07:21 +0100

Distributed ID - snowflake algorithm

background With the increasing business volume, the division of database is becoming more and more detailed, and the concept of sub database and sub table is also gradually implemented. The generation of primary key ID such as auto increase primary key or sequence no longer meets the demand, so the ...

Posted by rallokkcaz on Sat, 18 Jan 2020 10:12:11 +0100

Akka implementation of OAuth 2 service: access_token management

There are several core points to implement an OAuth 2 service: OAuth 2 protocol analysis There may be many connected users, and the system needs to support horizontal expansion State control of access_token of each connected user: validity control Services should support fault tolerance, recoverability, scalability, high concurrency and other ...

Posted by charlieholder on Fri, 10 Jan 2020 09:03:54 +0100

Scala notes (5): MySQL database configuration and scala programming

MySQL database installation configuration In order to see / operate the database easily and intuitively, Navicat Premium software is generally installed to support multiple databases. There is not much nonsense in the installation process, mainly referring to the following connections, no pit in hand test, which are the main ...

Posted by aleph_x on Sat, 04 Jan 2020 02:29:12 +0100