Why shared libraries between microservices are bad? [closed]

The evils of too much coupling between services are far worse than the problems caused by code duplication The author is very unspecific when he uses the generic word “coupling”. I would agree with certain types of coupling being a strict no-no (like sharing databases or using internal interfaces). However the use of common libraries … Read more

C++ Winsock P2P

Since I don’t know what information you are looking for, I’ll try to describe how to set up a socket program and what pitfalls I’ve run into. To start with, *read the Winsock tutorial at MSDN. This is a basic program to connect, send a message and disconnect. It’s great for getting a feel for … Read more

Meaning of inter_op_parallelism_threads and intra_op_parallelism_threads

The inter_op_parallelism_threads and intra_op_parallelism_threads options are documented in the source of the tf.ConfigProto protocol buffer. These options configure two thread pools used by TensorFlow to parallelize execution, as the comments describe: // The execution of an individual op (for some op types) can be // parallelized on a pool of intra_op_parallelism_threads. // 0 means the … Read more

Flattening Rows in Spark

You can use explode function: scala> import org.apache.spark.sql.functions.explode import org.apache.spark.sql.functions.explode scala> val test = sqlContext.read.json(sc.parallelize(Seq(“””{“a”:1,”b”:[2,3]}”””))) test: org.apache.spark.sql.DataFrame = [a: bigint, b: array<bigint>] scala> test.printSchema root |– a: long (nullable = true) |– b: array (nullable = true) | |– element: long (containsNull = true) scala> val flattened = test.withColumn(“b”, explode($”b”)) flattened: org.apache.spark.sql.DataFrame = [a: bigint, … Read more