Developing concurrent programs with Pony

Horse Power

© Lead Image © Aleksandr Frolov, 123RF

© Lead Image © Aleksandr Frolov, 123RF

Article from Issue 205/2017

Pony, an object-oriented programming language with static typecasting, trots down well-mapped paths to deliver secure, high-performance code for concurrent applications.

The still young Pony [1] programming language uses the actor model [2] and capabilities [3] to make deadlocks and data races things of the past. In this article, I take Pony for a test ride with an example application that, once it has compiled successfully, logs the consumption of paint and reports the results in a single line.

Figure 1 revisits the problems of concurrent programming in C and C++. To improve performance, the hypothetical program outsources tasks to concurrent threads that access the shared memory area. Locks manage access to prevent different threads editing data simultaneously, falsifying each other's results in the process, and generating race conditions. Nothing good results when programming errors interact and create deadlocks.

Table 1 summarizes the problems associated with implementation across various languages. The comparison with Java is inevitable, because the language offers one of the most successful enhancements of the C and C++ method. A comparison with Rust [4] is also appropriate, because the new kid in town also tries to generate secure and fast code for concurrent applications.


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Check Your Connection Speed with speedtest-cli
  • Web apps with Trails

    Create Java applications in a fraction of the development time with the free and powerful Trails framework.

  • KDE Plasma

    We take a peek at how to create your own plasmoids for the latest KDE desktop, giving you the power to build the perfect active desktop environment.

  • TV-Browser

    The Java-based TV-Browser software provides a wealth of features that help you organize your evening television viewing.

  • mtPaint

    You can create pixel art in just a few mouse clicks with the paint program mtPaint, and it can even teach your works of art how to walk.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95