Scala中的Future和ExecutionContext
Scala 这个语言可以用得很复杂、也可以用得很简洁。它在 Java 并发和 OO 之上做了进一步的抽象,将代码量大大降低。
最近流行的很多项目都使用 Scala,比如 Akka,Spark,Kafka,Spray,Play Framework,足见它是一门生产力很高的语言。
这里主要总结了下一些并发模式和并发线程池需要注意的地方。
Scala 这个语言可以用得很复杂、也可以用得很简洁。它在 Java 并发和 OO 之上做了进一步的抽象,将代码量大大降低。
最近流行的很多项目都使用 Scala,比如 Akka,Spark,Kafka,Spray,Play Framework,足见它是一门生产力很高的语言。
这里主要总结了下一些并发模式和并发线程池需要注意的地方。
Spray is a well-known HTTP library in the Scala ecosystem. It was released in 2011, and since then it’s been widely used by the Scala community. It was recently announced that Spray would be replaced with Akka HTTP, thus cementing Akka HTTP as the successor of Spray. It’s maintained by Lightbend and it’s been recommended that users migrate to it soon.
However, migration from one major version of a library to another is not an easy task. Very often it requires you to spend some time reading the source code in order to figure out how to use certain features, as well as how to migrate existing logic.
This post will demonstrate what changes should be applied in order to migrate your app from Spray to Akka HTTP. The following steps don’t have a particular order, as it depends on which areas need to be rewritten.
Use-Cases of this Tutorial
In any software development project a Continuous Integration/ Continuous Deployment DevOps environment is essential. A recent project I elected to make use of TeamCity & Octopus Deploy all on an Azure stack.
In this post I twill detail the steps on how to install and configure Team City 2017.x on a Ubuntu 16.X server.
1 | sudo apt-get update |