Kotlin is a language that is rapidly gaining popularity, among others thanks to cooperation with Java. On the other hand, RxJava has brought us many solutions to problems related to asynchronous code. If everything is so cool, do we need anything else in the Kotlin world? Is Kotlin Coroutine a competition for RxJava?
droidcon Transylvania - Kotlin CoroutinesArthur Nagy
We face challenges with threading on a daily basis. There are too many ways to do it, too many options. Do I use an AsyncTaks, a Runnable or RxJava, what do I do? All these available APIs lead to an almost inevitable callback hell.
This talk will introduce Kotlin Coroutines as an alternative solution to this problem. We’re going to explore simple ways to perform long-running tasks and computation heavy operations in an asynchronous way, without freezing or crashing your app, while keeping the code clean and readable at the same time.
The document summarizes the current state of coroutines in Kotlin. Coroutines allow writing asynchronous, non-blocking code in a sequential style by suspending execution until operations complete. Key features include launch and async for starting coroutines, channels for communication, actors for message processing, and integration with frameworks like RxJava. Coroutines are ready for production use but still experimental to allow API changes in future versions.
The JVM JIT compiler and deoptimizer are triggered under certain conditions like method invocation counts, changes in program behavior, and hot spots. The JIT initially compiles code to generate fast machine instructions while the deoptimizer reverts back to interpreted execution if needed.
This document provides an overview of the Go programming language including:
- A brief history of Go from its origins at Google in 2007 to current widespread usage.
- Key features of Go like functions, structs, interfaces, methods, slices, pointers, go-routines and channels.
- Examples of basic Go code demonstrating functions, structs, methods, interfaces, concurrency with go-routines and channels.
- Discussion of things missing from Go like classes, generics and exceptions.
- Quotes from developers commenting both positively and negatively on Go's simplicity and tradeoffs.
- Links to further resources like the Go tour to learn more.
REX about JavaFX8 used in SlideshowFX. This presentation covers concept from JavaFX as well as technologies like OSGi, Vert.x, LeapMotion, nashorn and friends in order to make them communicate inside one application developed in JavaFX.
This presentation was made at the ElsassJUG
sizeof(Object): how much memory objects take on JVMs and when this may matterDawid Weiss
The object header contains metadata such as the identity hash, mark, and klass. Hexdumping the memory of a simple object before and after getting the identity hash shows the hash being written to the header. On 64-bit JVMs, the header is 8 bytes, containing unused space, hash, and mark fields. On 32-bit JVMs, the header is 4 bytes, with the hash overwriting unused space after being set.
droidcon Transylvania - Kotlin CoroutinesArthur Nagy
We face challenges with threading on a daily basis. There are too many ways to do it, too many options. Do I use an AsyncTaks, a Runnable or RxJava, what do I do? All these available APIs lead to an almost inevitable callback hell.
This talk will introduce Kotlin Coroutines as an alternative solution to this problem. We’re going to explore simple ways to perform long-running tasks and computation heavy operations in an asynchronous way, without freezing or crashing your app, while keeping the code clean and readable at the same time.
The document summarizes the current state of coroutines in Kotlin. Coroutines allow writing asynchronous, non-blocking code in a sequential style by suspending execution until operations complete. Key features include launch and async for starting coroutines, channels for communication, actors for message processing, and integration with frameworks like RxJava. Coroutines are ready for production use but still experimental to allow API changes in future versions.
The JVM JIT compiler and deoptimizer are triggered under certain conditions like method invocation counts, changes in program behavior, and hot spots. The JIT initially compiles code to generate fast machine instructions while the deoptimizer reverts back to interpreted execution if needed.
This document provides an overview of the Go programming language including:
- A brief history of Go from its origins at Google in 2007 to current widespread usage.
- Key features of Go like functions, structs, interfaces, methods, slices, pointers, go-routines and channels.
- Examples of basic Go code demonstrating functions, structs, methods, interfaces, concurrency with go-routines and channels.
- Discussion of things missing from Go like classes, generics and exceptions.
- Quotes from developers commenting both positively and negatively on Go's simplicity and tradeoffs.
- Links to further resources like the Go tour to learn more.
REX about JavaFX8 used in SlideshowFX. This presentation covers concept from JavaFX as well as technologies like OSGi, Vert.x, LeapMotion, nashorn and friends in order to make them communicate inside one application developed in JavaFX.
This presentation was made at the ElsassJUG
sizeof(Object): how much memory objects take on JVMs and when this may matterDawid Weiss
The object header contains metadata such as the identity hash, mark, and klass. Hexdumping the memory of a simple object before and after getting the identity hash shows the hash being written to the header. On 64-bit JVMs, the header is 8 bytes, containing unused space, hash, and mark fields. On 32-bit JVMs, the header is 4 bytes, with the hash overwriting unused space after being set.
This document discusses multithreaded and asynchronous programming in C# and file I/O. It covers delegates and how they allow invoking methods asynchronously on separate threads. It also discusses the Threading namespace which provides classes for creating and managing threads like Thread, ThreadStart, and Timer. The document shows examples of getting thread information, passing parameters to threads, locking for thread safety, and using the Dispatcher class to update the UI from a non-UI thread.
~10min dive to Python Asynchronous IO
HTML version (recommended): https://dl.dropboxusercontent.com/u/1565687/speak/Python3%20AsyncIO%20Horizon/index.html
Making Java more dynamic: runtime code generation for the JVMRafael Winterhalter
While Java’s strict type system is a great help for avoiding programming errors, it also takes away some of the flexibility that developers appreciate when using dynamic languages. By using runtime code generation, it is possible to bring some of this flexibility back to the Java virtual machine. For this reason, runtime code generation is widely used by many state-of-the-art Java frameworks for implementing POJO-centric APIs but it also opens the door to assembling more modular applications. This presentation offers an introduction to the complex of runtime code generation and its use on the Java platform. Furthermore, it discusses the up- and downsides of several code generation libraries such as ASM, Javassist, cglib and Byte Buddy.
What is a Coroutine in Kotlin? Which are the differences with threads? What is collaborative concurrency? Have a look at these slides and at the companion Github repository https://github.com/f-lombardo/kotlin-from-scratch
This document provides instructions for using a web page to play YouTube videos in a random, continuous playlist. It includes:
1) Directions to download and view the web page files in a browser.
2) An explanation of the web page's functions like playing all videos, adding new videos, and saving an updated playlist.
3) An overview of the programming and JavaScript functions used to retrieve video data and play videos randomly.
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014Fantix King 王川
This document discusses Python asynchronous concurrency frameworks and their future. It compares Twisted, Tornado, Gevent, and the new asyncio module. Twisted and Tornado use callbacks while Gevent uses greenlets. asyncio aims to provide an event loop like Twisted. It also introduces coroutines, tasks, and futures. The document argues that asyncio could serve as a common event loop that existing frameworks adapt to for better interoperability in the future.
Carol McDonald gave a presentation on Java concurrency utilities introduced in J2SE 5.0. She discussed motivation for improved concurrency tools, common concurrency issues, and key utilities like Executor framework, locks, synchronizers, and concurrent collections. The utilities make concurrent programming easier and improve performance of multithreaded Java applications.
The document contains code for an image processing program that:
1) Loads a series of images from a file into memory and analyzes frame differences to determine scene changes.
2) Applies frame transformations to adjust for motion between images.
3) Generates a reduced set of frames to display by selecting key frames around detected scene changes.
The program analyzes histograms, motion vectors, and color differences between frames to evaluate scene changes and filter out unnecessary frames.
Oxygine 2 d objects,events,debug and resourcescorehard_by
Доклад будет посвящен созданию/удалению и взаимодействию игровых объектах, о стандартных и кастомизированных смартпоинтерах. Какими вещами пользоваться чтобы получить debug информацию о том что происходит в игре. Будут приведены примеры шаблонов игрового проектирования. Несколько слов о интересных редакторах игровых ресурсов: MapEditor.com, Astralax.ru
This document summarizes new features and enhancements in Java 7 including Project Coin, NIO.2, invokedynamic, Fork/Join framework, and concurrency utilities. It discusses how these features make threads, parallelism, and concurrency easier to work with in Java. Code examples are provided to illustrate the use of ForkJoinPool, Callable, and try-with-resources statements.
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...julien.ponge
The document discusses new features in Java SE 7 including the Fork/Join framework for parallel programming, language evolutions through Project Coin such as try-with-resources statements, and diamond syntax for generic types which simplifies generic class instance creation. It also covers varargs syntax simplification and restrictions on using diamond syntax with anonymous inner classes.
This document discusses common concurrency problems in Java and how to address them. It covers issues that can arise from shared mutable data being accessed without proper synchronization between threads, as well as problems related to visibility and atomicity of operations. Specific problems covered include mutable statics, double-checked locking, volatile arrays, and non-atomic operations like incrementing a long. The document provides best practices for locking, wait/notify, thread coordination, and avoiding deadlocks, spin locks, and lock contention.
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch
Julien Ponge
This talk introduces part of the Java SE 7 novelties. The fork/join framework aims at making parallel programming simpler, while Project Coin brings a set of subtle yet useful changes to the Java programming language.
http://soft-shake.ch/2011/conference/sessions/java/2011/09/06/java7.html
The document discusses concurrency programming in Java. It covers the scope of concurrency including multi-threading, multi-core, and distributed systems. It then discusses key aspects of concurrency programming like shared data/coordination for correctness and performance. It provides examples of thread-safety issues and how to address them using locks, volatile fields, and final fields to safely publish objects between threads.
The document discusses common concurrency problems in Java like shared mutable state, visibility issues, inconsistent synchronization, and unsafe publication and provides examples of how to properly implement threading concepts like locking, waiting and notifying with synchronization, volatile variables, atomic classes and safe initialization techniques to avoid concurrency bugs. It also cautions against unsafe practices like synchronizing on the wrong objects or misusing threading methods that can lead to deadlocks, race conditions and other concurrency problems.
This document summarizes an introductory talk on the asyncio module in Python. It discusses the main components of asyncio including:
- The event loop which acts as an implicit scheduler, putting callbacks in a queue to be run.
- Coroutines, futures and tasks - coroutines are generator functions used for asynchronous code, futures represent values that aren't available yet, and tasks run coroutines in the background.
- Transports, protocols and streams which provide different I/O handling mechanisms like readiness and completion styles on Unix and Windows.
- The event loop architecture which involves calculating timeouts, polling for I/O, processing events and timers, and running pending callbacks in a loop.
This document provides examples of using coroutines in Kotlin for asynchronous programming. It shows how to launch coroutines concurrently using async, examples of suspending functions like delay to pause coroutine execution, and how to control coroutine dispatching using contexts like Dispatchers.Default to dispatch to thread pools. The examples demonstrate basic coroutine usage, integrating coroutines with Retrofit for asynchronous network calls, and how structured concurrency helps organize coroutine code.
Kotlin Coroutines allow for writing asynchronous non-blocking code using coroutines and suspending functions. Key features include cooperative multitasking on a single thread, using coroutines instead of threads, and dispatchers to control coroutine execution. Examples demonstrate loading data asynchronously for UI, updating multiple objects concurrently using coroutines, and checking server validity in a non-blocking suspending function.
This document discusses multithreaded and asynchronous programming in C# and file I/O. It covers delegates and how they allow invoking methods asynchronously on separate threads. It also discusses the Threading namespace which provides classes for creating and managing threads like Thread, ThreadStart, and Timer. The document shows examples of getting thread information, passing parameters to threads, locking for thread safety, and using the Dispatcher class to update the UI from a non-UI thread.
~10min dive to Python Asynchronous IO
HTML version (recommended): https://dl.dropboxusercontent.com/u/1565687/speak/Python3%20AsyncIO%20Horizon/index.html
Making Java more dynamic: runtime code generation for the JVMRafael Winterhalter
While Java’s strict type system is a great help for avoiding programming errors, it also takes away some of the flexibility that developers appreciate when using dynamic languages. By using runtime code generation, it is possible to bring some of this flexibility back to the Java virtual machine. For this reason, runtime code generation is widely used by many state-of-the-art Java frameworks for implementing POJO-centric APIs but it also opens the door to assembling more modular applications. This presentation offers an introduction to the complex of runtime code generation and its use on the Java platform. Furthermore, it discusses the up- and downsides of several code generation libraries such as ASM, Javassist, cglib and Byte Buddy.
What is a Coroutine in Kotlin? Which are the differences with threads? What is collaborative concurrency? Have a look at these slides and at the companion Github repository https://github.com/f-lombardo/kotlin-from-scratch
This document provides instructions for using a web page to play YouTube videos in a random, continuous playlist. It includes:
1) Directions to download and view the web page files in a browser.
2) An explanation of the web page's functions like playing all videos, adding new videos, and saving an updated playlist.
3) An overview of the programming and JavaScript functions used to retrieve video data and play videos randomly.
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014Fantix King 王川
This document discusses Python asynchronous concurrency frameworks and their future. It compares Twisted, Tornado, Gevent, and the new asyncio module. Twisted and Tornado use callbacks while Gevent uses greenlets. asyncio aims to provide an event loop like Twisted. It also introduces coroutines, tasks, and futures. The document argues that asyncio could serve as a common event loop that existing frameworks adapt to for better interoperability in the future.
Carol McDonald gave a presentation on Java concurrency utilities introduced in J2SE 5.0. She discussed motivation for improved concurrency tools, common concurrency issues, and key utilities like Executor framework, locks, synchronizers, and concurrent collections. The utilities make concurrent programming easier and improve performance of multithreaded Java applications.
The document contains code for an image processing program that:
1) Loads a series of images from a file into memory and analyzes frame differences to determine scene changes.
2) Applies frame transformations to adjust for motion between images.
3) Generates a reduced set of frames to display by selecting key frames around detected scene changes.
The program analyzes histograms, motion vectors, and color differences between frames to evaluate scene changes and filter out unnecessary frames.
Oxygine 2 d objects,events,debug and resourcescorehard_by
Доклад будет посвящен созданию/удалению и взаимодействию игровых объектах, о стандартных и кастомизированных смартпоинтерах. Какими вещами пользоваться чтобы получить debug информацию о том что происходит в игре. Будут приведены примеры шаблонов игрового проектирования. Несколько слов о интересных редакторах игровых ресурсов: MapEditor.com, Astralax.ru
This document summarizes new features and enhancements in Java 7 including Project Coin, NIO.2, invokedynamic, Fork/Join framework, and concurrency utilities. It discusses how these features make threads, parallelism, and concurrency easier to work with in Java. Code examples are provided to illustrate the use of ForkJoinPool, Callable, and try-with-resources statements.
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...julien.ponge
The document discusses new features in Java SE 7 including the Fork/Join framework for parallel programming, language evolutions through Project Coin such as try-with-resources statements, and diamond syntax for generic types which simplifies generic class instance creation. It also covers varargs syntax simplification and restrictions on using diamond syntax with anonymous inner classes.
This document discusses common concurrency problems in Java and how to address them. It covers issues that can arise from shared mutable data being accessed without proper synchronization between threads, as well as problems related to visibility and atomicity of operations. Specific problems covered include mutable statics, double-checked locking, volatile arrays, and non-atomic operations like incrementing a long. The document provides best practices for locking, wait/notify, thread coordination, and avoiding deadlocks, spin locks, and lock contention.
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch
Julien Ponge
This talk introduces part of the Java SE 7 novelties. The fork/join framework aims at making parallel programming simpler, while Project Coin brings a set of subtle yet useful changes to the Java programming language.
http://soft-shake.ch/2011/conference/sessions/java/2011/09/06/java7.html
The document discusses concurrency programming in Java. It covers the scope of concurrency including multi-threading, multi-core, and distributed systems. It then discusses key aspects of concurrency programming like shared data/coordination for correctness and performance. It provides examples of thread-safety issues and how to address them using locks, volatile fields, and final fields to safely publish objects between threads.
The document discusses common concurrency problems in Java like shared mutable state, visibility issues, inconsistent synchronization, and unsafe publication and provides examples of how to properly implement threading concepts like locking, waiting and notifying with synchronization, volatile variables, atomic classes and safe initialization techniques to avoid concurrency bugs. It also cautions against unsafe practices like synchronizing on the wrong objects or misusing threading methods that can lead to deadlocks, race conditions and other concurrency problems.
This document summarizes an introductory talk on the asyncio module in Python. It discusses the main components of asyncio including:
- The event loop which acts as an implicit scheduler, putting callbacks in a queue to be run.
- Coroutines, futures and tasks - coroutines are generator functions used for asynchronous code, futures represent values that aren't available yet, and tasks run coroutines in the background.
- Transports, protocols and streams which provide different I/O handling mechanisms like readiness and completion styles on Unix and Windows.
- The event loop architecture which involves calculating timeouts, polling for I/O, processing events and timers, and running pending callbacks in a loop.
This document provides examples of using coroutines in Kotlin for asynchronous programming. It shows how to launch coroutines concurrently using async, examples of suspending functions like delay to pause coroutine execution, and how to control coroutine dispatching using contexts like Dispatchers.Default to dispatch to thread pools. The examples demonstrate basic coroutine usage, integrating coroutines with Retrofit for asynchronous network calls, and how structured concurrency helps organize coroutine code.
Kotlin Coroutines allow for writing asynchronous non-blocking code using coroutines and suspending functions. Key features include cooperative multitasking on a single thread, using coroutines instead of threads, and dispatchers to control coroutine execution. Examples demonstrate loading data asynchronously for UI, updating multiple objects concurrently using coroutines, and checking server validity in a non-blocking suspending function.
Kotlin Coroutines provide a new way to write asynchronous and concurrent code using suspending functions and structured concurrency. Coroutines avoid callbacks and allow sequencing of asynchronous code using async/await. Coroutines are lightweight threads that can be suspended and resumed. Channels allow coroutines to communicate and share data. Flows provide a reactive streams API for coroutines. Kotlin coroutines offer improvements over other asynchronous programming models like callbacks and RxJava.
Quick Introduction to Kotlin Coroutine for Android DevShuhei Shogen
This document introduces Kotlin coroutines, which provide a way to handle parallel processing more easily than traditional threading or callbacks. Coroutines allow suspending execution to avoid blocking threads. They are lightweight threads that efficiently use system resources. The document provides an overview of coroutines and demonstrates how to set them up, launch coroutines, use suspending functions like async/await, and apply coroutines in Android applications using ViewModelScope.
The document provides sample code examples for key Node.js concepts including prototype-based object-oriented programming, asynchronous programming with callbacks, promises, and async/await, automated testing with Mocha and Chai, and using TypeScript with Node.js. The examples cover topics such as object prototypes, classes, timers, promises, generator functions, generics, and writing automated tests. Useful links are also provided for further learning Node.js, asynchronous programming, testing, and TypeScript.
This document discusses coroutines in Kotlin, which provide a way to write asynchronous non-blocking code using suspending functions and coroutines. Coroutines are lightweight threads that are cheaper than traditional threads. The document covers the basics of coroutines including terminology, suspending functions, the coroutine builder API, patterns like generators/yield, and libraries like kotlinx.coroutines that provide additional coroutine functionality. It provides examples of common coroutine operations like launch, async, and channels.
Slides from my talk at UA Mobile 2017, 2017-11-25
Video: https://www.youtube.com/watch?v=tql9fmWX_oc
Modern programming cannot be imagined without long-running operations such as CPU-intensive computations or blocking IO running in the background. Unfortunately, having too many active threads is very expensive and kills performance, but there's a solution - coroutines. They provide a way to avoid blocking a thread and replace it with a cheaper and more controllable operation: suspension of a coroutine.
I'll talk about generators/yield, async/await, channels, composable/delimited continuations, and its usage; consider available APIs and make the overview of standard kotlinx.coroutines library.
Coroutines in Kotlin provide a way to write asynchronous, non-blocking code while maintaining a synchronous appearance and avoiding callbacks. Coroutines allow suspending functions to yield and resume work, providing an alternative to callbacks for asynchronous operations. The Kotlin standard library provides primitives for coroutines including suspending functions, builders for sequences and streams, and methods for job control and cancellation. While still experimental, coroutines are stable and recommended for use in production code.
NDC Sydney 2019 - Async Demystified -- Karel ZikmundKarel Zikmund
NDC Sydney 2019 conference in Sydney, AU - 2019/10/15
Talk: War stories from .NET team by Karel Zikmund
https://sessionize.com/s/karel-zikmund/async-demystified/24175
https://www.youtube.com/watch?v=TgUYcZV-foM
1) OTcl commands allow users to call C++ functions from OTcl by binding C++ classes and functions to OTcl objects and commands.
2) This document demonstrates how to create an OTcl command called "show-delay" that displays the value of a C++ variable when called.
3) Key steps include adding the C++ variable and command function, compiling the changes, creating an OTcl object, and invoking the command to display the variable value. Modifying the variable updates the output when the command is rerun.
The document provides an overview of concurrency in C# including threads, thread pools, tasks, locks, and thread-safe data structures. It discusses the different types of threads and how to run code asynchronously using threads, thread pools, and tasks. It covers potential issues like race conditions and deadlocks and how to avoid them using locks, monitors, and other synchronization primitives. Finally, it introduces some thread-safe data structures like ConcurrentDictionary and ConcurrentBag.
Introduction to modern c++ principles(part 1)Oky Firmansyah
The document introduces modern C++ principles and smart pointers. It discusses how C++ is still actively used and evolved, and defines modern C++ as using new language features and libraries. It then covers smart pointers like unique_ptr, shared_ptr, and weak_ptr which help manage object lifetimes and avoid memory leaks. The document also discusses move semantics and perfect forwarding which allow efficient moving of objects. It provides examples of how RAII (Resource Acquisition Is Initialization) binds resource management to object lifetime through constructors and destructors.
The document provides code examples comparing Java and Kotlin implementations of common programming concepts and patterns. It shows how Kotlin simplifies concepts like listeners, constructors, properties, and null safety checks compared to Java.
Droidcon Berlin 2021 - With coroutines being the de facto way of exposing async work and streams of changes for Kotlin on Android, developers are obviously attempting to use the same approaches when moving their code to Multiplatform.
But due to the way the memory model differs between JVM and Kotlin Native, it can be a painful experience.
In this talk, we will take a deep dive into the Coroutine API for Kotlin Multiplatform. You will learn how to expose your API with Coroutines while working with the Kotlin Native memory model instead of against it, and avoid the dragons along the way.
This document discusses concurrent programming and multithreaded programming in Java. It covers key topics such as creating and controlling threads, thread safety and synchronization, and using bounded queues to allow cooperation between producer and consumer threads.
This document discusses several changes and new features in Kotlin compared to Java. Key points include:
- Functions are now first-class objects that can be passed as arguments. Variables and properties have default values. Classes have default constructors.
- Null safety is improved with non-nullable properties by default and safe calls for checking for null values. Data classes auto-generate common methods.
- Collections have many additional methods and can be initialized more easily. Properties can be made smarter using delegates.
- Extension functions and properties can add functionality without changing existing classes. Coroutines allow suspending functions to avoid blocking threads.
- Companion objects are replaced by extension functions as a better alternative for
The document discusses Android Loaders, which provide a way for Activities and Fragments to asynchronously load data from a data source and deliver it back without having to manage threads or handle configuration changes. Loaders allow data to persist across configuration changes like orientation changes. The document covers the history of loading data in Android including threads and AsyncTask, introduces Loaders and the LoaderManager API, discusses implementing basic Loaders including CursorLoaders, and covers common mistakes to avoid.
The document discusses Kotlin coroutines and how they allow writing asynchronous code in a sequential way. Coroutines create lightweight threads to handle asynchronous code, allowing developers to write code sequentially without callbacks. This is done by converting coroutine code internally to continuation-passing style. Libraries can also be adapted to work with coroutines by converting callback-based APIs to return suspensions.
JVM Mechanics: When Does the JVM JIT & Deoptimize?Doug Hawkins
HotSpot promises to do the "right" thing for us by identifying our hot code and compiling "just-in-time", but how does HotSpot make those decisions?
This presentation aims to detail how HotSpot makes those decisions and how it corrects its mistakes through a series of demos that you run yourself.
Similar to Kotlin coroutine - the next step for RxJava developer? (20)
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
DDS Security Version 1.2 was adopted in 2024. This revision strengthens support for long runnings systems adding new cryptographic algorithms, certificate revocation, and hardness against DoS attacks.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
2. Agenda:
1. Pre-Kotlin world
2. What are coroutines and why we need it
3. Theoretical knowledge
4. Basic tutorial (some code)
5. Extra examples (more code)
6. Answer for the title question
7. Where to find more information
3. What have we had in pre-Kotlin world?
● AsyncTasks
● Threads
Painful points:
● Android Lifecycle
● Awful API
● Callbacks
● Easy to make a bug
● Hard to debug
● Concurrency is hard
4. What have we had in pre-Kotlin world? - RxJava!
http://reactivex.io/
6. What are Coroutines for a developer?
Coroutines allows us to write asynchronous code in
sequential way.
fun loadData() {
var data = api.getData()
showData(data)
}
sequential code
(not coroutine)
8. What problem does it solve? Callbacks!
https://www.twilio.com/blog/2017/03/promises-in-swift-writing-cleaner-asynchronous-code-using-promisekit.html
13. Coroutines - deep dive
● conceptually very light-weight threads
● one thread = ∞ coroutines
● compiled to state machine with shared state (and callbacks)
● 100K Threads = 💔, 100K Coroutines = 💚
● less context switch overhead
● less memory overhead
● works everywhere where Kotlin works
● stable since Kotlin 1.3
14. Suspend function
● suspend and executed later
● without blocking thread
● without changing context
● almost free
suspend fun doWorld() {
println("World!")
}
15. Coroutine context = Job + Dispatcher
Job (Rx ~ CompositeDisposable)
● a cancellable thing
● can’t be reused after cancel
● parent-child hierarchies
● SupervisorJob - child don’t cancel parent
Dispatchers (Rx ~ Schedulers)
● Default - thread pool = CPU cores
● Main - run on main thread (main UI thread on Android)
● IO - designed for IO tasks, share with Default
16. ● launch() - fire and forget
○ return Job object - allows to cancel coroutine
○ uncaught exceptions = crash
● async() - promise that it will return object
○ return Deferred<out T> : Job on which we call await() to wait for result
○ without await() call it will “swallow” exception
● runBlocking() - locks current thread until end of execution
● withContext() - run internal block on specified context
Coroutine builder
19. Coroutines - first
val job = GlobalScope.launch(Dispatchers.Main){
println("We are in coroutine")
}
20. Coroutines - cancel
val job = GlobalScope.launch(Dispatchers.Main){
println("We are in coroutine")
}
job.cancel()
------------------------------------------------------------------
RxJava disposable.dispose()
21. Coroutines - cancel
val job = launch (Dispatchers.Main){
while (true){
println("We are in coroutine")
}
}
job.cancel()
22. Coroutines - cancel
val job = launch (Dispatchers.Main){
while (isActive){
println("We are in coroutine")
}
}
job.cancel()
------------------------------------------------------------------
RxJava isDisposed()
23. CoroutineScope
public interface CoroutineScope {
public val coroutineContext: CoroutineContext
}
● every coroutine needs a scope (coroutine is extension method)
● scope is a lifecycle for a coroutine
● scopes creates “scope tree”
● you don’t want to use GlobalScope
24. CoroutineScope - Activty
class MyActivity : AppCompatActivity(), CoroutineScope {
lateinit var parentJob: SupervisorJob
override val coroutineContext: CoroutineContext = Dispatchers.Main + parentJob
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
parentJob = SupervisorJob()
}
override fun onDestroy() {
super.onDestroy()
parentJob.cancel()
}
}
25. CoroutineScope - Activty
class MyActivity : AppCompatActivity(), CoroutineScope {
override val coroutineContext: CoroutineContext = Dispatchers.Main + parentJob
fun buildCoroutineTree(){
launch { // MyActivity scope
async { // launch scope }
}
launch { // MyActivity scope }
}
override fun onDestroy() {
parentJob.cancel() // Cancel all coroutines in scope
}
}
26. CoroutineScope - ViewModel
class MyActivity : ViewModel(), CoroutineScope {
val parentJob = SupervisorJob()
override val coroutineContext: CoroutineContext = Dispatchers.Main + parentJob
override fun onCleared() {
super.onCleared()
parentJob.cancel()
}
fun doSomeStuff() {
launch{ // launch scope }
}
}
28. Coroutines - change context (thread)
launch (Dispatchers.Main){
println("Coroutine in main thread")
withContext(Dispatchers.IO){
println("Coroutine in background thread")
}
println("Coroutine in main thread")
}
------------------------------------------------------------------
RxJava
.observeOn()
.subscribeOn()
.unsubscribeOn()
29. Coroutines - sequentially
fun loadDataSequentially() {
launch(Dispatchers.Main) {
val response1 = withContext(Dispatchers.IO) { loadData1() } // 1
val response2 = withContext(Dispatchers.IO) { loadData2() } // 2
val result = response1 + response2 // 3
}
}
30. Coroutines - sequentially
fun loadDataSequentially() {
launch(Dispatchers.Main) {
val response1 = withContext(Dispatchers.IO) { loadData1() } // 1
val response2 = withContext(Dispatchers.IO) { loadData2() } // 2
val result = response1 + response2 // 3
}
}
31. Coroutines - asynchronous
launch(Dispatchers.Main) {
val response = async(Dispatchers.IO) { // Deferred<Response>
println("We are in async coroutine")
// doing stuff in background thread
loadData()
}
// doing stuff main thread
val value = response.await() // await for response
}
32. Coroutines - parallel
fun loadDataParallel() {
launch(Dispatchers.Main) {
val response1 = async(Dispatchers.IO) { loadData1() }
val response2 = async(Dispatchers.IO) { loadData2() }
// doing stuff main thread
val result = response1.await() + response1.await() //await for response
}
}
33. Coroutines - parallel
fun loadDataParallel() {
launch(Dispatchers.Main) {
val response1 = async(Dispatchers.IO) { loadData1() }
val response2 = async(Dispatchers.IO) { loadData2() }
// doing stuff main thread
val result = response1.await() + response1.await() //await for response
}
}
36. Operators?
Everything from Kotlin Collections (map, filter, etc.) and more:
fun loadDataWithTimeout() {
launch(Dispatchers.Main) {
val response = async(Dispatchers.IO) { loadData() }
val result = withTimeoutOrNull(2, TimeUnit.SECONDS) { response.await() }
}
37. Retry
suspend fun <T> retry(block: suspend (Int) -> T): T {
for (i in 1..5) { // try 5 times
try {
return withTimeout(500) { // with timeout
block(i)
}
} catch (e: TimeoutCancellationException) { /* retry */ }
}
return block(0) // last time just invoke without timeout
}
38. Retry
suspend fun <T> retry(block: suspend (Int) -> T): T {
for (i in 1..5) { // try 5 times
try {
return withTimeout(500) { // with timeout
block(i)
}
} catch (e: TimeoutCancellationException) { /* retry */ }
}
return block(0) // last time just invoke without timeout
}
39. Retry
suspend fun <T> retry(block: suspend (Int) -> T): T {
for (i in 1..5) { // try 5 times
try {
return withTimeout(500) { // with timeout
block(i)
}
} catch (e: TimeoutCancellationException) { /* retry */ }
}
return block(0) // last time just invoke without timeout
}
40. Retry
suspend fun <T> retry(block: suspend (Int) -> T): T {
for (i in 1..5) { // try 5 times
try {
return withTimeout(500) { // with timeout
block(i)
}
} catch (e: TimeoutCancellationException) { /* retry */ }
}
return block(0) // last time just invoke without timeout
}
41. Retry
suspend fun <T> retry(block: suspend (Int) -> T): T {
for (i in 1..5) { // try 5 times
try {
return withTimeout(500) { // with timeout
block(i)
}
} catch (e: TimeoutCancellationException) { /* retry */ }
}
return block(0) // last time just invoke without timeout
}
42. Retry
suspend fun <T> retry(block: suspend (Int) -> T): T {
for (i in 1..5) { // try 5 times
try {
return withTimeout(500) { // with timeout
block(i)
}
} catch (e: TimeoutCancellationException) { /* retry */ }
}
return block(0) // last time just invoke without timeout
}
43. Retrofit
interface RemoteDataSource{
@GET("api/news")
fun getNews() : Single<NewsResponse>
}
------------------------------------------------------------------
interface RemoteDataSource {
@GET("api/news")
fun getNews(): Deferred<NewsResponse>
}
------------------------------------------------------------------
interface RemoteDataSource {
@GET("api/news")
suspend fun getNews(): NewsResponse
}
RxJava
Adapter by
JakeWharton
Retrofit 2.5.1
44. Channels
● experimental
● hot observables in Rx world
● have buffer (default is 1)
● cold observables -
top issue
● cold observables ~
Sequences
val channel = Channel<Int>(1) // capacity 1
//Execution order
fun channelSend() = launch {
channel.send(1) //1
channel.send(1) //3
}
fun channelReceive() = launch {
val value1 = channel.receive() //2
val value2 = channel.receive() //4
}
45. Channels
● experimental
● hot observables in Rx world
● have buffer (default is 1)
● cold observables -
top issue
● cold observables ~
Sequences
val channel = Channel<Int>(1) // capacity 1
//Execution order
fun channelSend() = launch {
channel.send(1) //1
channel.send(1) //3
}
fun channelReceive() = launch {
val value1 = channel.receive() //2
val value2 = channel.receive() //4
}
46. Channels
● experimental
● hot observables in Rx world
● have buffer (default is 1)
● cold observables -
top issue
● cold observables ~
Sequences
val channel = Channel<Int>(1) // capacity 1
//Execution order
fun channelSend() = launch {
channel.send(1) //1
channel.send(1) //3
}
fun channelReceive() = launch {
val value1 = channel.receive() //2
val value2 = channel.receive() //4
}
47. Channels
● experimental
● hot observables in Rx world
● have buffer (default is 1)
● cold observables -
top issue
● cold observables ~
Sequences
val channel = Channel<Int>(1) // capacity 1
//Execution order
fun channelSend() = launch {
channel.send(1) //1
channel.send(1) //3
}
fun channelReceive() = launch {
val value1 = channel.receive() //2
val value2 = channel.receive() //4
}
48. Channels
● experimental
● hot observables in Rx world
● have buffer (default is 1)
● cold observables -
top issue
● cold observables ~
Sequences
val channel = Channel<Int>(1) // capacity 1
//Execution order
fun channelSend() = launch {
channel.send(1) //1
channel.send(1) //3
}
fun channelReceive() = launch {
val value1 = channel.receive() //2
val value2 = channel.receive() //4
}
49. Channels
● experimental
● hot observables in Rx world
● have buffer (default is 1)
● cold observables -
top issue
● cold observables ~
Sequences
val channel = Channel<Int>(1) // capacity 1
//Execution order
fun channelSend() = launch {
channel.send(1) //1
channel.send(1) //3
}
fun channelReceive() = launch {
val value1 = channel.receive() //2
val value2 = channel.receive() //4
}
50. Produce
val producer = produce{
send(1) //1
send(1) //3
}
fun receive() {
launch {
val value1 = producer.receive() //2
val value2 = producer.receive() //4
}
}
51. Actor
val subscriber = actor<Int> {
for(i in channel) {
//wait for elements in channel
}
}
fun send() {
launch {
subscriber.send(1)
subscriber.send(2)
}
}
52. Will it be the next step for RxJava
developer?
53. The next step for RxJava developer?
● Coroutines = low-level API for asynchronous calls
● Rx = observable pattern, "functional reactive programming"
● sequential vs streams, next tool in toolset
● Coroutines are faster and more memory efficient
● Perfectly replacement for Single, Completable, Maybe
● Easier to learn, lower entry threshold
● Can pass null values
● Channels can’t replace Observables
● Rx wins when dealing with real streams
● Coroutine wins with Kotlin/Native
● Rx API with Coroutines?
54. Should we switch to coroutines? IMHO
● You already have RxJava - stay with RxJava
● You are in love with RxJava - good
● You work with streams - only Rx
● You work with Java - Rx
● CRUD - Coroutines
● Simple app - Coroutines
● Don’t want Rx - only Coroutines
55. Where/What to learn more?
● https://github.com/Kotlin/kotlin-coroutines/ - core coroutine in language
● https://github.com/Kotlin/kotlinx.coroutines - base support library and other:
○ Dispatchers(“threads”) for Dispatchers.Main - Android, Spring, JavaFX
○ support for Reactive libraries - RxJava1, RxJava2, etc…
○ support for future-based libraries - JDK8, Guava, etc…
○ Kotlin/JS
○ Kotlin/Native
● KotlinConf talks about Coroutines by Roman Elizarov (2017, 2018)