recentpopularlog in

mcherm : concurrency   72

DBMS Musings: It’s Time to Move on from Two Phase Commit
This author proposes to keep ACID but get rid of two phase commit. The secret is to make systems that are not allowed to fail.
database  via:HackerNews  concurrency  parallelprogramming 
january 2019 by mcherm
André Staltz - Promises are not neutral enough
The promises added to JavaScript are eager (lazy would be nicer), have no cancellation, do not resolve until after the current event loop, and then() mixes "map" and "flatmap" behavior. Author says these were poor design choices; Hacker News commentary disagrees.
javascript  concurrency  concurrentprogramming  parallelprogramming  via:HackerNews 
february 2018 by mcherm
ffwd: delegation is (much) faster than you think | the morning paper
If done well, "only one thread accesses the data structure" can actually be the FASTEST multi-threaded data structure implementation because cache effects make the single thread go so much faster.
programming  via:HackerNews  concurrency  concurrentprogramming  algorithms  threading 
december 2017 by mcherm
Using JDK 9 Memory Order Modes
Doug Lea talks about new changes to the Java memory model (for threading) that are coming in JDK9.
DougLea  concurrency  parallelprogramming  java  jvm  via:HackerNews 
march 2017 by mcherm
Some thoughts on asynchronous API design in a post-async/await world — njs blog
Comparison of some different libraries for doing asynchronous programming in the Python world. Makes the case that the curio library makes things far easier to get right by mandating that EVERYTHING use async/await instead of allowing callbacks.
programming  python  concurrency  concurrentprogramming  threading  asynchronous  via:HackerNews 
november 2016 by mcherm
Deciphering Glyph :: Unyielding
Author of Twisted comments that green threads aren't really any different from normal threads in terms of how difficult it is to write correct code using them.
concurrency  concurrentprogramming  threading  programming 
november 2016 by mcherm
Leapfrog Probing
An implementation of a lock-free concurrent hashtable -- and the writeup is REALLY excellent. (Read the whole chain of previous articles to get the entire story.)
concurrentprogramming  concurrency  parallelprogramming  hash  programming  computerscience 
may 2016 by mcherm
Jepsen: Postgres: Two Phase Commit Is Not Enough
What 2-phase commit does NOT handle: a lost ack packet means that we can't tell whether it succeeded or not.
concurrency  database 
february 2016 by mcherm
java - What is the synchronization cost of calling a synchronized method from a synchronized method? - Stack Overflow
Answer to the question "Is there a meaningful performance cost to obtaining a lock when you already have it?"
java  threading  concurrency 
november 2015 by mcherm
How to miscompile programs with “benign” data races [PDF]
A paper on the kinds of transformations that compilers can do and why data races aren't OK ever in any compiled language.
programming  concurrency  concurrentprogramming  parallelprogramming  via:HackerNews 
february 2015 by mcherm
If Eventual Consistency Seems Hard, Wait Till You Try MVCC | Xaprb
Database concurrency is hard, and the abstractions mostly leak. Postgress does really well. Eventual consistency isn't actually so bad, when compared to this mess.
database  concurrency  nosql 
december 2014 by mcherm
Working simultaneously vs waiting simultaneously
You have apps that WAIT for many things at once, and those that do many CALCULATIONS at once. The former works well with languages like Go or Erlang; the latter works well with languages like C, or with SIMD in the extreme. This article explains why.
concurrency  concurrentprogramming  threading  parallelprogramming  via:HackerNews 
may 2014 by mcherm
Immutability, MVCC, and garbage collection at Xaprb
Why databases using immutable data structures always sound exciting, but mature databases don't ever look like that. A combination of concurrency and improving performance lead one away from the elegant design of true immutability to small continuous cleanup.
datastructures  database  programming  concurrency  immutable  parallelprogramming 
december 2013 by mcherm
Parallel Universe • No More Callbacks: 10,000 Actors, 10,000 Threads, 10,000 Spaceships
He ran a simulation with LOTS of "actors" using the actor library rather than traditional threading. Says it works well.
concurrency  concurrentprogramming  programming  java  jvm  scala  performance  via:HackerNews 
october 2013 by mcherm
Deconstructing Deferred - Google Groups
Guido analyses the design of the "deferred" object from twisted.
python  GuidoVanRossum  concurrency  via:reddit 
august 2013 by mcherm
C# in Depth: Implementing the Singleton Pattern
Threadsafe ways to do lazy initialization of a singleton in C#.
c#  programming  concurrency  concurrentprogramming 
february 2013 by mcherm
The LMAX Architecture
Using a no-locks implementation of a big ring buffer instead of queues for passing things between threads. This allowed astounding throughput from a single-thread core engine (which massively simplified the system architecture).
architecture  concurrency  performance  java  MartinFowler 
january 2013 by mcherm
PyPy Status Blog: Transactional Memory (II)
A summary of what transactional memory (especially software transactional memory) is and why Armin Rigo thinks it might be really, REALLY good for Python. Nothing here that was new to me, but the simple, clear explanation is quite good.
via:HackerNews  ArminRigo  PyPy  concurrency  concurrentprogramming  parallelprogramming  stm  programming 
january 2012 by mcherm
The problem with STM: your languages still suck
Software Transactional Memory (STM) doesn't play well with anything imperative or mutable. It's a natural for Haskell but every other programming language is in trouble. And it might be the only way to sanely use ever-increasing numbers of cores.
programming  functional  concurrency  haskell  stm  via:reddit  BrianHurt  threading  concurrentprogramming  parallelprogramming  softwaretransactionalmemory 
august 2011 by mcherm
We [PyPy] need Software Transactional Memory
Armin: PyPy has a GIL; to get rid of it we needs STM. Can’t do fine-grained locks like Jython because it’s hard to do; CAN do STM surprisingly easily because PyPy does whole-program transformations with ease. So he proposes trying to add STM to PyPy. He guesses 10x slowdown, perhaps 2x slowdown with serious optimization (wow… realistic expectations!) I think this is the sort of experiment that PyPy exists for, and is WELL worth trying.
via:reddit  ArminRigo  stm  pypy  parallellcomputing  threading  programming  computerscience  concurrency  concurrentprogramming 
august 2011 by mcherm
A concurrent programming architecture that runs it all on one CPU
They needed to handle 6 million transactions/second. Managing queues took most of their time. So they re-architected so that separate threads managed input and output but the core computation was all on a single thread. They also ensured only one thread writing to any given memory scan line. Resulting architecture was unusual and successful.
via:MartinFowler  MartinFowler  concurrentprogramming  parallelprogramming  concurrency  programming  architecture 
august 2011 by mcherm
Why Events Are A Bad Idea (for high-concurrency servers)
Contrary to claims, threads > events. The 2 are duals and should be equal. Threads map to our brains better. BUT, most thread libraries/compilers suck; we made a good one to prove it's possible. Cooperative threading and compiler hints are essential.
concurrency  programming  architecture  scalability  research  asynchronous  threading  computerscience  via:reddit 
august 2011 by mcherm
Paul Tyma: Writing Java Multithreaded Servers - whats old is new (PDF Slides)
nio may actually performed WORSE than thread-per-connection in modern JVMs with good data structures.
java  programming  threading  concurrency  scalability  via:HackerNews  io  parallelprogramming  architecture 
april 2011 by mcherm
Dabeaz: Python Thread Deadlock Avoidance
A with clause ("Context Manager") in Python to ensure that locks are obtained in a strict global order. Really a rather cool feature -- shows off the power of the with clause and also might prove useful as long as your python program doesn't grab any locks from within C code.
programming  python  concurrency  concurrentprogramming  parallelprogramming  via:reddit 
january 2011 by mcherm
Is Transactional Programming Actually Easier? | Lambda the Ultimate
A study compared software transactional programming with locks using 150 undergraduate students. STM did extremely well in objective measurements.
concurrency  stm  parallelprogramming 
september 2010 by mcherm
A Dismal Guide to Concurrency | Facebook
A nice overview of the state of concurrent programming: what the big problems are.
parallelprogramming  concurrentprogramming  programming  threading  concurrency  via:HackerNews 
april 2010 by mcherm
Dabeaz: The Python GIL Visualized
A picture showing just how the Python GIL operates on multiple cores. (Hint: Not well. It's not designed for that at all.)
python  programming  concurrency  concurrentprogramming  threading 
january 2010 by mcherm
Node.js is genuinely exciting
A web application framework in server-side javascript. What I find most interesting is that the language and libraries are all tuned for writing an an event-driven style rather than a threaded style -- even things like file IO are done via callbacks.
programming  via:SimonWillison  SimonWillison  scalability  concurrency  parallelprogramming  eventdriven  asynchronous 
november 2009 by mcherm
Stuff What I Posted: Comparing Go and Stackless Python
Comparing the concurrency support in Google's new "Go" language with that in Stackless Python. Stackless comes out pretty well.
programming  python  concurrency 
november 2009 by mcherm
Programming and politics: Concurrency Patterns: Java, Scala, and Clojure
One person's comparison of locking, STM, and actors as mechanisms for coordinating concurrent programming.
concurrency  java  scala  programming  parallelprogramming  concurrentprogramming  clojure  stm  computerscience  via:HackerNews 
october 2009 by mcherm
The Transactional Memory / Garbage Collection Analogy: Dan Grossman
In this academic paper, the author presents and defends an extensive analogy between garbage collection as a solution for memory allocation and Software Transactional Memory as a solution for concurrent programming.
programming  stm  concurrency  concurrentprogramming  garbagecollection  parallelprogramming  research  computerscience 
october 2009 by mcherm
Rich Dougherty's blog: Delimited continuations in Scala
Scala introduces delimited continuations. A compiler plugin transforms the source code to continuation-passing-style.
scala  continuations  concurrency  concurrentprogramming  programming 
october 2009 by mcherm
EVE Evolved: EVE Online's server model - Massively
The game EVE Online does not use "sharding" all the players are in a single shared world. This article discusses how that is implemented and also what affects it has had on the game play (fairly significant effects, it appears).
via:slashdot  mmorpg  gamedev  programing  concurrency  parallelprogramming  eveonline  scalability  socialcomputing 
october 2009 by mcherm
Swarm: Distributed Computation in the Cloud on Vimeo
Video presentation describing "Swarm", a new project for a language that tries to implement cloud computing by moving the computation to where the data is. Relies on the (not yet released) version of Scala which provides continuations that can be saved and/or moved to a different machine before being resumed. They do that by rewriting the program for continuations instead of trying to save the contents of the stack. Interesting.
swarm  programming  scala  scalability  continuations  stm  parallelprogramming  concurrency 
october 2009 by mcherm
Swarm: A true distributed programming language - Blog -
An interesting idea in concurrent programming. Instead of moving the data to the computation, move the computation to the data. He built a working prototype.
concurrency  parallelprogramming  scala  swarm  via:slashdot 
october 2009 by mcherm
Are We There Yet? A deconstruction of object-oriented time: HickeyJVMSummit2009.pdf
Interesting paper. He claims we should use immutable values, and separate "identities" which are a series of values that are "causally related". Use more trees! Supports concurrency (you can look at things while someone else changes it). May be the same as software transactional memory (I'm unclear).
functional  via:LambdaTheUltimate  programming  datastructures  stm  concurrency 
october 2009 by mcherm
actorom - Google Code
A library for actors in Java. Among other things, it struck me as having good documentation.
java  library  concurrency  programming  via:DebasishGhosh 
july 2009 by mcherm
memcpy() concurrency curiosities : David Dice's Weblog
When memcopy() overwrites fixed data with the same data, concurrent threads may briefly see changes to the values. This happens in actual cases and made some "immutable" data in Java (that got read via JNI) show intermittent changes. It's technically valid, but evil.
via:reddit  concurrency  concurrentprogramming  threading  programming  debugging  java 
may 2009 by mcherm
Responses to The Problem with STM | Enfranchised Mind
Interesting observation: pure immutable data structures tend not to be compatible with concurrent programming, because sharing between threads would require a mutable current-state-of-the-structure variable.
programming  immutable  concurrency  parallelprogramming  via:BrianHurt  BrianHurt  softwaretransactionalmemory 
may 2009 by mcherm
Events and Races : Fabulous Adventures In Coding
An example of a race condition and how it is confusing to understand but relatively easy to solve.
concurrency  threading  programming 
april 2009 by mcherm
Bloom Filters - optimizing network bandwidth: Ruminations of a Programmer
Another great idea: transfer a Bloom filter over the network and use it to pre-filter the data that's going to be merged together (perhaps when doing a map-reduce for instance). Then you can send a much smaller amount of data over the network to do the actual merge.
bloomfilter  programming  mapreduce  datastructures  via:DebasishGhosh  DebasishGhosh  concurrency 
march 2009 by mcherm
Fabulous Adventures In Coding : Locks and exceptions do not mix
An excellent explanation of some gory details of handling locks and exceptions. Illustrates a time when deadlock might be what you WANT!
programming  threading  concurrency  exceptions  via:EricLippert  EricLippert 
march 2009 by mcherm
The problem with STM: your languages still suck » Enfranchised Mind
Software Transactional Memory works GREAT in Haskell, but it's just never going to work in Java, C, and such because they are too full of side effects -- it's just not a good match for the behavior of STM. STM is the best of possible solutions to concurrent programming (I don't think I agree with that!), so programming languages will have to change.
concu  concurrency  concurrentprogramming  languagedesign  haskell  functional  stm  softwaretransactionalmemory  progra  programming  parallelprogramming  BrianHurt 
january 2009 by mcherm
Software transactional memory
A report by some researchers at IBM who have spent the past two years building a software Transactional Memory system. They say the performance sucks and there's little hope for improvement. Perhaps some hardware support will help, but frankly they are VERY pessimistic -- and that's from people who believe enough to spend 2 years actually building it!
programming  research  softwaretransactionalmemory  via:LarryOBrien  concurrency  concurrentprogramming  parallelprogramming 
november 2008 by mcherm
Windows & .NET Watch: Transaction crowd gets a boost - SD Times On The Web
Prediction: Software Transactional Memory (STM) is taking over, and it will eventually replace threading as the preeminent mechanism for concurrent programming.
LarryOBrien  via:LarryOBrien  programming  concurrency  concurrentprogramming  parallelprogramming  threading  softwaretransactionalmemory 
november 2008 by mcherm
Software Transactional Memory in Scala - Code Commit
An implementation of software transactional memory for Scala. Demonstrates the power of scala's implicit parameters, and goes into great detail about the particulars of this technique for concurrency.
programming  concurrency  concurrentprogramming  parallelprogramming  softwaretransactionalmemory  scala  via:DanielSpiewak  DanielSpiewak  implicit 
november 2008 by mcherm
Java theory and practice: Managing volatility
Brief description of "volitile" in Java. Includes some quite useful patterns of safe use for volitile.
java  concurrency  parallelprogramming  threading  patterns  programming 
october 2008 by mcherm
Cool Threads | I, Cringely . The Pulpit .
Cringely talks about threading. As usual, he doesn't *really* get it, but he presents it well anyhow. Curiously, he uses an example of optimistic concurrency where an ATM machine is accepting a deposit and has to spit the money back out. In the obvious withdrawal scenario, it can't suck the money back in!
cringely  concurrency  threading  parallelprogramming  optimisticconcurrency 
october 2008 by mcherm
I, Cringely . The Pulpit . Data Debasement | PBS
Cloud computing (massively parallel computation) is not compatible with databases. So databases as we know them will change, probably soon.
programming  via:cringely  cringely  cloudcomputing  database  concurrency  scalability 
october 2008 by mcherm
Threadsafe Java Servlets : Dragons in the Algorithm
My essay on why Java servlets have a threading problem with accessing data in the session.
myblog  mypostings  concurrency  threading  java  webdevelopment  webdev 
october 2008 by mcherm
Java theory and practice: Are all stateful Web applications broken?
Talks about web applications and threading. My blog entry on the subject touched on similar things.
java  threading  concurrency  webdevelopment  via:JoeCampbell 
september 2008 by mcherm
Higher-Order Fork/Join Operators
Tricky stuff... using monads to combine low-level parallelizable tasks into bigger parallelizable tasks. I didn't fully understand it.
scala  concurrency  threading  parallelprogramming  DanielSpiewak  via:DanielSpiewak 
september 2008 by mcherm
SYNCHRONOUS IO NEVER OK: Havoc's Blog September, 2008
Generally good advice: if you're building an interactive application (like, say, a browser), then never do IO in the main thread where it will lock up the application... not EVEN if the IO is "just tiny, and will be really quick".
programming  threading  concurrency  via:reddit 
september 2008 by mcherm
Scaling Out | Engineering @ Facebook's Notes
When Facebook wanted a second data center with its own DB, how did they need to change their application? (1) make one DB read-only and replacate from the main datacenter; modify MySQL to clear memcache on replication. (isn't open source cool?) (2) all pages doing edits go to main data center. For the first few seconds after a user makes a change, send that user to main data center as the other may still have the old value.
scalability  JasonSobel  memcache  opensource  mysql  mypostings  concurrency  parallelprogramming  via:DebasishGhosh  programming 
august 2008 by mcherm
Erlang, or Utility-computing vs. Appliance-computing « X marks reality
Cloud computing is the way of the future. Both Amazon and Google are doing it today. They should take lessons from erlang. Unfortunately, it doesn't say WHICH lessons, so this bears more thinking.
cloudcomputing  ec2  erlang  google  concurrency  programming  via:del.icio.us 
july 2008 by mcherm
armstrong on software: The Road we didn't go down
"The fundamental problem with taking a remote operation and wrapping it up so that it looks like a local operation is that the failure modes of local and remote operations are completely different."
programming  erlang  concurrency  rpc 
july 2008 by mcherm
Thoughts About the Erlang Runtime :: Ian Bicking: a blog
What is important about Erlang's concurrency model, and could it be applied to Python? Perhaps, if you made functions and modules immutable and passed around some kind of data objects (not REAL objects).
programming  python  erlang  concurrency  threading 
june 2008 by mcherm
Richard Feynman and The Connection Machine
Recollections of a Feynman helping with the startup building "the connection machine". We were all amateurs, but sometimes in areas where no one else had done it before. "The act of discovery was not complete for him until he had taught it to someone else
Feynman  computers  concurrency  startup  via:CodingHorror 
june 2008 by mcherm
InfoQ: JavaOne: Cliff Click on a Scalable Non-Blocking Coding Style
Article talks about a data structure implementation that's tweaked to work well with large numbers (hundreds) of processors.
parallelprogramming  java  datastructures  concurrency  via:digg 
may 2008 by mcherm
Software Secret Weapons: Doug Lea is a Grandfather of all Scala Actors
Pavel Simakov looks at Scala's actors library (message passing) and asks how it works and whether it could be done in Java. The answer is (of course) "yes, but more verbosely".
scala  java  programming  threading  parallelprogramming  DougLea  concurrency 
april 2008 by mcherm

Copy this bookmark:





to read