Live data from Hacker News

Simplify Service Dependencies with Nodes

blog.twitter.com

41–50 of 60 posts

Re: Simplify Service Dependencies with Nodes

#41
post #8
post #2

So, between the lines - Twitter looks ahead to move to Java 8 and finally ditch Scala?

Why ditch Scala completely?

Last I've heard, Twitter was "stuck" with their own version of Scala (was it off 2.10?). Typesafe becoming Lightbend (i.e. not Scala focused anymore) for doing business, Odersky moving all of his focus to Dotty, and core Scala contributors leaving. That's my intuition of asking.

Re: Simplify Service Dependencies with Nodes

#42
post #41
post #8

Earlier quoted context omitted.

Why ditch Scala completely?

Last I've heard, Twitter was "stuck" with their own version of Scala (was it off 2.10?). Typesafe becoming Lightbend (i.e. not Scala focused anymore) for doing business, Odersky moving all of his focus to Dotty, and core Scala contributors leaving. That's my intuition of asking.

That is not true.

Re: Simplify Service Dependencies with Nodes

#43

Maybe I'm missing something, how is this better than simple promises in JS? This seem easy to reason about: serviceA { Promise.All(b,c).then(...) } serviceB { (d).then(...) } serviceC { Promise.All(d,e).then(...) }

Yes you are missing something. The purpose of this library is to decouple the "description" from the "computation" itself. I usually call "separating the _what_ from the _how_".

Essentially they construct an AST for whatever services that need to be called. Most of the time they then simply "interpret" the AST with the lower-level Finagle constructs. But, and that's actually the big point, they can use _the same code_ with a different interpreter to generate a GraphViz representation for visual inspection. This super helpful once your call graph becomes more complex .. Another possibility is to write an optimizing interpreter etc.

Anyhow, what I find a bit sad is that they didn't leverage the Scala part if Finagle more .. this would be a prime example for a Free Monad () based DSL. That way they could have avoided writing 10s of classes with less than fortunate names.

() might need a Free Applicative part as well since they inherently want to have parallelism expressed in the language

Re: Simplify Service Dependencies with Nodes

#44
post #43

Maybe I'm missing something, how is this better than simple promises in JS? This seem easy to reason about: serviceA { Promise.All(b,c).then(...) } serviceB { (d).then(...) } serviceC { Promise.All(d,e).then(...) }

Yes you are missing something. The purpose of this library is to decouple the "description" from the "computation" itself. I usually call "separating the _what_ from the _how_". Essentially they construct an AST for whatever services that need to be called. Most of the time they then simply "interpret" the AST with the lower-level Finagle constructs. But, and that's actually the big point, they can use _the same code…

Monad implies Applicative, so the "might need a free applicative part as well" is already a given.

Re: Simplify Service Dependencies with Nodes

#45
post #43

Earlier quoted context omitted.

Yes you are missing something. The purpose of this library is to decouple the "description" from the "computation" itself. I usually call "separating the _what_ from the _how_". Essentially they construct an AST for whatever services that need to be called. Most of the time they then simply "interpret" the AST with the lower-level Finagle constructs. But, and that's actually the big point, they can use _the same code…

Monad implies Applicative, so the "might need a free applicative part as well" is already a given.

Yes and no. With Free Applicatives you can express side-effects such as parallelism .. not so with Free Monads afaik

Re: Simplify Service Dependencies with Nodes

#46
post #40

Earlier quoted context omitted.

IMHO the problem with Java 8 is not the language but framework support. Except SparkJava, most other frameworks use Java 8 as a "upgraded java compiler". Tge canonical way to write code is still Java 6. I think the best way to upgrade your java codebase is Kotlin. On the server side, Kotlin +vertx is extremely compelling.. on the Android side, Kotlin pretty much kills it.

I agree. This is exactly the move I've made when I was CTO of a company needing a move to the JVM from .NET. Given the options of Java, Scala - I moved to picking Kotlin. In many ways, Kotlin for me is Scala without the different ways to hang yourself. I wish it was given more credit that it gets right now outside of the Android circles.

that is very interesting!

could you talk about the framework that you used? im particularly concerned about ORM and database connectivity.

Re: Simplify Service Dependencies with Nodes

#47

This is like the fourth instance of computational graphs that I've seen recently. Can someone recommend some resources on the underlying theoretical ideas? It's not just graph theory, it's something like computational graph theory or maybe data flow but neither seems to be at the level of formalism I'd like.

Petri nets? Those can be cyclical though - i don't know if there is a special name for acyclical nets.

Yet another instance of this is the Disruptor patter that use it in an event queue.

Re: Simplify Service Dependencies with Nodes

#48
post #41
post #8

Earlier quoted context omitted.

Why ditch Scala completely?

Last I've heard, Twitter was "stuck" with their own version of Scala (was it off 2.10?). Typesafe becoming Lightbend (i.e. not Scala focused anymore) for doing business, Odersky moving all of his focus to Dotty, and core Scala contributors leaving. That's my intuition of asking.

Kotlin is a joke, but Scala's mismanagement and treatment of its contributors might be its undoing. Source: #1/#2 top active community contributor (depends on whether you count commits or locs in scala/scala) leaving Scala, because I'm tired of their shit.

Re: Simplify Service Dependencies with Nodes

#49
post #48
post #41

Earlier quoted context omitted.

Last I've heard, Twitter was "stuck" with their own version of Scala (was it off 2.10?). Typesafe becoming Lightbend (i.e. not Scala focused anymore) for doing business, Odersky moving all of his focus to Dotty, and core Scala contributors leaving. That's my intuition of asking.

Kotlin is a joke, but Scala's mismanagement and treatment of its contributors might be its undoing. Source: #1/#2 top active community contributor (depends on whether you count commits or locs in scala/scala) leaving Scala, because I'm tired of their shit.

why do you call kotlin a joke? because it is extremely popular in the Android world for large production apps.

plus with the upcoming kotlin 1.1 release and vertx's upcoming first class support for kotlin.. it is beginning to build traction on the server side.

what is really exciting is Kotlin scripting. Gradle is the first project to start using it.

Re: Simplify Service Dependencies with Nodes

#50
post #48
post #41

Earlier quoted context omitted.

Last I've heard, Twitter was "stuck" with their own version of Scala (was it off 2.10?). Typesafe becoming Lightbend (i.e. not Scala focused anymore) for doing business, Odersky moving all of his focus to Dotty, and core Scala contributors leaving. That's my intuition of asking.

Kotlin is a joke, but Scala's mismanagement and treatment of its contributors might be its undoing. Source: #1/#2 top active community contributor (depends on whether you count commits or locs in scala/scala) leaving Scala, because I'm tired of their shit.

Yeah, Scala's a bit of a mess right now, definitely not thrilled that the flagship web framework (Play) won't be supporting Scala 2.12 until the 2.6 release (i.e. 4-6 months from now), which is absurd given that pretty much the entire ecosystem has a 2.12 release at this point :\

As for typed alternatives, there's no substitute for Scala. Maybe Haskell or OCaml if you leave the JVM, but otherwise it's pretty much a language wasteland for anyone that's taken a dip in the ocean of Scala.

> because I'm tired of their shit

heh, think it goes both ways ;-) As an observer none of the powers that be took a liking to you calling them out, justified or not (agree that community contrib takes a back seat to Lightbend/EPFL).

Good luck wherever you've wound up (and thanks for the biased Either contrib in 2.12, finally!)

Post reply on HN