Tag: concurrency

Allowing Parallel Solutions

I recently watched an interesting talk by Guy L. Steele Jr. showing how different problem solving approaches can allow or prevent a parallel implementation. Vocabulary The vocabulary you have to discuss solutions and algorithms affects how you approach new problems. Guy Steele showed that everyone in his audience already understood ideas for iterative, sequential solutions (loops, lists, accumulators), but only a minority already understood ideas for potentially parallelizable solutions (parallel prefix). Like design patterns for object-oriented programming and monads for functional programming a higher-order vocabulary of parallel programming idioms would help us both communicate with each other and helps us…

Read More »

Reasoning About State in Multi-threaded Systems

Reasoning about modern software systems can be hard. Debugging modern software systems can be hard. Whether you’re working on a multithreaded service or re-entrant UI code, tracking responses from network services or running many asynchronous IO tasks, understanding the overall state of your application especially when there’s a hard-to-reproduce bug can be very hard. Common styles of older multithreaded code are the worst. Shared state and locks, manual coordination between threads, fighting with race conditions, deadlocks and live-locks. It’s very hard to diagnose problems and common to have applications that have been running for weeks suddenly lock up and never…

Read More »

Contrasting Active Objects vs Tasks vs Actors

Contrasting ideas helps me see what’s special about each idea and what they have in common but maybe in different forms. Different tools, different languages show off different ideas, and while some work best with specific language features there’s always something to help in other languages in my day-job. So today I’ve been thinking about some models of concurrent programming. The Coursera course on Reactive Programming explored the Actor model and I’m contrasting that with the Active Object pattern from POSA2 which I saw in detail in another Coursera course last year and with Tasks which have quickly become one…

Read More »