Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
| package nicocavallo.contentful | |
| import java.time.ZonedDateTime | |
| import com.contentful.java.cda._ | |
| import com.typesafe.config.Config | |
| import org.reactivestreams.{Subscriber, Subscription} | |
| import scala.concurrent.{Future, Promise} | |
| import scala.language.postfixOps |
| package controllers | |
| import javax.inject._ | |
| import play.api._ | |
| import play.api.http.DefaultHttpFilters | |
| import play.api.mvc._ | |
| import play.api.Environment | |
| import scala.concurrent.{ExecutionContext, Future} | |
| import akka.stream.Materializer |
| require "active_support/all" | |
| require "aws-sdk" | |
| require "concurrent" | |
| papertrail_token = "..." | |
| s3 = Aws::S3::Client.new(region: "us-east-1") | |
| s3_bucket = "..." | |
| s3_prefix = "papertrail/logs/[account-id]" |
| package wrappers | |
| import play.api._ | |
| import play.api.mvc._ | |
| import scala.concurrent._ | |
| import scala.concurrent.Future | |
| import play.mvc.Http.Status | |
| import ExecutionContext.Implicits.global | |
| import play.libs.Akka | |
| import akka.actor.{Actor, Props} |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
This installs a patched ruby 1.9.3-p385 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
Today, I released the new version of MessagePack for Ruby!
I rewrote all the code and achieved significant performance improvement, especially for serialization. I compared the new version to the old version (v4) using ruby-serializers benchmark, and the new version is faster for all data sets including Twitter, Image, Integers, Geo and 3D model.
| // GeoChart from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart | |
| // Try out by pasting code into: https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart | |
| function drawVisualization() { | |
| var data = google.visualization.arrayToDataTable([ | |
| ['State', 'Foo Factor'], | |
| ['US-IL', 200], | |
| ['US-IN', 300], | |
| ['US-IA', 20], |
| package object mail { | |
| implicit def stringToSeq(single: String): Seq[String] = Seq(single) | |
| implicit def liftToOption[T](t: T): Option[T] = Some(t) | |
| sealed abstract class MailType | |
| case object Plain extends MailType | |
| case object Rich extends MailType | |
| case object MultiPart extends MailType |