Live data from Hacker News

Haxl: Making Concurrency Unreasonably Easy [video]

events.techcast.com

21–30 of 34 posts

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#21
post #3

I have not fully digested yet, but seems very similar to Scala Parallel Collections and Java8 Streams. There are databases which implements such interfaces.

Which databases are those and what are the relevant features? Are you talking about FILESTREAM? https://technet.microsoft.com/en-us/library/bb933993(v=sql.1...

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#22
post #11
post #3

I have not fully digested yet, but seems very similar to Scala Parallel Collections and Java8 Streams. There are databases which implements such interfaces.

It isn't the slightest bit similar to those! Haxl is a high-level library for specifying (and optimising) concurrent data retrieval.

I'm not sure that's an apt description either. Haxl's features include auto batching of IO through parallelism and a temporal cache...for error logging when failures occur. It's spelled out in the first minute he talks about it. In the IO batching code (the boilerplate) you specify how and what to output in your logging. Haxl can be used without performing optimization (write an inefficient batcher) or doing data retrieval (the I/O is fire and forget and never cache anything). Maybe I am misunderstanding the basic usage.

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#23
post #3

I have not fully digested yet, but seems very similar to Scala Parallel Collections and Java8 Streams. There are databases which implements such interfaces.

Which databases are those and what are the relevant features? Are you talking about FILESTREAM? https://technet.microsoft.com/en-us/library/bb933993(v=sql.1...

Hazelcast Jet, Spark, my project... they work similar way. But as I wrote, I need to read the presentation first.

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#24
post #22
post #11

Earlier quoted context omitted.

It isn't the slightest bit similar to those! Haxl is a high-level library for specifying (and optimising) concurrent data retrieval.

I'm not sure that's an apt description either. Haxl's features include auto batching of IO through parallelism and a temporal cache...for error logging when failures occur. It's spelled out in the first minute he talks about it. In the IO batching code (the boilerplate) you specify how and what to output in your logging. Haxl can be used without performing optimization (write an inefficient batcher) or doing data ret…

It's not easy summarising it in one sentence, but 'auto batching' and 'caching' is what I meant by optimising the data retrieval.

EDIT: the Haxl docs describe it as "a library and EDSL for efficient scheduling of concurrent data accesses with a concise applicative API"

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#25
post #8

Earlier quoted context omitted.

Even in Haskell you still have to write some boilerplate to get this by default. Languages that don't separate pure computation from IO (and other side-effects) make it even harder on the compiler. So to answer your question: implementations will do this by default only after pure/constant will become the default for all functions/variables, with side-effecting/mutable clearly marked.

If one looks at it from a 'what a today's compiler can do', then sure, one needs to statically declare everything. If one looks at things from a 'any technical task can be handled by machine learning, sooner or later' point of view, there seems to be no obvious reason why parallelization, which is a purely technical task, not like say, writing music, could not sooner or later be handled by machine learning algorithms…

Writing music is a pretty technical task, actually. Especially if you optimize for something as tangible as: please human ears, or "fit within the actions in the movie / computer game".

The idea here is that we want to find a way to make automatic parallelization of computer programmes happen as much as possible long before we've solved general AI.

So even in a language like Haskell you still have to pay some attention to make your code amenable to parallelism. See Guy Steele's advice (see https://vimeo.com/6624203).

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#26
post #9

Earlier quoted context omitted.

Analysis of real software that has looked for the maximum theoretical implicit concurrency has found that software to have its implicit concurrency level top out very quickly, often not even making it up to 2x. You don't hear about this today not because nobody has tried it, but because it's been tried and it hasn't been found worth the bother. Amdahl's law is a real jerk sometimes. If you want concurrent code, you'r…

Sadly it seems like the youngsters are going in the opposite direction these days. It's the old fogies who have to keep saying, I've got a functor, I've got a monoid, I've got a monoid functor = monad.

Aren't Applicative Functors still all the rage? Monads are not all that well suited to automatic parallelization (as Simon Marlow points out, too).

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#27
post #4

I wonder how long it will be before compilers/interpreters of async-aware languages just do this by default. CPUs and low-level language compilers jump through all kinds of hoops of out-of-order execution, branch prediction, caching, parallel execution, etc. I picture a day maybe 10 years from now where developers in most languages don't even have to think about these things. All the old-timers will still be structur…

CPUs already have multiple concurrent instructions running. When people write software that runs serially on a macro scale, that is exactly what they get.

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#28

Earlier quoted context omitted.

Which databases are those and what are the relevant features? Are you talking about FILESTREAM? https://technet.microsoft.com/en-us/library/bb933993(v=sql.1...

Hazelcast Jet, Spark, my project... they work similar way. But as I wrote, I need to read the presentation first.

Jet and Spark are not what most people would call databases, since they have such a heavy stream processing focus and are rarely stores of record.

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#29
post #26

Earlier quoted context omitted.

Sadly it seems like the youngsters are going in the opposite direction these days. It's the old fogies who have to keep saying, I've got a functor, I've got a monoid, I've got a monoid functor = monad.

Aren't Applicative Functors still all the rage? Monads are not all that well suited to automatic parallelization (as Simon Marlow points out, too).

Applicative seems to be the way of the future, yes.

Re: Haxl: Making Concurrency Unreasonably Easy [video]

#30
post #12

How does this differ from BEAM langs which already make concurrency "unreasonably easy"?

For one, they serve different purposes. Haxl is specifically for concurrent data retrieval while BEAM is a general purpose platform for fault-tolerant computation. For another, they operate via different interfaces. BEAM languages communicate concurrently only via a message passing interface. Haxl lets the author write declarative code specifying what to retrieve, then the library executes it concurrently and in para…

Thank you for the breakdown!
Post reply on HN