This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
high-level concurrency objects, lock objects, executors, executor interfaces, thread pools, fork/join, concurrent collections, atomic variables, concurrent random numbers.
Concurrency Programming in Java - 01 - Introduction to Concurrency ProgrammingSachintha Gunasena
This session discusses a basic high-level introduction to concurrency programming with Java which include:
programming basics, OOP concepts, concurrency, concurrent programming, parallel computing, concurrent vs parallel, why concurrency, real world example, terms, Moore's Law, Amdahl's Law, types of parallel computation, MIMD Variants, shared memory model, distributed memory model, client server model, scoop mechanism, scoop preview - a sequential program, in a concurrent setting - using scoop, programming then & now, sequential programming, concurrent programming,
Java has a solid Memory Model, and there are a couple of excellent libraries for concurrency. When you start working with threads however, pitfalls start appearing - especially if the program is supposed to be fast and correct. This session shows proven solutions for some typical problems, showing how to view program code from a concurrency perspective: Which threads share which data, and how? How to reduce the impact of locks? How to avoid them altogether - and when is that worth it?
Concurrency Programming in Java - 01 - Introduction to Concurrency ProgrammingSachintha Gunasena
This session discusses a basic high-level introduction to concurrency programming with Java which include:
programming basics, OOP concepts, concurrency, concurrent programming, parallel computing, concurrent vs parallel, why concurrency, real world example, terms, Moore's Law, Amdahl's Law, types of parallel computation, MIMD Variants, shared memory model, distributed memory model, client server model, scoop mechanism, scoop preview - a sequential program, in a concurrent setting - using scoop, programming then & now, sequential programming, concurrent programming,
Java has a solid Memory Model, and there are a couple of excellent libraries for concurrency. When you start working with threads however, pitfalls start appearing - especially if the program is supposed to be fast and correct. This session shows proven solutions for some typical problems, showing how to view program code from a concurrency perspective: Which threads share which data, and how? How to reduce the impact of locks? How to avoid them altogether - and when is that worth it?
This talk was given in ilJUG on the 29th of July 2014 and discusses the new Java8 StampedLock class. It compares it to different locking mechanism is Java and shows some insights deduced from a simple benchmark
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
Aim of this presentation is not to make you masters in Java 8 Concurrency, but to help you guide towards that goal. Sometimes it helps just to know that there is some API that might be suitable for a particular situation. Make use of the pointers given to search more and learn more on those topics. Refer to books, Java API Documentation, Blogs etc. to learn more. Examples and demos for all cases discussed will be added to my blog www.javajee.com.
Presentation describes basic concepts of thread pool such as:
- interacting with queues,
- using pools from Executors class,
- task rejecting
- using ThreadFactory for thread creating
- Future and Callable interfaces,
- basic API
- possibilities for extending
This presentation is about advanced multithreading and concurrency in Java. I have tried my best to explain the concepts with code. Feel free to reach me if you have any questions or concerns.
Threads are lightweight processes as the overhead of switching between threads is less
Synchronization allows only one thread to perform an operation on a object at a time.
Synchronization prevent data corruption
Thread Synchronization-The synchronized methods define critical sections.
You will learn the Deadlock Condition in Threads and Syncronization of Threads
Slide deck from my presentation on multi-threading with .NET. The presentation covers from beginner onwards and looks at current technologies (i.e. pre .NET 4.0) specifically.
What makes this extra special is the entire process of how I prepared for it, from finding content to slide deck layout to presentation prep is documented at: http://www.sadev.co.za/content/how-i-build-presentations-series-index
Lecture 10 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
synchronisation part 2, synchronized methods, intrinsic locks, atomic access, liveness, deadlock, starvation, livelock, guarded blocks, immutable objects, synchronized class example, strategy for defining immutable objects
Discover the latest confidential stats and facts charting the rise of Spam, Malware, Ransonware and Phishing in 2015. It makes for sobering reading for any responsible IT Manager.
This talk was given in ilJUG on the 29th of July 2014 and discusses the new Java8 StampedLock class. It compares it to different locking mechanism is Java and shows some insights deduced from a simple benchmark
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
Aim of this presentation is not to make you masters in Java 8 Concurrency, but to help you guide towards that goal. Sometimes it helps just to know that there is some API that might be suitable for a particular situation. Make use of the pointers given to search more and learn more on those topics. Refer to books, Java API Documentation, Blogs etc. to learn more. Examples and demos for all cases discussed will be added to my blog www.javajee.com.
Presentation describes basic concepts of thread pool such as:
- interacting with queues,
- using pools from Executors class,
- task rejecting
- using ThreadFactory for thread creating
- Future and Callable interfaces,
- basic API
- possibilities for extending
This presentation is about advanced multithreading and concurrency in Java. I have tried my best to explain the concepts with code. Feel free to reach me if you have any questions or concerns.
Threads are lightweight processes as the overhead of switching between threads is less
Synchronization allows only one thread to perform an operation on a object at a time.
Synchronization prevent data corruption
Thread Synchronization-The synchronized methods define critical sections.
You will learn the Deadlock Condition in Threads and Syncronization of Threads
Slide deck from my presentation on multi-threading with .NET. The presentation covers from beginner onwards and looks at current technologies (i.e. pre .NET 4.0) specifically.
What makes this extra special is the entire process of how I prepared for it, from finding content to slide deck layout to presentation prep is documented at: http://www.sadev.co.za/content/how-i-build-presentations-series-index
Lecture 10 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
synchronisation part 2, synchronized methods, intrinsic locks, atomic access, liveness, deadlock, starvation, livelock, guarded blocks, immutable objects, synchronized class example, strategy for defining immutable objects
Discover the latest confidential stats and facts charting the rise of Spam, Malware, Ransonware and Phishing in 2015. It makes for sobering reading for any responsible IT Manager.
Digital Signature, Electronic Signature, How digital signature works, Confidentiality of digital signature, Authenticity of digital signature, Integrity of digital signature, standard of digital signature, Algorithm of digital signature, Mathematical base of digital signature, parameters of digital signature, key computation of digital signature, key generation of digital signature, verification of of digital signature
The top two attack vectors for malware are email and web browsers. Watering-hole attacks conceal malware on member-based sites and phishing scams can target individuals with personal details. This PPT describes a different security approach to protect against these threats while achieving business growth, efficiency and lowered expenses. The presentation features Cisco Email, Web and Cloud Web Security and covers basic features, offers, benefits, newest features and product integrations. Watch the webinar: http://cs.co/9004BGqvy
Concurrency Programming in Java - 05 - Processes and Threads, Thread Objects,...Sachintha Gunasena
This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
processes, threads, how to define a thread, how to start a thread, how to sleep a thread, thread interrupt, interrupt status flag, joins, simple thread example, synchronization part 1, thread interference, memory consistency errors
This slides explains why ConfigureAwait(false) needs to be called when we use async await. This slides is based on the following blog by Microsoft.
https://devblogs.microsoft.com/dotnet/configureawait-faq/
Multi-threading in the modern era: Vertx Akka and QuasarGal Marder
Everybody wants scalable systems. However, writing non-blocking applications in Java is not an easy task. In this session, we'll go over 3 different frameworks for managing multi-treading and concurrency support (Akka, Vertx and Quasar).
Building a document e-signing workflow with Azure Durable FunctionsJoonas Westlin
Durable functions offer an interesting programming model for building workflows. Whether you need to sometimes split and do multiple things or wait for user input, a lot of things are possible. They do present some challenges as well, and the limitations of orchestrator functions can make working with Durable seem very complicated.
In this talk we will go through the basics of Durable Functions along with strategies for deploying and monitoring them. A sample application will be presented where users can send documents for electronic signature. A Durable Functions workflow will power the signing process.
In 5-2020, I and Minh have a sharing session about Sync, Async, and Multi-threading in C#.
We believe this is one of the most important things when working with .Net technology.
This sharing is aiming to Junior Dev, or even Sr Dev or anyone interested in Sync, Async, and Multi-threading.
I hope it will bring you some values.
Entrepreneurship and Commerce in IT - 14 - Web Marketing CommunicationsSachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about web marketing communications.
Entrepreneurship and Commerce in IT - 13 - The Internet Audience, consumer be...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about the internet audience, internet traffic patterns, the impact of broadband internet connectivity on e-commerce, what consumers shop online, how consumers find vendors online, basic marketing concepts, internet marketing technologies, advertising networks, and brand strategies.
This session discusses about the payment systems available in an commerce environment. Which include:
credit card e-commerce transactions, e-commerce digital payment in the b2c arena, and electronic billing and presentment systems.
Concurrency Programming in Java - 03 - Essentials of Java Part 2Sachintha Gunasena
This session discusses the basic building blocks of Java as an approach to concurrent programming in Java.
It includes:
file access and permission, database access and permissions, and remote method invocation.
These are presented using examples and answers to them are linked in the references.
Concurrency Programming in Java - 02 - Essentials of Java Part 1Sachintha Gunasena
This session discusses about the basic building blocks of java as an approach to concurrent programming in Java and include:
java, setting up the environment, common issues, building applications, application structure and elements, fields and methods, constructors, building applets, class, extending a class, building a user interface, java swing, writing servlets.
Entrepreneurship & Commerce in IT - 11 - Security & EncryptionSachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about:
the types of threats that could occur to an e-commerce business, and what are the prevention methods and technologies available for such threats.
Entrepreneurship & Commerce in IT - 08 - E-Commerce business models and conceptsSachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about e-commerce business models and concepts:
• Growth of the Internet and the Web • Origins and Growth of E-commerce • E-commerce I and E-commerce II eras • Organizing themes of e-commerce • Elements of a business model • Business-to-consumer (B2C) business models • Business-to-business (B2B) business models • Business models in other emerging e-commerce areas • How the Internet and Web change business, strategy, structure, and process.
Entrepreneurship & Commerce in IT - 10 - The Internet today and How to build ...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session initially discusses about:
the internet today, the internet backbone, ISPs, metropolitan area exchange, network access points, intranet and extranet.
Then the big topic starts!
How to build an commerce site.
It includes all the necessary steps to consider, plan, build, and deploy an commerce website including build e-commerce site, planning e-commerce site, in-house vs outsourcing, technologies, server technologies, merchant applications, etc.
Entrepreneurship & Commerce in IT - 09 - The internet and the world wide webSachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about:
the evolution of internet, key technology concepts of the internet, packet switching, TCP/IP, IP address, domain names and urls.
Entrepreneurship and Commerce in IT - 07 - Introduction to E-Commerce I - e-c...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about the difference between e-commerce and e-business, unique features of e-commerce technology, types of e-commerce, and types of e-business.
Entrepreneurship and Commerce in IT - 06 - Funding, Expanding, and Exit Strat...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about the options that an entrepreneur has to fund a venture, paths to expand a venture, and finally the exit strategies for a venture.
Entrepreneurship and Commerce in IT - 05 - Marketing, Technology and Marketin...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session covers Marketing, Technology and Marketing, CRM, Twitter, Facebook, Foursquare, LinkedIn, Organizational Plan, Financial Plan.
Entrepreneurship & Commerce in IT - 01 - Introduction in to Entrepreneurship,...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This is part one and is an overall introduction to the series.
Contains basic definitions of entrepreneurship, entrepreneur, commerce, IT, and outlines the learning outcomes of the series.
Also contains a link to Steve Jobs' commencement speech at Stanford University in 2005 as an inspirational speech for the would be entrepreneur.
Entrepreneurship & Commerce in IT - 02 - Basic Concepts of Entrepreneurship, ...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses a proper introduction to entrepreneurship, types of entrepreneurship, basic definitions, and concepts around it. Also it discusses basic ideas like recognising an opportunity, how to do an initial research, how to do initial planning, etc.
This also discusses the introduction to a Business Plan.
Entrepreneurship & Commerce in IT - 04 - Marketing Plan, Marketing 7 P's, STP...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session continues the marketing plan and continues through the basics on how to plan, how to create an execution plan, how to evaluate, and finally how to make changes and move ahead with the marketing plan.
Contains 7 P's of Marketing, Marketing Objectives, Marketing Strategies, Budgeting, Action Plan, Marketing Control Process
Entrepreneurship & Commerce in IT - 03 - Writing a Business Plan, Creating a ...Sachintha Gunasena
This series in about the Entrepreneurial and E-Commerce opportunities and how to harness the power of Information Technology to improve or revolutionize business.
This session discusses about the basics of writing a business proposal, and then gets in to detailed explanation of Marketing concepts, definitions, etc.
Discusses how to prepare a marketing plan, and the first part of the marketing plan, the situational analysis.
Contains 4 P's of Marketing, Marketing Definition, Management Definition, Marketing Planning Process, Marketing Audit, Internal Analysis, External Analysis, SWOT, PESTEEL, Competitor Analysis, Market Analysis,
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
8. High Level Concurrency
Objects
• So far, this lesson has focused on the low-level APIs that have been part of the
Java platform from the very beginning.
• These APIs are adequate for very basic tasks, but higher-level building blocks
are needed for more advanced tasks.
• This is especially true for massively concurrent applications that fully exploit
today's multiprocessor and multi-core systems.
• In this section we'll look at some of the high-level concurrency features
introduced with version 5.0 of the Java platform.
• Most of these features are implemented in the new java.util.concurrent
packages.
• There are also new concurrent data structures in the Java Collections
Framework.
9. High Level Concurrency
Objects Cont.d
• Lock objects
• support locking idioms that simplify many concurrent applications.
• Executors
• define a high-level API for launching and managing threads.
• Executor implementations provided by java.util.concurrent provide thread pool management suitable for
large-scale applications.
• Concurrent collections
• make it easier to manage large collections of data, and can greatly reduce the need for synchronization.
• Atomic variables
• have features that minimize synchronization and help avoid memory consistency errors.
• ThreadLocalRandom
• (in JDK 7) provides efficient generation of pseudorandom numbers from multiple threads.
11. Lock Objects
• Synchronized code relies on a simple kind of reentrant lock.
• This kind of lock is easy to use, but has many limitations.
• More sophisticated locking idioms are supported by the
java.util.concurrent.locks package.
• We won't examine this package in detail, but instead will focus on its most
basic interface, Lock.
• Lock objects work very much like the implicit locks used by synchronized code.
• As with implicit locks, only one thread can own a Lock object at a time.
• Lock objects also support a wait/notify mechanism, through their associated
Condition objects.
12. Lock Objects Cont.d
• The biggest advantage of Lock objects over implicit locks is their ability to back out of an attempt to acquire
a lock.
• The tryLock method backs out if the lock is not available immediately or before a timeout expires (if
specified).
• The lockInterruptibly method backs out if another thread sends an interrupt before the lock is acquired.
• Let's use Lock objects to solve the deadlock problem we saw in Liveness.
• Tom and Jerry have trained themselves to notice when a friend is about to bow.
• We model this improvement by requiring that our Friend objects must acquire locks for both participants
before proceeding with the bow.
• Here is the source code for the improved model, Safelock.
• To demonstrate the versatility of this idiom,
• we assume that Tom and Jerry are so infatuated with their newfound ability to bow safely that they can't
stop bowing to each other:
13. Lock Objects Cont.d
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.Random;
public class Safelock {
static class Friend {
private final String name;
private final Lock lock = new ReentrantLock();
public Friend(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
public boolean impendingBow(Friend bower) {
Boolean myLock = false;
Boolean yourLock = false;
try {
myLock = lock.tryLock();
yourLock = bower.lock.tryLock();
} finally {
if (! (myLock && yourLock)) {
if (myLock) {
lock.unlock();
}
if (yourLock) {
bower.lock.unlock();
}
}
}
return myLock && yourLock;
}
public void bow(Friend bower) {
if (impendingBow(bower)) {
try {
System.out.format("%s: %s has"
+ " bowed to me!%n",
this.name, bower.getName());
bower.bowBack(this);
} finally {
lock.unlock();
bower.lock.unlock();
}
} else {
System.out.format("%s: %s started"
+ " to bow to me, but saw that"
+ " I was already bowing to"
+ " him.%n",
this.name, bower.getName());
}
}
public void bowBack(Friend bower) {
System.out.format("%s: %s has" +
" bowed back to me!%n",
this.name, bower.getName());
}
}
static class BowLoop implements Runnable {
private Friend bower;
private Friend bowee;
public BowLoop(Friend bower, Friend bowee) {
this.bower = bower;
this.bowee = bowee;
}
public void run() {
Random random = new Random();
for (;;) {
try {
Thread.sleep(random.nextInt(10));
} catch (InterruptedException e) {}
bowee.bow(bower);
}
}
}
public static void main(String[] args) {
final Friend alphonse =
new Friend("Alphonse");
final Friend gaston =
new Friend("Gaston");
new Thread(new BowLoop(alphonse, gaston)).start();
new Thread(new BowLoop(gaston, alphonse)).start();
}
}
15. Executors
• In all of the previous examples,
• there's a close connection between
• the task being done by a new thread,
• as defined by its Runnable object,
• and the thread itself,
• as defined by a Thread object.
• This works well for small applications, but in large-scale applications,
• it makes sense to separate thread management and creation from the rest of the
application.
• Objects that encapsulate these functions are known as executors.
16. Executors Cont.d
• The following subsections describe executors in
detail.
• Executor Interfaces define the three executor
object types.
• Thread Pools are the most common kind of
executor implementation.
• Fork/Join is a framework (new in JDK 7) for
taking advantage of multiple processors.
17. Executor Interfaces
• The java.util.concurrent package defines three executor interfaces:
• Executor,
• a simple interface that
• supports launching new tasks.
• ExecutorService,
• a subinterface of Executor, which
• adds features that help manage the lifecycle, both of the individual tasks and of the executor itself.
• ScheduledExecutorService,
• a subinterface of ExecutorService,
• supports future and/or periodic execution of tasks.
• Typically, variables that refer to executor objects are declared as one of these three interface types, not with
an executor class type.
18. The Executor Interface
• The Executor interface provides a single method, execute, designed to be a drop-in replacement for a
common thread-creation idiom.
• If r is a Runnable object, and e is an Executor object you can replace
• with
• However, the definition of execute is less specific.
• The low-level idiom creates a new thread and launches it immediately.
• Depending on the Executor implementation, execute may do the same thing, but is more likely to use an
existing worker thread to run r, or to place r in a queue to wait for a worker thread to become available.
(We'll describe worker threads in the section on Thread Pools.)
• The executor implementations in java.util.concurrent are designed to make full use of the more advanced
ExecutorService and ScheduledExecutorService interfaces, although they also work with the base Executor
interface.
(new Thread(r)).start();
e.execute(r);
19. The ExecutorService
Interface
• The ExecutorService interface supplements execute with a similar, but more versatile submit
method.
• Like execute, submit accepts Runnable objects,
• but also accepts Callable objects, which allow the task to return a value.
• The submit method returns a Future object,
• which is used to retrieve the Callable return value
• and to manage the status of both Callable and Runnable tasks.
• ExecutorService also provides methods for submitting large collections of Callable objects.
• Finally, ExecutorService provides a number of methods for managing the shutdown of the
executor.
• To support immediate shutdown, tasks should handle interrupts correctly.
20. The SceduledExecutorService
Interface
• The ScheduledExecutorService interface
• supplements the methods of its parent ExecutorService with
schedule,
• which executes a Runnable or Callable task after a specified
delay.
• In addition, the interface defines scheduleAtFixedRate and
scheduleWithFixedDelay,
• which executes specified tasks repeatedly, at defined
intervals.
21. Thread Pools
• Most of the executor implementations in java.util.concurrent use thread pools,
• which consist of worker threads.
• This kind of thread exists separately from the Runnable and Callable tasks it
executes
• and is often used to execute multiple tasks.
• Using worker threads minimizes the overhead due to thread creation.
• Thread objects use a significant amount of memory,
• and in a large-scale application,
• allocating and deallocating many thread objects
• creates a significant memory management overhead.
22. Thread Pools Cont.d
• One common type of thread pool is the fixed thread pool.
• This type of pool always has a specified number of threads
running;
• if a thread is somehow terminated while it is still in use,
• it is automatically replaced with a new thread.
• Tasks are submitted to the pool via an internal queue,
• which holds extra tasks whenever there are more
active tasks than threads.
23. Thread Pools Cont.d
• An important advantage of the fixed thread pool is that applications using it degrade
gracefully.
• To understand this, consider a web server application
• where each HTTP request is handled by a separate thread.
• If the application simply creates a new thread for every new HTTP request,
• and the system receives more requests than it can handle immediately,
• the application will suddenly stop responding to all requests
• when the overhead of all those threads exceed the capacity of the system.
• With a limit on the number of the threads that can be created,
• the application will not be servicing HTTP requests as quickly as they come in,
• but it will be servicing them as quickly as the system can sustain.
24. Thread Pools Cont.d
• A simple way to create an executor that uses a
fixed thread pool is
• to invoke the newFixedThreadPool factory
method in java.util.concurrent.Executors
• This class also provides the following factory
methods:
25. Thread Pools Cont.d
• The newCachedThreadPool method
• creates an executor with an expandable thread pool.
• This executor is suitable for applications that launch many short-lived tasks.
• The newSingleThreadExecutor method
• creates an executor
• that executes a single task at a time.
• Several factory methods are ScheduledExecutorService versions of the above executors.
• If none of the executors provided by the above factory methods meet your needs,
• constructing instances of java.util.concurrent.ThreadPoolExecutor
• or java.util.concurrent.ScheduledThreadPoolExecutor
• will give you additional options.
26. Fork / Join
• The fork/join framework is an implementation of the ExecutorService interface that helps you take
advantage of multiple processors.
• It is designed for work that can be broken into smaller pieces recursively.
• The goal is to use all the available processing power to enhance the performance of your
application.
• As with any ExecutorService implementation, the fork/join framework distributes tasks to worker
threads in a thread pool.
• The fork/join framework is distinct because it uses a work-stealing algorithm.
• Worker threads that run out of things to do can steal tasks from other threads that are still busy.
• The center of the fork/join framework is the ForkJoinPool class, an extension of the
AbstractExecutorService class.
• ForkJoinPool implements the core work-stealing algorithm and can execute ForkJoinTask
processes.
27. Basic Use
• The first step for using the fork/join framework is to write code that performs a segment of the work.
• Your code should look similar to the following pseudocode:
• Wrap this code in a ForkJoinTask subclass,
• typically using one of its more specialized types,
• either RecursiveTask (which can return a result) or RecursiveAction.
• After your ForkJoinTask subclass is ready,
• create the object that represents all the work to be done
• and pass it to the invoke() method of a ForkJoinPool instance.
if (my portion of the work is small enough)
do the work directly
else
split my work into two pieces
invoke the two pieces and wait for the results
28. Blurring for Clarity
• To understand how the fork/join framework works, consider the following example.
• Suppose that you want to blur an image.
• The original source image is represented by an array of integers,
• where each integer contains the color values for a single pixel.
• The blurred destination image is also represented by an integer array with the same size as the source.
• Performing the blur is accomplished by
• working through the source array one pixel at a time.
• Each pixel is averaged with its surrounding pixels (the red, green, and blue components are averaged),
• and the result is placed in the destination array.
• Since an image is a large array, this process can take a long time.
• You can take advantage of concurrent processing on multiprocessor systems
• by implementing the algorithm using the fork/join framework.
• Here is one possible implementation:
29. Blurring for Clarity Cont.dpublic class ForkBlur extends RecursiveAction {
private int[] mSource;
private int mStart;
private int mLength;
private int[] mDestination;
// Processing window size; should be odd.
private int mBlurWidth = 15;
public ForkBlur(int[] src, int start, int length, int[] dst) {
mSource = src;
mStart = start;
mLength = length;
mDestination = dst;
}
protected void computeDirectly() {
int sidePixels = (mBlurWidth - 1) / 2;
for (int index = mStart; index < mStart + mLength; index++) {
// Calculate average.
float rt = 0, gt = 0, bt = 0;
for (int mi = -sidePixels; mi <= sidePixels; mi++) {
int mindex = Math.min(Math.max(mi + index, 0),
mSource.length - 1);
int pixel = mSource[mindex];
rt += (float)((pixel & 0x00ff0000) >> 16)
/ mBlurWidth;
gt += (float)((pixel & 0x0000ff00) >> 8)
/ mBlurWidth;
bt += (float)((pixel & 0x000000ff) >> 0)
/ mBlurWidth;
}
// Reassemble destination pixel.
int dpixel = (0xff000000 ) |
(((int)rt) << 16) |
(((int)gt) << 8) |
(((int)bt) << 0);
mDestination[index] = dpixel;
}
}
…
30. Blurring for Clarity Cont.d
• Now you implement the abstract compute() method,
• which either performs the blur directly or splits it into two smaller tasks.
• A simple array length threshold helps determine whether the work is performed or split.
protected static int sThreshold = 100000;
protected void compute() {
if (mLength < sThreshold) {
computeDirectly();
return;
}
int split = mLength / 2;
invokeAll(new ForkBlur(mSource, mStart, split, mDestination),
new ForkBlur(mSource, mStart + split, mLength - split,
mDestination));
}
31. Blurring for Clarity Cont.d
• If the previous methods are in a subclass of the RecursiveAction class,
• then setting up the task to run in a ForkJoinPool is straightforward,
• and involves the following steps:
• Create a task that represents all of the work to be done.
• Create the ForkJoinPool that will run the task.
• Run the task.
// source image pixels are in src
// destination image pixels are in dst
ForkBlur fb = new ForkBlur(src, 0, src.length, dst);
ForkJoinPool pool = new ForkJoinPool();
pool.invoke(fb);
32. Standard Implementations
• Besides using the fork/join framework to implement custom algorithms for tasks to be performed
concurrently on a multiprocessor system (such as the ForkBlur.java example in the previous section),
• there are some generally useful features in Java SE which are already implemented using the fork/join
framework.
• One such implementation, introduced in Java SE 8, is used by the java.util.Arrays class for its
parallelSort() methods.
• These methods are similar to sort(), but leverage concurrency via the fork/join framework.
• Parallel sorting of large arrays is faster than sequential sorting when run on multiprocessor systems.
• However, how exactly the fork/join framework is leveraged by these methods is outside the scope of the
Java Tutorials.
• For this information, see the Java API documentation.
• Another implementation of the fork/join framework is used by methods in the java.util.streams package,
which is part of Project Lambda scheduled for the Java SE 8 release.
• For more information, see the Lambda Expressions section in java site.
34. Concurrent Collections
• The java.util.concurrent package includes a number of additions to the Java Collections Framework.
• These are most easily categorized by the collection interfaces provided:
• BlockingQueue
• defines a first-in-first-out data structure that blocks or times out when you attempt to add to a
full queue, or retrieve from an empty queue.
• ConcurrentMap
• is a subinterface of java.util.Map that defines useful atomic operations.
• These operations remove or replace a key-value pair only if the key is present, or add a key-
value pair only if the key is absent.
• Making these operations atomic helps avoid synchronization.
• The standard general-purpose implementation of ConcurrentMap is ConcurrentHashMap,
which is a concurrent analog of HashMap.
35. Concurrent Collections
Cont.d
• ConcurrentNavigableMap
• is a subinterface of ConcurrentMap that supports approximate matches.
• The standard general-purpose implementation of ConcurrentNavigableMap
• is ConcurrentSkipListMap,
• which is a concurrent analog of TreeMap.
• All of these collections help avoid Memory Consistency Errors
• by defining a happens-before relationship between an operation
• that adds an object to the collection with subsequent operations
• that access or remove that object.
37. Atomic Variables
• The java.util.concurrent.atomic package defines classes that support atomic
operations on single variables.
• All classes have get and set methods that work like reads and writes on volatile
variables.
• That is, a set has a happens-before relationship with any subsequent get on the
same variable.
• The atomic compareAndSet method also has these memory consistency
features,
• as do the simple atomic arithmetic methods that apply to integer atomic
variables.
• To see how this package might be used, let's return to the Counter class we
originally used to demonstrate thread interference:
38. Atomic Variables Cont.d
class Counter {
private int c = 0;
public void increment() {
c++;
}
public void decrement() {
c--;
}
public int value() {
return c;
}
}
39. Atomic Variables Cont.d
• One way to make Counter safe from thread
interference
• is to make its methods synchronized, as in
SynchronizedCounter:
40. Atomic Variables Cont.d
class SynchronizedCounter {
private int c = 0;
public synchronized void increment() {
c++;
}
public synchronized void decrement() {
c--;
}
public synchronized int value() {
return c;
}
}
41. Atomic Variables Cont.d
• For this simple class, synchronization is an acceptable solution.
• But for a more complicated class,
• we might want to avoid the liveness impact of unnecessary
synchronization.
• Replacing the int field with an AtomicInteger
• allows us to prevent thread interference
• without resorting to synchronization, as in AtomicCounter:
42. Atomic Variables Cont.d
import java.util.concurrent.atomic.AtomicInteger;
class AtomicCounter {
private AtomicInteger c = new AtomicInteger(0);
public void increment() {
c.incrementAndGet();
}
public void decrement() {
c.decrementAndGet();
}
public int value() {
return c.get();
}
}
44. Concurrent Random
Numbers
• In JDK 7, java.util.concurrent includes a convenience class, ThreadLocalRandom,
• for applications that
• expect to use random numbers
• from multiple threads or ForkJoinTasks.
• For concurrent access, using ThreadLocalRandom
• instead of Math.random()
• results in less contention and, ultimately, better performance.
• All you need to do is
• call ThreadLocalRandom.current(),
• then call one of its methods to retrieve a random number.
• Here is one example:
int r = ThreadLocalRandom.current() .nextInt(4, 77);
48. Questions
• Can you pass a Thread object to
Executor.execute?
• Would such an invocation make sense?
49. Exercises
• Compile and run BadThreads.java:
• The application should print out "Mares do eat oats."
• Is it guaranteed to always do this?
• If not, why not?
• Would it help to change the parameters of the two invocations of Sleep?
• How would you guarantee that all changes to message will be visible in
the main thread?
• Modify the producer-consumer example in Guarded Blocks to use a
standard library class instead of the Drop class.
50. Exercisespublic class BadThreads {
static String message;
private static class CorrectorThread
extends Thread {
public void run() {
try {
sleep(1000);
} catch (InterruptedException e) {}
// Key statement 1:
message = "Mares do eat oats.";
}
}
public static void main(String args[])
throws InterruptedException {
(new CorrectorThread()).start();
message = "Mares do not eat oats.";
Thread.sleep(2000);
// Key statement 2:
System.out.println(message);
}
}