Skip to content

Instantly share code, notes, and snippets.

View yu-iskw's full-sized avatar

Yu Ishikawa yu-iskw

View GitHub Profile
@erikerlandson
erikerlandson / distance.scala
Created August 21, 2014 22:51
Suggestion for simple distance metric (and measure) design
import breeze.linalg.{Vector => BV, DenseVector => DBV}
import org.apache.spark.annotation.Experimental
import org.apache.spark.mllib.linalg.{Vector, DenseVector}
trait DistanceMeasure extends Function2[BV[Double], BV[Double], Double] with Serializable {
// each measure/metric defines for itself:
override def apply(v1: BV[Double], v2: BV[Double]): Double
// a catch-all overloading of "()" for spark vectors
// can also be overridden on a per-class basis, if it is advantageous
@ueshin
ueshin / sparkmeetup.md
Created September 8, 2014 08:49
Spark SQL samples for Spark Meetup
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active July 4, 2024 07:31
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.