Gael Fraiteur argues that multithreaded programming needs to be addressed at the right level of abstraction, with design patterns like Actor, Immutable, Freezable, Thread Affine, Reader-Writer-Synchronized. Design patterns form a language and serve as a model against which code can be expressed. Compilers must support design patterns to allow code to be deterministically validated against the model, and of course to generate the low-level instructions that would be otherwise written manually.
Quarkus offers a great development experience. In this session, I’ll introduce you to the power of Quarkus Live Coding and tools that are useful to developers for debugging, deploying, and testing Quarkus applications.
This document provides an overview of developing a web application using Spring Boot that connects to a MySQL database. It discusses setting up the development environment, the benefits of Spring Boot, basic project structure, integrating Spring MVC and JPA/Hibernate for database access. Code examples and links are provided to help get started with a Spring Boot application that reads from a MySQL database and displays the employee data on a web page.
This document discusses several design patterns including Singleton, Observer, Delegation, Adapter, Facade, Immutable, Read-Only Interface, Proxy, and Factory. For each pattern, the document describes the context, problem, forces, and solution. The patterns provide reusable solutions to common programming problems by separating interfaces from implementations.
Rasheed Amir presents on Spring Boot. He discusses how Spring Boot aims to help developers build production-grade Spring applications quickly with minimal configuration. It provides default functionality for tasks like embedding servers and externalizing configuration. Spring Boot favors convention over configuration and aims to get developers started quickly with a single focus. It also exposes auto-configuration for common Spring and related technologies so that applications can take advantage of them without needing to explicitly configure them.
Spend some time working with OpenAPI and gRPC and you’ll notice that these two technologies have a lot in common. Both are open source efforts, both describe APIs, and both promise better experiences for API producers and consumers. So why do we need both? If we do, what value does each provide? What can each project learn from the other? We’ll bring the two together for a side-by-side comparison and pose answers to these and other questions about two API methodologies that will do much to influence the future of networked APIs.
This document discusses how to handle merge conflicts in Git version control. It begins by explaining that Git can automatically resolve most merge conflicts and that conflicts only occur locally on a user's machine. It then describes how a conflict happens when two people modify the same line of the same file differently. The document explains that a conflict is simply different versions of a file represented by funny letters. It advises understanding what caused the conflict by determining that two developers modified the same file and lines. Finally, it provides instructions for solving a conflict by editing the file, using a merge tool, or GUI client and then staging and committing the resolved changes.
This document provides an introduction to using Git and GitHub for version control of documents and collaboration. It explains the basic workflow of creating, editing, and saving files individually. It then introduces Git as a tool to track changes to documents over time, including who made each change and when. The document outlines setting up Git locally and using basic commands like commit, diff, log, branch, merge, and push/pull to the remote GitHub repository. It highlights key GitHub features like the profile page, repository page, pull requests, and hosting websites for free using GitHub Pages.
* What is different GitHub Flow and Git Flow?
* What is GitHub Actions?
* How to write the simple workflow?
* What's problem in GitHub Actions UI?
* What's problem with Secrets in GitHub Actions?
* How to write your first GitHub Actions and upload to the marketplace?
* What's a problem with environment variables in GitHub Actions?
An introduction to reactive programming concepts and basics. I aim here to show what's reactive programming, why it's used and show some frameworks and benchmarks that support it.
Java concurrency allows applications to make use of multiple processors and handle asynchronous operations through the use of threads. While concurrency provides benefits like improved performance, it also introduces risks like race conditions and deadlocks if threads access shared resources unsafely. The Java threading APIs provide tools for safely managing concurrent operations through mechanisms like synchronization, locks, and concurrent collections.
This document provides an overview of the Laravel PHP framework. It discusses Laravel's history and evolution from version 1 to the current version 5.3. Key Laravel concepts are explained such as routing, controllers, models, views, Artisan commands, and architectural changes in version 5 like the directory structure and environment detection. Additional Laravel tools and resources are also mentioned like Laravel Elixir, Homestead, and Laracasts.
This is very basic laravel presentation. I tried to cover all the topics in this presentation. For more information, please feel free to email me - toufiqist@gmail.com
Vert.x is a toolkit for building reactive microservices applications on the JVM. It uses the reactor pattern with a single-threaded event loop to avoid the C10K problem. Verticles are lightweight concurrent units that communicate asynchronously via an event bus. This allows building scalable and reactive microservices. Vert.x supports websockets, clustering, reactive programming with RxJava, and can be deployed to production environments like AWS. It also integrates with Spring for dependency injection and configuration.
Slides for a presentation given at the Go MN meetup https://www.meetup.com/golangmn/ given on 4/15/2020.
The associated code is available at https://github.com/andreburgaud/meetup-golang-lua. The topic is about the interoperability between Go and Lua, or Lua and Go.
A short introduction to a powerful Design by Contract technique and its implementation in ruby contracts.ruby.
Design by Contract allows one to do defensive programming in very elegant fashion, allows to set contracts on methods (expectations on input - arguments; and on output - return result) and invariants on classes. This allows to reason about code much much better.
Git is a free and open source distributed version control system that allows tracking changes to projects, enabling reversion to previous versions and collaboration. It runs locally, keeping track of file histories, and remote hosts like GitHub can be used to host projects and histories, enabling collaboration through pushing and pulling changes. Git provides functionality, performance, security and flexibility needed for both individual and team development.
The document discusses object-oriented programming (OOP) and functional programming (FP). It argues that OOP and FP are not opposites and can be effectively combined. It addresses common myths about FP, such as that it is new, hard, or only suitable for mathematical problems. The document also compares how OOP and FP approach concepts like decomposition, composition, error handling, and mutability/referential transparency. While both approaches have merits, the document concludes there is no single best approach and the choice depends on the problem and programmer preferences.
This document discusses design pattern automation and the use of pattern-aware compilers. It provides a history of programming languages and patterns, defines design pattern automation as using tools to optimize productivity in implementing software based on patterns. It discusses how pattern-oriented software development involves implementing patterns at multiple levels of abstraction. It also addresses myths around why patterns cannot be automated and argues that emerging design and agile methodologies allow patterns to naturally emerge from iterative design processes. An example of applying automation to the Reader-Writer pattern through code generation and verification is also provided.
Multicore processors are becoming prevalent due to the limitations of increasing single core clock speeds. This presents challenges for software to effectively utilize multiple cores. Functional programming is one option that avoids shared state and parallel access issues, but requires a significant mindset shift. Refactoring existing code using tools is another option to incrementally introduce parallelism. Hybrid approaches combining paradigms may also help transition. Key application areas currently benefiting include servers, scientific computing, and packet processing. However, significant existing code is not easily parallelized and performance gains have yet to be fully realized.
Игорь Фесенко "Direction of C# as a High-Performance Language"
There are a lot of upcoming performance changes in .NET. Starting from code generation (JIT, AOT) and optimizations that can be performed by the compiler (inlining, flowgraph & loop analysis, dead code elimination, SIMD, stack allocation and so on). In this talk we will cover some features of C# 7 are going towards making low level optimization.
I will share not only how we can improve performance with the next version of .NET, but how we can do it today using different techniques and tools like Roslyn analyzers, Channels (Push based Streams), System.Slices, System.Buffers and System.Runtime.CompilerServices.Unsafe.
Everybody knows the lock keyword, but how does it implemented? What are its performance characteristics. Gael Fraiteur scratches the surface of multithreaded programming in .NET and goes deep through the Windows Kernel down to CPU microarchitecture.
Industry - Program analysis and verification - Type-preserving Heap Profiler ...
Paper: Type-preserving Heap Profiler for C++
Authors: József Mihalicza, Zoltán Porkoláb and Ábel Gábor
Session: "Industry Track Session 4: Program analysis and Verification"
The document discusses modern Java concurrency. It introduces the topic and explains why developers may want to utilize modern Java concurrency features. It discusses the java.util.concurrent library and how it provides building blocks for concurrent and thread-safe code like ReentrantLock, Condition, ConcurrentHashMap. It provides examples of using constructs like CountDownLatch, ThreadPoolExecutor, ForkJoin to write concurrent applications in a safer and more performant way compared to traditional locking approaches.
Search at Twitter: Presented by Michael Busch, Twitter
Twitter processes over 500 million tweets per day and more than 2 billion search queries per day. The company uses a search architecture based on Lucene with custom extensions. This includes an in-memory real-time index optimized for concurrency without locks, and a schema-based document factory. Future work includes support for parallel index segments and additional Lucene features.
The document discusses modern Java concurrency and provides examples of how to write concurrent code safely and take advantage of modern hardware. It introduces key concepts like the java.util.concurrent package, locks, conditions, concurrent data structures, executors and fork/join. Examples are provided for using constructs like CountDownLatch, LinkedBlockingQueue, thread pools and fork/join tasks. The overall message is that modern Java concurrency allows safer and faster concurrent programming compared to traditional approaches.
This document discusses concurrency and parallelism in Ruby. It defines concurrency as performing two operations in tandem, while parallelism refers to performing two operations literally at the same time using multiple cores. The document examines traditional approaches to concurrency like threads and locks in Ruby and their limitations. It advocates for adopting models from other languages like actors and software transactional memory that can provide safer concurrency through message passing and transactions rather than shared mutable state and locks. The document reviews several Ruby libraries that implement actors and proposes areas for further improvement in Ruby's core support for concurrent programming.
A short introduction to the more advanced python and programming in general. Intended for users that has already learned the basic coding skills but want to have a rapid tour of more in-depth capacities offered by Python and some general programming background.
Execrices are available at: https://github.com/chiffa/Intermediate_Python_programming
Ruby is a wonderful language for rapid development, it is easy to learn, we have wonderful frameworks, an active and dynamic community. But when it comes to concurrency Ruby is plagued with problems, controversies and urban legends. A lot of people would know about green threads in Ruby, GIL and its inherent limitations. But that it only one part of the big picture. Ruby offers much more than threads to helps us with concurrency.
This presentation explores other options of writing highly concurrent applications in Ruby and options available in it. We cover topics ranging from Actor like message passing concurrency in Ruby, dataflow concurrency of how we can coordinate across different threads, Event driven methods, coroutine based concurrency which never blocks ;) and finally Software Transactional Memory. We look at lots of code, some serious looking yet colorful performance graphs comparisons, and conditions at which each of these forms are concurrency are effective and ineffective.
Ruby is a wonderful language for rapid development, it is easy to learn, we have wonderful frameworks, an active and dynamic community. But when it comes to concurrency Ruby is plagued with problems, controversies and urban legends. A lot of people would know about green threads in Ruby, GIL and its inherent limitations. But that it only one part of the big picture. Ruby offers much more than threads to helps us with concurrency.
This presentation explores other options of writing highly concurrent applications in Ruby and options available in it. We cover topics ranging from Actor like message passing concurrency in Ruby, dataflow concurrency of how we can coordinate across different threads, Event driven methods, coroutine based concurrency which never blocks ;) and finally Software Transactional Memory. We look at lots of code, some serious looking yet colorful performance graphs comparisons, and conditions at which each of these forms are concurrency are effective and ineffective.
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
This document provides an introduction to Jupyter Notebook and Azure Machine Learning Studio. It discusses popular programming languages like Python, R, and Julia that can be used with these tools. It also summarizes key features of Jupyter Notebook like code cells, kernels, and cloud deployment. Examples are given of using Python and R with Azure ML to fetch and transform data in Jupyter notebooks.
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
This document provides an introduction to Jupyter Notebook and Azure Machine Learning Studio. It discusses popular programming languages like Python, R, and Julia that can be used with these tools. It also summarizes key features of Jupyter Notebook like code cells, kernels, and cloud deployment. Demo code examples are shown for integrating Python and R with Azure ML to fetch and transform data.
More information, visit: http://www.godatadriven.com/accelerator.html
Data scientists aren’t a nice-to-have anymore, they are a must-have. Businesses of all sizes are scooping up this new breed of engineering professional. But how do you find the right one for your business?
The Data Science Accelerator Program is a one year program, delivered in Amsterdam by world-class industry practitioners. It provides your aspiring data scientists with intensive on- and off-site instruction, access to an extensive network of speakers and mentors and coaching.
The Data Science Accelerator Program helps you assess and radically develop the skills of your data science staff or recruits.
Our goal is to deliver you excellent data scientists that help you become a data driven enterprise.
The right tools
We teach your organisation the proven data science tools.
The right hands
We are trusted by many industry leading partners.
The right experience
We've done big data and data science at many clients, we know what the real world is like.
The right experts
We have a world class selection of lecturers that you will be working with.
Vincent D. Warmerdam
Jonathan Samoocha
Ivo Everts
Rogier van der Geer
Ron van Weverwijk
Giovanni Lanzani
The right curriculum
We meet twice a month. Once for a lecture, once for a hackathon.
Lectures
The RStudio stack.
The art of simulation.
The iPython stack.
Linear modelling.
Operations research.
Nonlinear modelling.
Clustering & ensemble methods.
Natural language processing.
Time series.
Visualisation.
Scaling to big data.
Advanced topics.
Hackathons
Scrape and mine the internet.
Solving multiarmed bandit problems.
Webdev with flask and pandas as a backend.
Build an automation script for linear models.
Build a heuristic tsp solver.
Code review your automation for nonlinear models.
Build a method that outperforms random forests.
Build a markov chain to generate song lyrics.
Predict an optimal portfolio for the stock market.
Create an interactive d3 app with backend.
Start up a spark cluster with large s3 data.
You pick!
Interested?
Ping us here. signal@godatadriven.com
Blocks is a cool concept and is very much needed for performance improvements and responsiveness. GCD helps run blocks effortlessly by scheduling on a desired queue, priority and lots more.
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
The document discusses OpenCL for accelerating FPGA designs. It provides an overview of technology trends favoring parallelism and programmability. OpenCL is presented as a solution to bring FPGA design closer to software development by providing a standard programming model and faster compilation. The document describes how OpenCL maps to FPGAs by compiling kernels to hardware pipelines and discusses examples accelerated using OpenCL on FPGAs, including AES encryption, option pricing, document filtering, and video compression.
The ability of a system to respond gracefully to an unexpected hardware or software failure.
There are many levels of fault tolerance, the lowest being the ability to continue operation in the event of a power failure. Many fault-tolerant computer systems mirror all operations -- that is, every operation is performed on two or more duplicate systems, so if one fails the other can take over.
In most cases it could be achieved by redundancy in application design and set of patterns and approaches to software design.
East Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
This document discusses concurrency and parallelism techniques in Unreal Engine 4 (UE4). It covers synchronization primitives like atomics, locking, signaling, and waiting. It also discusses high level constructs like thread-safe containers and helpers. For parallelization, it discusses threading using runnables, task graphs, processes, and messaging. The goal is to provide tips for programming UE4 to take advantage of multiple CPU cores.
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Structured exception handling and defensive programming are the two pillars of robust software.
Both pillars fail however when it comes to handling internal faults, those that normally originate in software defects rather than in any external factors.
In this webinar, Zoran Horvat demonstrates advanced defensive coding techniques that can bring the quality of your code to an entirely new level.
Watch the webinar and learn:
When throwing an exception is the right thing to do
Why exceptions and defensive coding cannot be applied to recover from defects
How to handle situations when internal software defect is causing the fault
How to treat fault detection as an orthogonal concern to normal operation
The webinar recording can be found here:
http://www.postsharp.net/blog/post/webinar-recording-defensive-programming
Applying Object Composition to Build Rich Domain Models
Modern business applications rely heavily on rich domain classes, which in turn rely heavily on polymorphic execution, code reuse and similar concepts.
How can we extend rich domain classes to support complex requirements?
In this presentation, Zoran Horvat will show why an object composition approach is favored over class inheritance when it comes to code reuse and polymorphism.
The presentation covers:
How class inheritance can lead to combinatorial explosion of classes
What the limitations of object composition are
What design patterns help consume composed objects
Techniques for creating rich features on composed objects
Watch the webinar recording here: http://www.postsharp.net/blog/post/webinar-recording-object-composition
Starting with the premise that "Performance is a Feature", Matt Warren will show you how to measure, what to measure and how to get the best performance from your .NET code.
We will look at real-world examples from the Roslyn code-base and StackOverflow (the product), including how the .NET Garbage Collector needs to be tamed!
The presentation covers:
Why we should care about performance
Pitfalls to avoid when measuring performance
How the .NET Garbage Collector can hurt performance
Real-world performance lessons from open-source code
The webinar recording can be found here: http://www.postsharp.net/blog/post/webinar-recording-performance-is-a-feature
Building Better Architecture with UX-Driven Design
How do you avoid the dreaded "this is not what we asked for" and ensure customer satisfaction when building a new system?
In this webinar, Dino Esposito demonstrates a top-down methodology, sometimes mistaken for plain common sense and often boldly ignored, called UX-Driven Design (UXDD).
UXDD means coming to a visual agreement with customers by using wireframing tools to iterate on sketches of the new system before building it. Then, rather than building the system from the data model, you proceed in a top-down fashion instead. The resulting system may be slow or even inefficient but it will never be the “wrong” system! In addition, UXDD leads to clarity on a few of today’s most popular patterns that are sometimes difficult to understand like CQRS and Event Sourcing.
The presentation covers:
An introduction to Wireframing tools
Proven ways to save on post-first deployment costs
Insights into better customer relationships
Better focus on development without 'analysis paralysis'
You can watch the webinar recording here:
http://www.postsharp.net/blog/post/webinar-recording-ux-driven-design
Solving Localization Challenges with Design Pattern Automation
Localization is crucial for reaching out to a global audience, however, it’s often an afterthought for most developers and non-trivial to implement. Traditionally, game developers have outsourced this task due to its time consuming nature.
But it doesn’t have to be this way.
Yan Cui will show you a simple technique his team used at GameSys which allowed them to localize an entire story-driven, episodic MMORPG (with over 5000 items and 1500 quests) in under an hour of work and 50 lines of code, with the help of PostSharp.
A Basic Git intro presentation for SVN long timers doing their first steps in Git.
This presentation is meant to clear up most of the basic concepts which cause confusion with developers using Git as if it was an SVN.
Futures and Rx Observables: powerful abstractions for consuming web services ...Chris Richardson
A modular, polyglot architecture has many advantages but it also adds complexity since each incoming request typically fans out to multiple distributed services. For example, in an online store application the information on a product details page - description, price, recommendations, etc - comes from numerous services. To minimize response time and improve scalability, these services must be invoked concurrently. However, traditional concurrency mechanisms are low-level, painful to use and error-prone.
In this talk you will learn about some powerful yet easy to use abstractions for consuming web services asynchronously. We will compare the various implementations of futures that are available in Java, Scala and JavaScript. You will learn how to use reactive observables, which are asynchronous data streams, to access web services from both Java and JavaScript. We will describe how these mechanisms let you write asynchronous code in a very straightforward, declarative fashion.
Quarkus offers a great development experience. In this session, I’ll introduce you to the power of Quarkus Live Coding and tools that are useful to developers for debugging, deploying, and testing Quarkus applications.
This document provides an overview of developing a web application using Spring Boot that connects to a MySQL database. It discusses setting up the development environment, the benefits of Spring Boot, basic project structure, integrating Spring MVC and JPA/Hibernate for database access. Code examples and links are provided to help get started with a Spring Boot application that reads from a MySQL database and displays the employee data on a web page.
This document discusses several design patterns including Singleton, Observer, Delegation, Adapter, Facade, Immutable, Read-Only Interface, Proxy, and Factory. For each pattern, the document describes the context, problem, forces, and solution. The patterns provide reusable solutions to common programming problems by separating interfaces from implementations.
Rasheed Amir presents on Spring Boot. He discusses how Spring Boot aims to help developers build production-grade Spring applications quickly with minimal configuration. It provides default functionality for tasks like embedding servers and externalizing configuration. Spring Boot favors convention over configuration and aims to get developers started quickly with a single focus. It also exposes auto-configuration for common Spring and related technologies so that applications can take advantage of them without needing to explicitly configure them.
Spend some time working with OpenAPI and gRPC and you’ll notice that these two technologies have a lot in common. Both are open source efforts, both describe APIs, and both promise better experiences for API producers and consumers. So why do we need both? If we do, what value does each provide? What can each project learn from the other? We’ll bring the two together for a side-by-side comparison and pose answers to these and other questions about two API methodologies that will do much to influence the future of networked APIs.
This document discusses how to handle merge conflicts in Git version control. It begins by explaining that Git can automatically resolve most merge conflicts and that conflicts only occur locally on a user's machine. It then describes how a conflict happens when two people modify the same line of the same file differently. The document explains that a conflict is simply different versions of a file represented by funny letters. It advises understanding what caused the conflict by determining that two developers modified the same file and lines. Finally, it provides instructions for solving a conflict by editing the file, using a merge tool, or GUI client and then staging and committing the resolved changes.
This document provides an introduction to using Git and GitHub for version control of documents and collaboration. It explains the basic workflow of creating, editing, and saving files individually. It then introduces Git as a tool to track changes to documents over time, including who made each change and when. The document outlines setting up Git locally and using basic commands like commit, diff, log, branch, merge, and push/pull to the remote GitHub repository. It highlights key GitHub features like the profile page, repository page, pull requests, and hosting websites for free using GitHub Pages.
* What is different GitHub Flow and Git Flow?
* What is GitHub Actions?
* How to write the simple workflow?
* What's problem in GitHub Actions UI?
* What's problem with Secrets in GitHub Actions?
* How to write your first GitHub Actions and upload to the marketplace?
* What's a problem with environment variables in GitHub Actions?
An introduction to reactive programming concepts and basics. I aim here to show what's reactive programming, why it's used and show some frameworks and benchmarks that support it.
Java concurrency allows applications to make use of multiple processors and handle asynchronous operations through the use of threads. While concurrency provides benefits like improved performance, it also introduces risks like race conditions and deadlocks if threads access shared resources unsafely. The Java threading APIs provide tools for safely managing concurrent operations through mechanisms like synchronization, locks, and concurrent collections.
This document provides an overview of the Laravel PHP framework. It discusses Laravel's history and evolution from version 1 to the current version 5.3. Key Laravel concepts are explained such as routing, controllers, models, views, Artisan commands, and architectural changes in version 5 like the directory structure and environment detection. Additional Laravel tools and resources are also mentioned like Laravel Elixir, Homestead, and Laracasts.
This is very basic laravel presentation. I tried to cover all the topics in this presentation. For more information, please feel free to email me - toufiqist@gmail.com
Vert.x is a toolkit for building reactive microservices applications on the JVM. It uses the reactor pattern with a single-threaded event loop to avoid the C10K problem. Verticles are lightweight concurrent units that communicate asynchronously via an event bus. This allows building scalable and reactive microservices. Vert.x supports websockets, clustering, reactive programming with RxJava, and can be deployed to production environments like AWS. It also integrates with Spring for dependency injection and configuration.
Slides for a presentation given at the Go MN meetup https://www.meetup.com/golangmn/ given on 4/15/2020.
The associated code is available at https://github.com/andreburgaud/meetup-golang-lua. The topic is about the interoperability between Go and Lua, or Lua and Go.
A short introduction to a powerful Design by Contract technique and its implementation in ruby contracts.ruby.
Design by Contract allows one to do defensive programming in very elegant fashion, allows to set contracts on methods (expectations on input - arguments; and on output - return result) and invariants on classes. This allows to reason about code much much better.
Git is a free and open source distributed version control system that allows tracking changes to projects, enabling reversion to previous versions and collaboration. It runs locally, keeping track of file histories, and remote hosts like GitHub can be used to host projects and histories, enabling collaboration through pushing and pulling changes. Git provides functionality, performance, security and flexibility needed for both individual and team development.
The document discusses object-oriented programming (OOP) and functional programming (FP). It argues that OOP and FP are not opposites and can be effectively combined. It addresses common myths about FP, such as that it is new, hard, or only suitable for mathematical problems. The document also compares how OOP and FP approach concepts like decomposition, composition, error handling, and mutability/referential transparency. While both approaches have merits, the document concludes there is no single best approach and the choice depends on the problem and programmer preferences.
This document discusses design pattern automation and the use of pattern-aware compilers. It provides a history of programming languages and patterns, defines design pattern automation as using tools to optimize productivity in implementing software based on patterns. It discusses how pattern-oriented software development involves implementing patterns at multiple levels of abstraction. It also addresses myths around why patterns cannot be automated and argues that emerging design and agile methodologies allow patterns to naturally emerge from iterative design processes. An example of applying automation to the Reader-Writer pattern through code generation and verification is also provided.
Multicore processors are becoming prevalent due to the limitations of increasing single core clock speeds. This presents challenges for software to effectively utilize multiple cores. Functional programming is one option that avoids shared state and parallel access issues, but requires a significant mindset shift. Refactoring existing code using tools is another option to incrementally introduce parallelism. Hybrid approaches combining paradigms may also help transition. Key application areas currently benefiting include servers, scientific computing, and packet processing. However, significant existing code is not easily parallelized and performance gains have yet to be fully realized.
Игорь Фесенко "Direction of C# as a High-Performance Language"Fwdays
There are a lot of upcoming performance changes in .NET. Starting from code generation (JIT, AOT) and optimizations that can be performed by the compiler (inlining, flowgraph & loop analysis, dead code elimination, SIMD, stack allocation and so on). In this talk we will cover some features of C# 7 are going towards making low level optimization.
I will share not only how we can improve performance with the next version of .NET, but how we can do it today using different techniques and tools like Roslyn analyzers, Channels (Push based Streams), System.Slices, System.Buffers and System.Runtime.CompilerServices.Unsafe.
Everybody knows the lock keyword, but how does it implemented? What are its performance characteristics. Gael Fraiteur scratches the surface of multithreaded programming in .NET and goes deep through the Windows Kernel down to CPU microarchitecture.
Industry - Program analysis and verification - Type-preserving Heap Profiler ...ICSM 2011
Paper: Type-preserving Heap Profiler for C++
Authors: József Mihalicza, Zoltán Porkoláb and Ábel Gábor
Session: "Industry Track Session 4: Program analysis and Verification"
The document discusses modern Java concurrency. It introduces the topic and explains why developers may want to utilize modern Java concurrency features. It discusses the java.util.concurrent library and how it provides building blocks for concurrent and thread-safe code like ReentrantLock, Condition, ConcurrentHashMap. It provides examples of using constructs like CountDownLatch, ThreadPoolExecutor, ForkJoin to write concurrent applications in a safer and more performant way compared to traditional locking approaches.
Search at Twitter: Presented by Michael Busch, TwitterLucidworks
Twitter processes over 500 million tweets per day and more than 2 billion search queries per day. The company uses a search architecture based on Lucene with custom extensions. This includes an in-memory real-time index optimized for concurrency without locks, and a schema-based document factory. Future work includes support for parallel index segments and additional Lucene features.
The document discusses modern Java concurrency and provides examples of how to write concurrent code safely and take advantage of modern hardware. It introduces key concepts like the java.util.concurrent package, locks, conditions, concurrent data structures, executors and fork/join. Examples are provided for using constructs like CountDownLatch, LinkedBlockingQueue, thread pools and fork/join tasks. The overall message is that modern Java concurrency allows safer and faster concurrent programming compared to traditional approaches.
This document discusses concurrency and parallelism in Ruby. It defines concurrency as performing two operations in tandem, while parallelism refers to performing two operations literally at the same time using multiple cores. The document examines traditional approaches to concurrency like threads and locks in Ruby and their limitations. It advocates for adopting models from other languages like actors and software transactional memory that can provide safer concurrency through message passing and transactions rather than shared mutable state and locks. The document reviews several Ruby libraries that implement actors and proposes areas for further improvement in Ruby's core support for concurrent programming.
A short introduction to the more advanced python and programming in general. Intended for users that has already learned the basic coding skills but want to have a rapid tour of more in-depth capacities offered by Python and some general programming background.
Execrices are available at: https://github.com/chiffa/Intermediate_Python_programming
Ruby is a wonderful language for rapid development, it is easy to learn, we have wonderful frameworks, an active and dynamic community. But when it comes to concurrency Ruby is plagued with problems, controversies and urban legends. A lot of people would know about green threads in Ruby, GIL and its inherent limitations. But that it only one part of the big picture. Ruby offers much more than threads to helps us with concurrency.
This presentation explores other options of writing highly concurrent applications in Ruby and options available in it. We cover topics ranging from Actor like message passing concurrency in Ruby, dataflow concurrency of how we can coordinate across different threads, Event driven methods, coroutine based concurrency which never blocks ;) and finally Software Transactional Memory. We look at lots of code, some serious looking yet colorful performance graphs comparisons, and conditions at which each of these forms are concurrency are effective and ineffective.
Ruby is a wonderful language for rapid development, it is easy to learn, we have wonderful frameworks, an active and dynamic community. But when it comes to concurrency Ruby is plagued with problems, controversies and urban legends. A lot of people would know about green threads in Ruby, GIL and its inherent limitations. But that it only one part of the big picture. Ruby offers much more than threads to helps us with concurrency.
This presentation explores other options of writing highly concurrent applications in Ruby and options available in it. We cover topics ranging from Actor like message passing concurrency in Ruby, dataflow concurrency of how we can coordinate across different threads, Event driven methods, coroutine based concurrency which never blocks ;) and finally Software Transactional Memory. We look at lots of code, some serious looking yet colorful performance graphs comparisons, and conditions at which each of these forms are concurrency are effective and ineffective.
This document provides an introduction to Jupyter Notebook and Azure Machine Learning Studio. It discusses popular programming languages like Python, R, and Julia that can be used with these tools. It also summarizes key features of Jupyter Notebook like code cells, kernels, and cloud deployment. Examples are given of using Python and R with Azure ML to fetch and transform data in Jupyter notebooks.
This document provides an introduction to Jupyter Notebook and Azure Machine Learning Studio. It discusses popular programming languages like Python, R, and Julia that can be used with these tools. It also summarizes key features of Jupyter Notebook like code cells, kernels, and cloud deployment. Demo code examples are shown for integrating Python and R with Azure ML to fetch and transform data.
More information, visit: http://www.godatadriven.com/accelerator.html
Data scientists aren’t a nice-to-have anymore, they are a must-have. Businesses of all sizes are scooping up this new breed of engineering professional. But how do you find the right one for your business?
The Data Science Accelerator Program is a one year program, delivered in Amsterdam by world-class industry practitioners. It provides your aspiring data scientists with intensive on- and off-site instruction, access to an extensive network of speakers and mentors and coaching.
The Data Science Accelerator Program helps you assess and radically develop the skills of your data science staff or recruits.
Our goal is to deliver you excellent data scientists that help you become a data driven enterprise.
The right tools
We teach your organisation the proven data science tools.
The right hands
We are trusted by many industry leading partners.
The right experience
We've done big data and data science at many clients, we know what the real world is like.
The right experts
We have a world class selection of lecturers that you will be working with.
Vincent D. Warmerdam
Jonathan Samoocha
Ivo Everts
Rogier van der Geer
Ron van Weverwijk
Giovanni Lanzani
The right curriculum
We meet twice a month. Once for a lecture, once for a hackathon.
Lectures
The RStudio stack.
The art of simulation.
The iPython stack.
Linear modelling.
Operations research.
Nonlinear modelling.
Clustering & ensemble methods.
Natural language processing.
Time series.
Visualisation.
Scaling to big data.
Advanced topics.
Hackathons
Scrape and mine the internet.
Solving multiarmed bandit problems.
Webdev with flask and pandas as a backend.
Build an automation script for linear models.
Build a heuristic tsp solver.
Code review your automation for nonlinear models.
Build a method that outperforms random forests.
Build a markov chain to generate song lyrics.
Predict an optimal portfolio for the stock market.
Create an interactive d3 app with backend.
Start up a spark cluster with large s3 data.
You pick!
Interested?
Ping us here. signal@godatadriven.com
Blocks is a cool concept and is very much needed for performance improvements and responsiveness. GCD helps run blocks effortlessly by scheduling on a desired queue, priority and lots more.
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...chiportal
The document discusses OpenCL for accelerating FPGA designs. It provides an overview of technology trends favoring parallelism and programmability. OpenCL is presented as a solution to bring FPGA design closer to software development by providing a standard programming model and faster compilation. The document describes how OpenCL maps to FPGAs by compiling kernels to hardware pipelines and discusses examples accelerated using OpenCL on FPGAs, including AES encryption, option pricing, document filtering, and video compression.
The ability of a system to respond gracefully to an unexpected hardware or software failure.
There are many levels of fault tolerance, the lowest being the ability to continue operation in the event of a power failure. Many fault-tolerant computer systems mirror all operations -- that is, every operation is performed on two or more duplicate systems, so if one fails the other can take over.
In most cases it could be achieved by redundancy in application design and set of patterns and approaches to software design.
East Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...Gerke Max Preussner
This document discusses concurrency and parallelism techniques in Unreal Engine 4 (UE4). It covers synchronization primitives like atomics, locking, signaling, and waiting. It also discusses high level constructs like thread-safe containers and helpers. For parallelization, it discusses threading using runnables, task graphs, processes, and messaging. The goal is to provide tips for programming UE4 to take advantage of multiple CPU cores.
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)PostSharp Technologies
Structured exception handling and defensive programming are the two pillars of robust software.
Both pillars fail however when it comes to handling internal faults, those that normally originate in software defects rather than in any external factors.
In this webinar, Zoran Horvat demonstrates advanced defensive coding techniques that can bring the quality of your code to an entirely new level.
Watch the webinar and learn:
When throwing an exception is the right thing to do
Why exceptions and defensive coding cannot be applied to recover from defects
How to handle situations when internal software defect is causing the fault
How to treat fault detection as an orthogonal concern to normal operation
The webinar recording can be found here:
http://www.postsharp.net/blog/post/webinar-recording-defensive-programming
Modern business applications rely heavily on rich domain classes, which in turn rely heavily on polymorphic execution, code reuse and similar concepts.
How can we extend rich domain classes to support complex requirements?
In this presentation, Zoran Horvat will show why an object composition approach is favored over class inheritance when it comes to code reuse and polymorphism.
The presentation covers:
How class inheritance can lead to combinatorial explosion of classes
What the limitations of object composition are
What design patterns help consume composed objects
Techniques for creating rich features on composed objects
Watch the webinar recording here: http://www.postsharp.net/blog/post/webinar-recording-object-composition
Starting with the premise that "Performance is a Feature", Matt Warren will show you how to measure, what to measure and how to get the best performance from your .NET code.
We will look at real-world examples from the Roslyn code-base and StackOverflow (the product), including how the .NET Garbage Collector needs to be tamed!
The presentation covers:
Why we should care about performance
Pitfalls to avoid when measuring performance
How the .NET Garbage Collector can hurt performance
Real-world performance lessons from open-source code
The webinar recording can be found here: http://www.postsharp.net/blog/post/webinar-recording-performance-is-a-feature
How do you avoid the dreaded "this is not what we asked for" and ensure customer satisfaction when building a new system?
In this webinar, Dino Esposito demonstrates a top-down methodology, sometimes mistaken for plain common sense and often boldly ignored, called UX-Driven Design (UXDD).
UXDD means coming to a visual agreement with customers by using wireframing tools to iterate on sketches of the new system before building it. Then, rather than building the system from the data model, you proceed in a top-down fashion instead. The resulting system may be slow or even inefficient but it will never be the “wrong” system! In addition, UXDD leads to clarity on a few of today’s most popular patterns that are sometimes difficult to understand like CQRS and Event Sourcing.
The presentation covers:
An introduction to Wireframing tools
Proven ways to save on post-first deployment costs
Insights into better customer relationships
Better focus on development without 'analysis paralysis'
You can watch the webinar recording here:
http://www.postsharp.net/blog/post/webinar-recording-ux-driven-design
Localization is crucial for reaching out to a global audience, however, it’s often an afterthought for most developers and non-trivial to implement. Traditionally, game developers have outsourced this task due to its time consuming nature.
But it doesn’t have to be this way.
Yan Cui will show you a simple technique his team used at GameSys which allowed them to localize an entire story-driven, episodic MMORPG (with over 5000 items and 1500 quests) in under an hour of work and 50 lines of code, with the help of PostSharp.
When addressing website performance issues, developers typically jump to conclusions, focusing on the perceived causes rather than uncovering the real causes through research.
Mitchel Sellers will show you how to approach website performance issues with a level of consistency that ensures they're properly identified and resolved so you'll avoid jumping to conclusions in the future.
You can watch the webinar recording here:
https://www.postsharp.net/documentation/video?id=190066128
Developers spend up to 20% of their time writing repetitive code that machines could generate more reliably. This presentation explores the problem of duplicated source code that stems from manual implementation of patterns and reveals how to automate the boring side of programming and get a 19x ROI.
The presentation provides insight into:
- the problem of manual implementation of patterns, resulting in boilerplate code
- the cost of boilerplate for companies
- existing technologies for pattern automation
- the key reasons to consider pattern-aware compiler extensions
The white paper was written for CTOs, software architects and senior developers in software-driven organizations—specifically in financial, insurance, healthcare, energy and IT industries that typically write a lot of repetitive code.
This document introduces aspect-oriented programming (AOP) and how it can be used to separate cross-cutting concerns from core business logic. It discusses how AOP frameworks like PostSharp allow aspects to modularize features like logging, transactions, and security. The document provides an example of how a rental booking method grows over time to include these concerns. It compares different AOP frameworks and concludes that PostSharp allows building aspects with strong robustness while minimizing code invasiveness.
Quality Patents: Patents That Stand the Test of TimeAurora Consulting
Is your patent a vanity piece of paper for your office wall? Or is it a reliable, defendable, assertable, property right? The difference is often quality.
Is your patent simply a transactional cost and a large pile of legal bills for your startup? Or is it a leverageable asset worthy of attracting precious investment dollars, worth its cost in multiples of valuation? The difference is often quality.
Is your patent application only good enough to get through the examination process? Or has it been crafted to stand the tests of time and varied audiences if you later need to assert that document against an infringer, find yourself litigating with it in an Article 3 Court at the hands of a judge and jury, God forbid, end up having to defend its validity at the PTAB, or even needing to use it to block pirated imports at the International Trade Commission? The difference is often quality.
Quality will be our focus for a good chunk of the remainder of this season. What goes into a quality patent, and where possible, how do you get it without breaking the bank?
** Episode Overview **
In this first episode of our quality series, Kristen Hansen and the panel discuss:
⦿ What do we mean when we say patent quality?
⦿ Why is patent quality important?
⦿ How to balance quality and budget
⦿ The importance of searching, continuations, and draftsperson domain expertise
⦿ Very practical tips, tricks, examples, and Kristen’s Musts for drafting quality applications
https://www.aurorapatents.com/patently-strategic-podcast.html
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 :
- Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants.
- REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsMydbops
This presentation, delivered at the Postgres Bangalore (PGBLR) Meetup-2 on June 29th, 2024, dives deep into connection pooling for PostgreSQL databases. Aakash M, a PostgreSQL Tech Lead at Mydbops, explores the challenges of managing numerous connections and explains how connection pooling optimizes performance and resource utilization.
Key Takeaways:
* Understand why connection pooling is essential for high-traffic applications
* Explore various connection poolers available for PostgreSQL, including pgbouncer
* Learn the configuration options and functionalities of pgbouncer
* Discover best practices for monitoring and troubleshooting connection pooling setups
* Gain insights into real-world use cases and considerations for production environments
This presentation is ideal for:
* Database administrators (DBAs)
* Developers working with PostgreSQL
* DevOps engineers
* Anyone interested in optimizing PostgreSQL performance
Contact info@mydbops.com for PostgreSQL Managed, Consulting and Remote DBA Services
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
How RPA Help in the Transportation and Logistics Industry.pptxSynapseIndia
Revolutionize your transportation processes with our cutting-edge RPA software. Automate repetitive tasks, reduce costs, and enhance efficiency in the logistics sector with our advanced solutions.
Choose our Linux Web Hosting for a seamless and successful online presencerajancomputerfbd
Our Linux Web Hosting plans offer unbeatable performance, security, and scalability, ensuring your website runs smoothly and efficiently.
Visit- https://onliveserver.com/linux-web-hosting/
Measuring the Impact of Network Latency at TwitterScyllaDB
Widya Salim and Victor Ma will outline the causal impact analysis, framework, and key learnings used to quantify the impact of reducing Twitter's network latency.
YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS
WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well.
Some facts about WPRiders and why we are one of the best firms around:
More than 700 five-star reviews! You can check them here.
1500 WordPress projects delivered.
We respond 80% faster than other firms! Data provided by Freshdesk.
We’ve been in business since 2015.
We are located in 7 countries and have 22 team members.
With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce.
Our team members are:
- highly experienced developers (employees & contractors with 5 -10+ years of experience),
- great designers with an eye for UX/UI with 10+ years of experience
- project managers with development background who speak both tech and non-tech
- QA specialists
- Conversion Rate Optimisation - CRO experts
They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals.
At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfNeo4j
Presented at Gartner Data & Analytics, London Maty 2024. BT Group has used the Neo4j Graph Database to enable impressive digital transformation programs over the last 6 years. By re-imagining their operational support systems to adopt self-serve and data lead principles they have substantially reduced the number of applications and complexity of their operations. The result has been a substantial reduction in risk and costs while improving time to value, innovation, and process automation. Join this session to hear their story, the lessons they learned along the way and how their future innovation plans include the exploration of uses of EKG + Generative AI.
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
Mitigating the Impact of State Management in Cloud Stream Processing SystemsScyllaDB
Stream processing is a crucial component of modern data infrastructure, but constructing an efficient and scalable stream processing system can be challenging. Decoupling compute and storage architecture has emerged as an effective solution to these challenges, but it can introduce high latency issues, especially when dealing with complex continuous queries that necessitate managing extra-large internal states.
In this talk, we focus on addressing the high latency issues associated with S3 storage in stream processing systems that employ a decoupled compute and storage architecture. We delve into the root causes of latency in this context and explore various techniques to minimize the impact of S3 latency on stream processing performance. Our proposed approach is to implement a tiered storage mechanism that leverages a blend of high-performance and low-cost storage tiers to reduce data movement between the compute and storage layers while maintaining efficient processing.
Throughout the talk, we will present experimental results that demonstrate the effectiveness of our approach in mitigating the impact of S3 latency on stream processing. By the end of the talk, attendees will have gained insights into how to optimize their stream processing systems for reduced latency and improved cost-efficiency.
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Erasmo Purificato
Slide of the tutorial entitled "Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Emerging Trends" held at UMAP'24: 32nd ACM Conference on User Modeling, Adaptation and Personalization (July 1, 2024 | Cagliari, Italy)
Best Practices for Effectively Running dbt in Airflow.pdfTatiana Al-Chueyr
As a popular open-source library for analytics engineering, dbt is often used in combination with Airflow. Orchestrating and executing dbt models as DAGs ensures an additional layer of control over tasks, observability, and provides a reliable, scalable environment to run dbt models.
This webinar will cover a step-by-step guide to Cosmos, an open source package from Astronomer that helps you easily run your dbt Core projects as Airflow DAGs and Task Groups, all with just a few lines of code. We’ll walk through:
- Standard ways of running dbt (and when to utilize other methods)
- How Cosmos can be used to run and visualize your dbt projects in Airflow
- Common challenges and how to address them, including performance, dependency conflicts, and more
- How running dbt projects in Airflow helps with cost optimization
Webinar given on 9 July 2024
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
11. @gfraiteur
The new invention caught quickly, no wonder, programs
computing nuclear power reactor parameters took now
HOURS INSTEAD OF WEEKS
to write, and required much
LESS PROGRAMMING SKILL
12. @gfraiteur
1. The Memory Management Revolution
2. Models and Patterns
3. Defining Threading Models
4. Designing with Threading Models
5. A Few Threading Models
6. Q&A
7. Summary
Section
16. @gfraiteur
Languages let us express
ourselves against a model
Thing Concept Word
Model Language
∞ 1
World
abstracted into expressed with
∞ ∞
1 1
∞
1
1 1
abstracted into expressed with
17. @gfraiteur
Good Models are Easy
• Allow for succinct expression of intent (semantics), with less
focus on implementation details
• less work
• fewer things to think about
• Allow for extensive validation of source code against the model
• early detection of errors
• Allow for better locality and separation of concerns
• “everything is related to everything” no more
• Are deterministic
• no random error
18. @gfraiteur
Good Models are Friendly
• to human mind structure
• cope with limited human cognitive abilities
• to social organization
• cope with skillset differences, division of labor,
time dimension, changes in requirements
19. @gfraiteur
The Classic Programming Model
Quality Realization
Succinct semantics • Concept of subroutine
• Unified concept of variable
(global, local, parameters, fields)
Validation • Syntactic (spelling)
• Semantic (type analysis)
• Advanced (data flow analysis)
Locality • Information hiding (member visibility)
• Modularity
Determinism • Total (uninterrupted single-threaded program)
20. @gfraiteur
1. The Memory Management Revolution
2. Models and Patterns
3.Defining Threading Models
4. Designing with Threading Models
5. A Few Threading Models
6. Q&A
7. Summary
Section
21. @gfraiteur
Why we need threading models
• Multithreading is way too hard – today
• Too many things to think about
• Too many side effects
• Random data races
• Your colleagues won’t get smarter
• Increased demand – end of free lunch
23. @gfraiteur
The Root of All Evil
Access to Shared Mutable State
• Memory ordering
• Atomicity / transactions
• Typical damage: data races
• Corruption of data structures
• Invalid states
27. @gfraiteur
"Problems cannot be solved by
the same level of thinking that
created them."
(and you’re not a man if you haven’t cited Albert Einstein)
32. @gfraiteur
Assign threading models
to types
1. Every class must be assigned a threading model.
2. Define aggregates with appropriate granularity.
1.
37. @gfraiteur
Freezable Pattern
1. Implement interface IFreezable
Freeze() must propagate to
children objects.
2. Before any non-const method, throw exception if
object is frozen.
3. Call the Freeze method after any initialization.
39. @gfraiteur
Thread Exclusivity Strategies
• Exclusivity Policies:
• Thread Affinity (e.g. GUI objects)
• Instance-Level Exclusivity (e.g. most .NET objects)
• Type-Level Exclusivity
• Concurrency Behavior:
• Fail with exception
• Wait with a lock
40. @gfraiteur
Implementing
Thread Affine Objects
• Remember current thread in constructor
• Verify current thread in any public method
• Prevent field access from outside current instance
• Only private/protected fields
• Only accessed in “this.field”
41. @gfraiteur
Implementing Thread Excluse
Objects
• Acquire lock before any public method
• Wait/throw if it cannot be acquired
• Prevent field access from outside current instance
• Only private/protected fields
• Only accessed in “this.field”
• Note: “Throw” behavior is non-deterministic
48. @gfraiteur
• with compiler support:
• Erlang,
• F# Mailbox
• PostSharp
• without compiler
support:
• NAct
• ActorFX
Actor implementations
49. @gfraiteur
Verifying the Actor Model
• Public methods will be made async
• Parameters and return values
of public methods must be thread-safe
• Methods with return value must be async
• Prevent field access from outside current instance
• Only private/protected fields
• Only accessed in “this.field”
53. @gfraiteur
Reader-Writer Synchronized
• 1 lock per [group of] objects
• e.g. invoice and invoice lines share the same lock
• Most public methods require locks:
Method Required Lock Level
Reads 1 piece of state None
Reads 2 pieces of state Read
Writes 1 piece of state Write
Reads large amount of state,
then writes state
Upgradeable Read, then
Write
55. @gfraiteur
Transactions
• Isolate shared state into thread-specific storage
• Commit/Rollback semantics
• Platform ensures ACID properties:
• Atomicity, Consistency, Isolation, (Durability)
• Type of concurrency policies
• Pessimistic (lock-based: several “isolation levels”
available)
• Optimistic (lock-free, retry-based)
As far as I'm concerned, I prefer silent vice
to ostentatious virtue. Albert Einstein“
57. @gfraiteur
Summary
• Repeat the memory management
success with the multicore issue.
• Models decrease complexity to
a cognitively bearable level.
• We need compilers that allow
us to use our own models
and patterns.
BETTER SOFTWARE THROUGH SIMPLER CODE
Editor's Notes
Good morning! My name is Gael Fraiteur. If you think I have a weird accent and even think I am French, but actually I was grown in Belgium and have lived in Czech Republic for the last 12 years.I have been programming non-stop since age of 11, building my first useful program at 12 – it was still reported in use when I got married. My father has been involved with IT in most of his career and my grandfather was probably one of the first programmers in Belgium.(connect to the audience)My grandfather had a PhD in meteorology. He was involved in early weather prediction computing. It’s always fun to talk with him about these heroic times of computing. By far, the rarest resource was working memory (RAM). They had just a few kilobytes of it, and it has to contain the data and the program. Of course they wrote their code in assembly because the single very optimization was importance.Also, they were moving data between RAM and disk back and forth. Of course we’re still doing that when we need to work with dataset that exceed a few GBs. But even doing that was not enough to keep under the 4KB limit, so they also dynamically loaded and unloaded parts of the program – just to save a few hundred bytes. We’re still doing that today but this is transparent to the application programmer thanks to the concept of virtual memory. Virtual memory is an abstraction layer that hides implementation details. There are other abstraction layers: the operating system, the CLR, the programming languages, and the frameworks. All these layers ultimately allow us to write code at a high level of abstraction, without bothering of implementation details.So, there has been this amazing evolution in sixty years. Most of us here are the third generation of programmers. Our predecessors did a marvelous job. What are our today’s challenges and what will be our contribution? Twenty years from now, will our successors laugh at us, consider our current programming languages as mere evolutions of the assembly language, and most of our code as technical wiring that will then be done automatically by “the machine”? I hope so, I hope our generation will be able to make a difference.Today’s challenge is no longer scarce resources, but multithreading. I think this is the number-one problem that our generation needs to tackle. And I think we should get inspiration from our predecessors: how did they succeed with the memory management problem? What are the lessons we can apply today? In this talk, I will argue that we should once again raise the level of abstraction and, this time, we should investigate how programming languages and compilers could allow for a better use of design patterns – or threading models, in this case.Nine years ago, I started working on an open-source project named PostSharp. Essentially, PostSharp allows developers to write custom attributes that extend the language, because PostSharp post-processes the compiler’s output at build time. Most examples in this talk are written in PostSharp, but this talk is more conceptual than practical, so examples are not a big deal of it.
Three years ago, PostSharp outgrew my capacity to maintain it as a free open-source project and, out of necessity, became a commercial product. In an industry dominated by open source and big platform vendors, to make a living from development tools is extraordinarily difficult. We at PostSharp Technologies have been fortunate enough to succeed in this endeavor. We are grateful for the trust we receive from our customers – from the one-man shop to the largest corporations.This remark should also serve as a disclaimer that this talk shall undoubted be biased by my very source of revenues.However, my commitment to you in this talk is to share the vision which motivates us day after day. This vision is much larger than our product itself, and you can implement it with other tools, perhaps less appropriate – and, hopefully we will be able to spark an idea that will influence the design of future language and compilers.
UNIVAC1 control station
Mercury delay line memory of UNIVAC 1 (1951) approx. 13 KBhttp://univac1.0catch.com/#b218 channels, each 10 words of 12 6-bit characters http://en.wikipedia.org/wiki/File:Mercury_memory.jpg
Programming for the UNIVAC FAC-TRONIC system, 1935 by Remington Rand inchttp://bitsavers.informatik.uni-stuttgart.de/pdf/univac/univac1/UNIVAC_Programming_Jan53.pdf
http://www.thefreewallpapers.com/wp-content/uploads/2011/06/Tree-in-nature.jpgNow that even mobile phones have multiple cores, it is no longer original to repeat that the free lunch is over and that software developers must embrace multithreaded programming. Although this is much more complex than single-threaded programming, there’s little chance that software developers are going to get smarter – I mean that our cognitive abilities are not likely to increase so much. Investments in training and other skill improvement are necessary but are not going to bring the order-of-magnitude improvement we need to face tomorrow’s growing challenge. Instead, I believe we should focus breaking down complexity – that is, to it easier to write good software.The software industry faced a similar challenge sixty years ago with memory management, and we should look at how our predecessors tackled the problem. What they did is to define a memory model that was close to the way we humans think, and to build compiler to translate code expressed against this model into code that can be executed by the machine. That is, the first programming languages addressed complexity by raising the abstraction level. We need to repeat this success with multithreading. That is, we need to be able to build code against threading models (or threading patterns), and the compiler or runtime environment should be smart enough to perform deterministic validation of our code.Moreover, I think we need compilers that allow us to define our own models and design patterns. Not only for multithreading, but for any other concern. In an ideal world, humans should tell the machines what needs to be done and not how to do it. In an ideal world, source code should not be significantly more difficult or larger than the description of a solution in natural language.With PostSharp, we are proud to contribute to this v