This document provides an agenda and summary for a presentation comparing several popular Java collection frameworks, including the Java Collections Framework, Apache Commons Collections, Eclipse Collections, Google Guava, and Vavr. The presentation will explore the features and capabilities of each framework, perform benchmarks to compare performance on common use cases like creating and manipulating a deck of cards, and analyze the memory usage of data structures in each library. The goal is to help attendees choose the most appropriate collection library for their needs.
JNoSQL is a framework and collection of tools that make integration between Java applications and NoSQL quick and easy—for developers as well as vendors. The API is easy to implement, so NoSQL vendors can quickly implement, test, and become compliant by themselves. And with its low learning curve and just a minimal set of artifacts, Java developers can start coding by worrying not about the complexity of specific NoSQL databases but only their core aspects (such as graph or document properties). Built with functional programming in mind, it leverages all the features of Java 8. This session covers how the API is structured, how it relates to the multiple NoSQL database types, and how you can get started and involved in this open source technology.
Game On! (@gameontext – http://game-on.org) is an awesome throwback text-based adventure built with microservices. Completely open source, it enables everyone to choose their own adventure to learn about microservices concepts while extending the game. One of the core services is the Map, which maintains a two-dimensional map containing all the registered rooms. The Map started with a document store as a back end, but as the Map changed over time, tombstones started to accrue. And then people started to ask how to manage three dimensions, and dragons appeared. Come to this session to find out why the decision was made to change the NoSQL back end, how it was done, and the result of the change with a new NoSQL API (http://jnosql.org/).
The document discusses different Java collection frameworks and compares their performance when implementing a deck of cards problem. It presents sample code for creating an immutable sorted set of cards and grouping them by suit using various frameworks, including JDK, Apache Commons, Eclipse Collections, Google Guava, and Javaslang. Benchmark results show that Eclipse Collections has the best performance for the Cartesian product operation to generate all combinations of cards, followed by Google Guava and Javaslang.
This document discusses using Scala in an enterprise setting. It describes how Scala can be used to build a typical J2EE stack with Spring for the web layer and service layer and Squeryl for the data access layer. While Scala and Spring integration works well with dependency injection, using Scala with Spring templates andAspect Oriented Programming is improved. Squeryl provides benefits as a lightweight ORM such as good support for Scala collections but has some downsides like hard to use native SQL and performance issues. Overall adopting Scala in an enterprise requires overcoming challenges like hiring Scala developers and determining code standards and conventions.
Scala, Akka, and Play: An Introduction on HerokuHavoc Pennington
The document introduces Scala, Akka, and Play and discusses how they can be used together on Heroku. Scala is presented as a practical alternative to Java that allows incremental migration while providing functional programming capabilities. Akka implements the actor model to provide highly scalable and fault-tolerant architectures. Play is introduced as a popular web framework that uses convention over configuration. The document argues that using these technologies together enables developer-friendly, horizontally scalable applications with a pragmatic adoption path. It provides overviews and examples of each technology.
- Akka is a great fit for building scalable applications on Heroku due to its "let it crash" philosophy and ability to easily scale out by adding more dynos. Within each dyno, Akka actors can be used to build highly concurrent and resilient applications.
- While remoting and clustering between dynos is not supported due to Heroku's HTTP-only architecture, Akka actors work well within individual dynos to handle requests and background jobs.
- A simple Akka application can be deployed to Heroku with no code changes - Akka will automatically scale out by creating actor instances on each dyno. The talk
Scala.js is a compiler that compiles Scala source code to equivalent Javascript code. It can be seen as the start of a revolution in developing web application. In this talk, I'll present Scala.js project, common libraries for having a pleasure web development (such as scalatags, autowire and upickle) and integration with well known javascript libraries such as AngularJS and React.js.
JNoSQL is a framework and collection of tools that make integration between Java applications and NoSQL quick and easy—for developers as well as vendors. The API is easy to implement, so NoSQL vendors can quickly implement, test, and become compliant by themselves. And with its low learning curve and just a minimal set of artifacts, Java developers can start coding by worrying not about the complexity of specific NoSQL databases but only their core aspects (such as graph or document properties). Built with functional programming in mind, it leverages all the features of Java 8. This session covers how the API is structured, how it relates to the multiple NoSQL database types, and how you can get started and involved in this open source technology.
Game On! (@gameontext – http://game-on.org) is an awesome throwback text-based adventure built with microservices. Completely open source, it enables everyone to choose their own adventure to learn about microservices concepts while extending the game. One of the core services is the Map, which maintains a two-dimensional map containing all the registered rooms. The Map started with a document store as a back end, but as the Map changed over time, tombstones started to accrue. And then people started to ask how to manage three dimensions, and dragons appeared. Come to this session to find out why the decision was made to change the NoSQL back end, how it was done, and the result of the change with a new NoSQL API (http://jnosql.org/).
The document discusses different Java collection frameworks and compares their performance when implementing a deck of cards problem. It presents sample code for creating an immutable sorted set of cards and grouping them by suit using various frameworks, including JDK, Apache Commons, Eclipse Collections, Google Guava, and Javaslang. Benchmark results show that Eclipse Collections has the best performance for the Cartesian product operation to generate all combinations of cards, followed by Google Guava and Javaslang.
This document discusses using Scala in an enterprise setting. It describes how Scala can be used to build a typical J2EE stack with Spring for the web layer and service layer and Squeryl for the data access layer. While Scala and Spring integration works well with dependency injection, using Scala with Spring templates andAspect Oriented Programming is improved. Squeryl provides benefits as a lightweight ORM such as good support for Scala collections but has some downsides like hard to use native SQL and performance issues. Overall adopting Scala in an enterprise requires overcoming challenges like hiring Scala developers and determining code standards and conventions.
Scala, Akka, and Play: An Introduction on HerokuHavoc Pennington
The document introduces Scala, Akka, and Play and discusses how they can be used together on Heroku. Scala is presented as a practical alternative to Java that allows incremental migration while providing functional programming capabilities. Akka implements the actor model to provide highly scalable and fault-tolerant architectures. Play is introduced as a popular web framework that uses convention over configuration. The document argues that using these technologies together enables developer-friendly, horizontally scalable applications with a pragmatic adoption path. It provides overviews and examples of each technology.
- Akka is a great fit for building scalable applications on Heroku due to its "let it crash" philosophy and ability to easily scale out by adding more dynos. Within each dyno, Akka actors can be used to build highly concurrent and resilient applications.
- While remoting and clustering between dynos is not supported due to Heroku's HTTP-only architecture, Akka actors work well within individual dynos to handle requests and background jobs.
- A simple Akka application can be deployed to Heroku with no code changes - Akka will automatically scale out by creating actor instances on each dyno. The talk
Scala.js is a compiler that compiles Scala source code to equivalent Javascript code. It can be seen as the start of a revolution in developing web application. In this talk, I'll present Scala.js project, common libraries for having a pleasure web development (such as scalatags, autowire and upickle) and integration with well known javascript libraries such as AngularJS and React.js.
The document discusses how the Guardian migrated from Java to Scala for one of its projects. It had been using Java since 2006 but wanted to innovate faster. It tried Python/Django but found it required throwing away Java experience and had different development and runtime environments. It discovered Scala as a better alternative as Scala runs on the JVM so it could reuse Java tools, libraries and deployment processes. It converted a content API project from Java to Scala and was pleased with the results, finding Scala less verbose and more expressive than Java. It now uses Scala by default for new JVM projects.
The document summarizes Martin Odersky's talk at Scala Days 2016 about the road ahead for Scala. The key points are:
1. Scala is maturing with improvements to tools like IDEs and build tools in 2015, while 2016 sees increased activity with the Scala Center, Scala 2.12 release, and rethinking Scala libraries.
2. The Scala Center was formed to undertake projects benefiting the Scala community with support from various companies.
3. Scala 2.12 focuses on optimizing for Java 8 and includes many new features. Future releases will focus on improving Scala libraries and modularization.
4. The DOT calculus provides a formal
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaScala Italy
This document discusses how Buildo helps startups build scalable applications using Scala. It explains that Buildo started with a large project in Scala and learned how to apply Scala to startups. Buildo uses Scala because it values type safety, expressiveness, flexibility, and the ability to ship code that works faster. The document outlines how Buildo deals with diverse requirements using techniques like the cake pattern and Akka, develops controllers using monadic patterns, and discusses open problems regarding modularity and the importance of hiring skilled programmers.
Scala's evolving ecosystem- Introduction to Scala.jsKnoldus Inc.
This document discusses Scala.js, which compiles Scala code to JavaScript. It introduces Scala.js and why it was created, noting that it allows Scala code to run in browsers by compiling to JavaScript without sacrificing JavaScript interoperability. It then covers topics like the differences between Scala.js and js-scala, semantics differences between Scala and JavaScript, calling JavaScript from Scala.js, exporting Scala.js APIs to JavaScript, using Scala.js with sbt, and optimizing Scala.js code.
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...scalaconfjp
This document discusses Scarab, a SAT-based constraint programming system developed in Scala. Scarab provides a domain-specific language and APIs for modeling constraint satisfaction problems and solving them using SAT encodings and SAT solvers like Sat4j. It aims to provide an expressive, efficient and customizable workbench for developing SAT-based systems. The document gives examples of using Scarab to model and solve the graph coloring problem and pandiagonal Latin square problem. It also discusses Scarab's features like efficiency, portability and ability to leverage advanced SAT solving techniques.
- The document discusses how Scala code is compiled to Java Virtual Machine (JVM) bytecodes. It begins with an introduction to Koichi Sakata, the presenter, and an overview that the session will look at JVM bytecodes for beginners.
- The presentation then asks if attendees know what happens when Scala code is compiled. It is explained that Scala code, like code from other JVM languages, is compiled to class files that contain JVM bytecodes.
- An example Java class file is opened in a binary editor to show the JVM bytecode format. It is explained that class files have a defined format with elements like magic number, version, and bytecode instructions.
1. Akka is a toolkit for building concurrent and distributed applications on the JVM based on the actor model.
2. Actors communicate asynchronously by message passing and each actor processes one message at a time in its mailbox.
3. Akka provides features for concurrency, distribution, and fault-tolerance through actors, remoting, and supervision.
Java 201 Intro to Test Driven Development in Javaagorolabs
This document provides an overview and agenda for a Java 201 course on test-driven development (TDD) in Java. It introduces TDD workflows and concepts like the feedback loop and test frameworks. The agenda covers setting up an IDE, writing the first unit test, test anatomy, and concludes with a hands-on exercise to build components of a card game using TDD.
How You Convince Your Manager To Adopt Scala.js in ProductionBoldRadius Solutions
Dave Sugden and Katrin Shechtman of BoldRadius presented this talk at Scala By The Bay 2015.
The talk will present fully functional sample application developed with Scala.js, scalatags, scalacss and other Scala and Typesafe technologies. We aim to show all the pros and cons for having Scala coast-to-coast approach to web-application development and encourage people not to shy away from asking difficult questions challenging this approach. Participants can expect to gain a clear view on the current state of the Scala based client side technologies and take away an activator template with application code that could be used as a base for technical discussions with their peers and managers.
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介scalaconfjp
SparkSQL is a Spark component that allows SQL queries to be executed on Spark. It uses Catalyst, which provides an execution planning framework for relational operations like SQL parsing, logical optimization, and physical planning. Catalyst defines logical and physical operators, expressions, data types and provides rule-based optimizations to transform query plans. The SQL core in SparkSQL builds SchemaRDDs to represent queries and allows reading/writing to Parquet and JSON formats.
While the Java platform has gained notoriety in the last 15 years as a robust application platform with a thriving ecosystem and well-established practices, the Java language has had its share of criticism. Highly verbose, overly didactic, limited feature set; whichever flavor of criticism you prefer, it's patently obvious that Java is playing catch up to more modern languages with a less rigid evolution path.
The language landscape today is vastly different than it had been five or ten years ago; a wide array of languages are available, designed to suit a variety of flavors: Groovy, Clojure, Scala, Gosu, Kotlin... which should you choose? This lecture focuses on one company's decision to focus on Scala, and presents a case study based on our experiences using Scala in practice, in the hope of providing much-needed real world context to assist your decision.
This presentation was used for the Scala In Practice lecture at the Botzia Israeli Java User Group meeting, May 3rd 2012.
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングscalaconfjp
Xitrum is an asynchronous and clustered Scala web framework and HTTP server built on top of Netty and Akka. It is feature-rich, easy to use, and high performance. Xitrum can scale to a cluster of servers using Akka Cluster and Hazelcast. It is used in production systems in various countries. The document provides information on Xitrum's architecture, features, annotations, and examples of actions and SockJS messaging.
Writing concurrent programs that can run in multiple threads and on multiple cores is crucial but daunting. Futures provides a convenient abstraction for many problem domains. The online course "Intermediate Scala" includes an up-to-date discussion of futures and the parts of java.util.concurrent that underlie the Scala futures implementation. Unlike Java's futures, Scala futures supports composition, transformations and sophisticated callbacks.
The author is managing editor of http://scalacourses.com, which offers self-paced online courses that teach Introductory and Intermediate Scala and Play Framework.
Java 101 Intro to Java Programming - Exercisesagorolabs
This document outlines several hands-on exercises for learning Java fundamentals. It describes exercises to create basic Java programs, programs that take command line arguments, programs for integer operations, finding leap years, and printing powers of two. It also includes bonus exercises for random number generation, arrays of days, printing personal details, and calculating sales discounts.
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoTaro L. Saito
Silk is a framework for building dataflows in Scala. In Silk users write data processing code with collection operators (e.g., map, filter, reduce, join, etc.). Silk uses Scala Macros to construct a DAG of dataflows, nodes of which are annotated with variable names in the program. By using these variable names as markers in the DAG, Silk can support interruption and resume of dataflows and querying the intermediate data. By separating dataflow descriptions from its computation, Silk enables us to switch executors, called weavers, for in-memory or cluster computing without modifying the code. In this talk, we will show how Silk helps you run data-processing pipelines as you write the code.
Slides from the talk at Skillsmatter on my F# erasing SQL provider
http://skillsmatter.com/podcast/scala/sql-type-provider-deep-dive-with-ross-mckinlay
This document provides an overview of using Hibernate, an object-relational mapping tool, to connect XPages applications to relational databases. It discusses the benefits of using relational databases and Hibernate over the Domino API. The document outlines Hibernate concepts like entities, configuration, querying, and mapping objects to tables. It also provides instructions for downloading and installing Hibernate and adding it to a Domino application. The presenter encourages using proven libraries and tools to make development easier.
Introducing Scala to your Ruby/Java Shop : My experiences at IGNManish Pandit
With the move to SOA, IGN's API engineering became a traditional Java/Ruby shop. We introduced Scala to the team in August '11. As of April '12 we have our major services running on Scala, and we could not be happier. I'll talk about the strategic & tactical rationale, gradual introduction to the new language, cultivating experts and mentoring junior developers. We will also cover the common roadblocks the leaders may run into, addressing the concerns of engineers and stakeholders, and building an engineering culture that facilitates innovation and talent growth. Please note that this talk is not a Ruby/Java/Scala religious debate - we believe in using the best tool for the job; and what works for us may not work for every org (which is where the culture comes in). My team's journey from "Holy crap! This looks academic and scary!" to "Let me whip out a service by EOD today" in a matter of months is something I am very proud of, and would love to share it with fellow developer community.
The document discusses how the Guardian migrated from Java to Scala for one of its projects. It had been using Java since 2006 but wanted to innovate faster. It tried Python/Django but found it required throwing away Java experience and had different development and runtime environments. It discovered Scala as a better alternative as Scala runs on the JVM so it could reuse Java tools, libraries and deployment processes. It converted a content API project from Java to Scala and was pleased with the results, finding Scala less verbose and more expressive than Java. It now uses Scala by default for new JVM projects.
The document summarizes Martin Odersky's talk at Scala Days 2016 about the road ahead for Scala. The key points are:
1. Scala is maturing with improvements to tools like IDEs and build tools in 2015, while 2016 sees increased activity with the Scala Center, Scala 2.12 release, and rethinking Scala libraries.
2. The Scala Center was formed to undertake projects benefiting the Scala community with support from various companies.
3. Scala 2.12 focuses on optimizing for Java 8 and includes many new features. Future releases will focus on improving Scala libraries and modularization.
4. The DOT calculus provides a formal
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaScala Italy
This document discusses how Buildo helps startups build scalable applications using Scala. It explains that Buildo started with a large project in Scala and learned how to apply Scala to startups. Buildo uses Scala because it values type safety, expressiveness, flexibility, and the ability to ship code that works faster. The document outlines how Buildo deals with diverse requirements using techniques like the cake pattern and Akka, develops controllers using monadic patterns, and discusses open problems regarding modularity and the importance of hiring skilled programmers.
Scala's evolving ecosystem- Introduction to Scala.jsKnoldus Inc.
This document discusses Scala.js, which compiles Scala code to JavaScript. It introduces Scala.js and why it was created, noting that it allows Scala code to run in browsers by compiling to JavaScript without sacrificing JavaScript interoperability. It then covers topics like the differences between Scala.js and js-scala, semantics differences between Scala and JavaScript, calling JavaScript from Scala.js, exporting Scala.js APIs to JavaScript, using Scala.js with sbt, and optimizing Scala.js code.
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...scalaconfjp
This document discusses Scarab, a SAT-based constraint programming system developed in Scala. Scarab provides a domain-specific language and APIs for modeling constraint satisfaction problems and solving them using SAT encodings and SAT solvers like Sat4j. It aims to provide an expressive, efficient and customizable workbench for developing SAT-based systems. The document gives examples of using Scarab to model and solve the graph coloring problem and pandiagonal Latin square problem. It also discusses Scarab's features like efficiency, portability and ability to leverage advanced SAT solving techniques.
- The document discusses how Scala code is compiled to Java Virtual Machine (JVM) bytecodes. It begins with an introduction to Koichi Sakata, the presenter, and an overview that the session will look at JVM bytecodes for beginners.
- The presentation then asks if attendees know what happens when Scala code is compiled. It is explained that Scala code, like code from other JVM languages, is compiled to class files that contain JVM bytecodes.
- An example Java class file is opened in a binary editor to show the JVM bytecode format. It is explained that class files have a defined format with elements like magic number, version, and bytecode instructions.
1. Akka is a toolkit for building concurrent and distributed applications on the JVM based on the actor model.
2. Actors communicate asynchronously by message passing and each actor processes one message at a time in its mailbox.
3. Akka provides features for concurrency, distribution, and fault-tolerance through actors, remoting, and supervision.
Java 201 Intro to Test Driven Development in Javaagorolabs
This document provides an overview and agenda for a Java 201 course on test-driven development (TDD) in Java. It introduces TDD workflows and concepts like the feedback loop and test frameworks. The agenda covers setting up an IDE, writing the first unit test, test anatomy, and concludes with a hands-on exercise to build components of a card game using TDD.
How You Convince Your Manager To Adopt Scala.js in ProductionBoldRadius Solutions
Dave Sugden and Katrin Shechtman of BoldRadius presented this talk at Scala By The Bay 2015.
The talk will present fully functional sample application developed with Scala.js, scalatags, scalacss and other Scala and Typesafe technologies. We aim to show all the pros and cons for having Scala coast-to-coast approach to web-application development and encourage people not to shy away from asking difficult questions challenging this approach. Participants can expect to gain a clear view on the current state of the Scala based client side technologies and take away an activator template with application code that could be used as a base for technical discussions with their peers and managers.
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介scalaconfjp
SparkSQL is a Spark component that allows SQL queries to be executed on Spark. It uses Catalyst, which provides an execution planning framework for relational operations like SQL parsing, logical optimization, and physical planning. Catalyst defines logical and physical operators, expressions, data types and provides rule-based optimizations to transform query plans. The SQL core in SparkSQL builds SchemaRDDs to represent queries and allows reading/writing to Parquet and JSON formats.
While the Java platform has gained notoriety in the last 15 years as a robust application platform with a thriving ecosystem and well-established practices, the Java language has had its share of criticism. Highly verbose, overly didactic, limited feature set; whichever flavor of criticism you prefer, it's patently obvious that Java is playing catch up to more modern languages with a less rigid evolution path.
The language landscape today is vastly different than it had been five or ten years ago; a wide array of languages are available, designed to suit a variety of flavors: Groovy, Clojure, Scala, Gosu, Kotlin... which should you choose? This lecture focuses on one company's decision to focus on Scala, and presents a case study based on our experiences using Scala in practice, in the hope of providing much-needed real world context to assist your decision.
This presentation was used for the Scala In Practice lecture at the Botzia Israeli Java User Group meeting, May 3rd 2012.
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングscalaconfjp
Xitrum is an asynchronous and clustered Scala web framework and HTTP server built on top of Netty and Akka. It is feature-rich, easy to use, and high performance. Xitrum can scale to a cluster of servers using Akka Cluster and Hazelcast. It is used in production systems in various countries. The document provides information on Xitrum's architecture, features, annotations, and examples of actions and SockJS messaging.
Writing concurrent programs that can run in multiple threads and on multiple cores is crucial but daunting. Futures provides a convenient abstraction for many problem domains. The online course "Intermediate Scala" includes an up-to-date discussion of futures and the parts of java.util.concurrent that underlie the Scala futures implementation. Unlike Java's futures, Scala futures supports composition, transformations and sophisticated callbacks.
The author is managing editor of http://scalacourses.com, which offers self-paced online courses that teach Introductory and Intermediate Scala and Play Framework.
Java 101 Intro to Java Programming - Exercisesagorolabs
This document outlines several hands-on exercises for learning Java fundamentals. It describes exercises to create basic Java programs, programs that take command line arguments, programs for integer operations, finding leap years, and printing powers of two. It also includes bonus exercises for random number generation, arrays of days, printing personal details, and calculating sales discounts.
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoTaro L. Saito
Silk is a framework for building dataflows in Scala. In Silk users write data processing code with collection operators (e.g., map, filter, reduce, join, etc.). Silk uses Scala Macros to construct a DAG of dataflows, nodes of which are annotated with variable names in the program. By using these variable names as markers in the DAG, Silk can support interruption and resume of dataflows and querying the intermediate data. By separating dataflow descriptions from its computation, Silk enables us to switch executors, called weavers, for in-memory or cluster computing without modifying the code. In this talk, we will show how Silk helps you run data-processing pipelines as you write the code.
Slides from the talk at Skillsmatter on my F# erasing SQL provider
http://skillsmatter.com/podcast/scala/sql-type-provider-deep-dive-with-ross-mckinlay
This document provides an overview of using Hibernate, an object-relational mapping tool, to connect XPages applications to relational databases. It discusses the benefits of using relational databases and Hibernate over the Domino API. The document outlines Hibernate concepts like entities, configuration, querying, and mapping objects to tables. It also provides instructions for downloading and installing Hibernate and adding it to a Domino application. The presenter encourages using proven libraries and tools to make development easier.
Introducing Scala to your Ruby/Java Shop : My experiences at IGNManish Pandit
With the move to SOA, IGN's API engineering became a traditional Java/Ruby shop. We introduced Scala to the team in August '11. As of April '12 we have our major services running on Scala, and we could not be happier. I'll talk about the strategic & tactical rationale, gradual introduction to the new language, cultivating experts and mentoring junior developers. We will also cover the common roadblocks the leaders may run into, addressing the concerns of engineers and stakeholders, and building an engineering culture that facilitates innovation and talent growth. Please note that this talk is not a Ruby/Java/Scala religious debate - we believe in using the best tool for the job; and what works for us may not work for every org (which is where the culture comes in). My team's journey from "Holy crap! This looks academic and scary!" to "Let me whip out a service by EOD today" in a matter of months is something I am very proud of, and would love to share it with fellow developer community.
Building Concurrent WebObjects applications with ScalaWO Community
This document discusses using Scala for concurrent programming in WebObjects applications. It begins by explaining why concurrent programming is important due to increasing numbers of processor cores. It then discusses challenges with traditional threading and locks and introduces the actor model as an easier and more scalable approach using message passing. The document demonstrates how to build concurrent WebObjects applications using Scala actors for processing tasks like video encoding. It shows how properties can configure WebObjects for concurrent requests and how ERXEC provides thread safety. Benchmarks show the Scala actor approach outperforms traditional threading. The document argues that Scala is a powerful, safe and easy language for concurrent programming in WebObjects.
The document discusses different Java collection frameworks and their implementations of a deck of cards problem. It compares how Eclipse Collections, Google Guava, Apache Commons Collections, Javaslang, and the JDK implement creating an immutable sorted set of cards and an immutable sorted multimap grouping cards by suit for a deck of cards problem. It also includes performance benchmarks for the Cartesian product and deck of cards problem implementations across the frameworks.
This was a short introduction to Scala programming language.
me and my colleague lectured these slides in Programming Language Design and Implementation course in K.N. Toosi University of Technology.
Here are a few thoughts in response to your questions:
- Lambda expressions will significantly improve readability and reduce noise in Java code by allowing for more concise one-liners compared to anonymous inner classes. However, debugging lambdas could potentially be more challenging since they are anonymous by nature. Tools and IDE support will need to evolve to help with this.
- With features like lambdas and default methods, Java 8 aims to become more competitive with languages like C# and Scala that already have closures and functional capabilities. However, Java's large existing code base and ecosystem give it advantages over newer languages.
- For Java 8 to be widely adopted, projects should start evaluating and migrating to it as early access
This document discusses migrating applications from Java 8 to later versions of Java such as Java 11 and Java 12. It outlines changes in the Java timeline including features added in versions 9 through 13. Major changes include modules, removed packages and methods, and behavior changes. The document recommends using scanning tools to analyze applications for migration issues and references additional resources on the Java migration.
The document provides an overview of object oriented programming using Java, covering topics like the history of Java, data types, variables, control statements, operators, and classes. It also includes examples of Java code and explanations of concepts like object oriented programming, platforms, memory management, and the Java runtime environment. The document is meant as an introduction to programming with Java for students learning object oriented concepts.
This document discusses new features in Java 8 including stream API, lambdas, default methods, optional values, date and time API, stamped locks, concurrent adders, improved annotations, new file operations, overflow operations, and the Nashorn JavaScript engine. It provides code examples and explanations of how to use these new features in Java 8.
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
Memory leaks are not always simple or easy to find. Heap dumps from production systems are often gigantic (4+ gigs) with millions of objects in memory. Simple spot checking with traditional tools is woefully inadequate in these situations, especially with real data. Leaks can be entire object graphs with enormous amounts of noise. This session will show you how to build custom tools using the Apache NetBeans Profiler/Heapwalker APIs. Using these APIs, you can read and analyze Java heaps programmatically to ask really hard questions. This gives you the power to analyze complex object graphs with tens of thousands of objects in seconds.
The document compares Java and .NET solutions by examining a case study where the Java Pet Store sample application was ported to .NET. Some key points:
- The .NET version of Pet Store had fewer lines of code but more optimizations, such as stored procedures and caching.
- Performance tests showed the .NET version supported 6 times more users with faster response times, though Java advocates argue the implementations were unfairly optimized.
- A re-implemented optimized Java version saw a 17x performance increase, showing the frameworks can achieve similar performance with tuning.
- Overall the comparison shows it is difficult to do direct comparisons and each framework has advantages, but .NET gained maturity quickly for enterprise solutions.
Scala Next focused on the continued adoption and development of Scala. Key points included:
- Scala adoption has grown significantly in areas like web platforms, trading platforms, and financial modeling. The number of Scala jobs tripled in the last year.
- Recent Scala versions like 2.8 and 2.9 included improvements to collections, implicits, and tooling support.
- Scala 2.10 will focus on new reflection capabilities, reification, string interpolation, and continued IDE improvements.
- The Play Framework 2.0 will provide a Scala-centric web framework built on top of Akka and the Typesafe Stack.
Scala and jvm_languages_praveen_technologistpmanvi
Scala is a programming language for the Java Virtual Machine that combines object-oriented and functional programming concepts. It is fully interoperable with Java code and libraries. Scala aims to be more concise and expressive than Java by allowing both object-oriented and functional programming styles. Experts have praised Scala for its ability to solve many of Java's design issues like verbosity. Scala provides features like case classes, pattern matching, XML literals, and functional collections that reduce boilerplate code compared to Java.
Spark - The Ultimate Scala Collections by Martin OderskySpark Summit
Spark is a domain-specific language for working with collections that is implemented in Scala and runs on a cluster. While similar to Scala collections, Spark differs in that it is lazy and supports additional functionality for paired data. Scala can learn from Spark by adding views to make laziness clearer, caching for persistence, and pairwise operations. Types are important for Spark as they prevent logic errors and help with programming complex functional operations across a cluster.
Making The Move To Java 17 (JConf 2022)Alex Motley
Are your applications still running on Java 8 or even older, unsupported versions? Or maybe you've already made the move to Java 11? Thinking about switching your application to run on Java 17 and not sure where to start? There is a lot to think about when it comes to planning a Java migration, but there are tools and strategies that can help! Come to this session to learn about the significant changes in Java that might impact your application. Topics include the removal of APIs (such as Java EE packages) and behavior changes resulting from moving an application running previous Java versions to Java 17. Learn about tools to use that help you identify potential issues within your application and how to resolve them! The discussion is informative to developers and system administrations who are interested in evaluating applications before they are migrated and while making the code changes.
Java is moving faster and faster. A lot of features are not as known as they should be.
Let’s review together the old ones you missed.
Then show you the ones you never had time to look at in 9, 10, 11, 12 and 13.
And go crazy to check how it’s implemented under the hood (yes, there will be bytecode).
JCConf 2018 - Retrospect and Prospect of JavaJoseph Kuo
This document summarizes Joseph S. Kuo's presentation on the retrospect and prospect of Java. It discusses the history and major features of Java versions from 1.0 to 11. Key developments include the addition of generics, lambdas, and modules. The presentation outlines new features in Java 9 like modularization and Java 10 like local variable type inference. It also previews upcoming features in Java 12 like switch expressions and raw string literals.
Expanding beyond SPL -- More language support in IBM Streams V4.1lisanl
IBM Streams 4.1 expands support for building streaming applications to include Java and Scala. Developers can now create applications using these languages alongside existing support for SPL. The streamsx.topology project supports building topologies in Java and Scala, and applications can integrate data across languages. IBM Streams features like windowing, parallel regions, and checkpointing are supported for Java and Scala applications.
Eclipse MicroProfile 과 Microservice Java framework – HelidonOracle Korea
2016년에 만들어져, 현재 Eclipse Foundation에 기반을 두고 있는 Enterprise Java Microservices를 위한 Eclipse Microprofile에 대해서 알아보고, 간단한 데모를 진행합니다.
Enterprise Java 표준(Java EE, 일명 EE4J)과 Microservices 기반 아키텍처의 실제 요구사항 사이를 차이를 좁히기 시작하였다. 여러가지 유용한 마이크로 서비스 관련 API를 기존 Java EE 7/8 API와 결합하여 사용하고, Heal Check, Metrics, Fault Tolerance, JWT Propagation, Configuration, Tracing 등을 제공하고 있습니다.
이번 세션에서는 MicroProfile의 현재에 대해서 알아 보고, 기타 Microservices를 위한 java Micro framework에 대해서도 알아볼 것 입니다.
Similar to JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754] (20)
O documento apresenta 9 erros comuns ao desenvolver com bancos de dados NoSQL. São eles: 1) escolher NoSQL sem entender suas características; 2) tratar documentos como PDFs ao invés de entender seus conceitos; 3) indexar todas as colunas como em bancos SQL; 4) fazer queries como em SQL; 5) não separar modelos de leitura e escrita; 6) acreditar cegamente em benchmarks; 7) não considerar os trade-offs de consistência vs escalabilidade; 8) usar ORM sem entendê-lo; 9) se encantar pela
This document summarizes a presentation about JSR-363, which defines a Java API for working with units of measurement. It introduces the speakers Leonardo Lima and Otávio Santana, and discusses the problems that arise from not having proper support for units of measurement in code. It also summarizes the core concepts behind units and quantities, and provides an overview of what JSR-363 is and its timeline.
The document discusses IoT security and methods for using Java to build more secure IoT applications. It covers recent IoT attacks exploiting weaknesses like default passwords. The Java Cryptography Architecture and libraries like Bouncy Castle provide cryptography support for tasks like encryption and digital signatures. Secure elements and JavaCard provide hardware-backed security by executing code and storing keys in a protected environment. The document emphasizes that security needs to be considered from the start of a project to reduce costs and vulnerabilities.
With IoT it’s all about things and sensors. And when representing a temperature, for example, we normally have it as a float. But is this float in Celsius? Kelvin? This is one of the problems JSR 363 wants to solve: have all “real world” value and unit data represented in a standard way. This JSR is also very suitable for scientific applications, where data representation, conversion, and formatting are very important. In this session, you’ll see how developers as well as platform providers can leverage this JSR, coding a smart gas pump that reports its values by using Java standards. Come to meet JSR 363, Units of Measurement.
How fast can you deploy a new IoT solution? If you have a business challenge to solve, there are so many aspects to be considered that an IoT project seems to take forever: security, deployment, device management, connectivity, sensors, and more.... The promise of “write once, run anywhere" and 20 years of a vivid ecosystem have empowered Java to be the language for successful IoT stories. In this session, check out how to use Java and many standards (for communication, security, deployment, and coding) to develop a “smart freezer,” address many business concerns, and keep the project on schedule.
In developing for IoT, security is not often the highest priority: APIs exposed without care and devices deployed with default passwords become gateways to your network and your data. Many best practices can be used to thwart attacks on your devices, but they have to be thought through from the first architectural design. This session covers many recent IoT attacks, their consequences, and how they could have been prevented. It also explores the many security levels one device can have, from totally exposed to completely secured against physical tampering and identity theft.
In Gartner’s “Hype Cycle for Emerging Technologies, 2015,” the Internet of Things and cryptocurrencies are both in the “Peak of Inflated Expectation” category, considered to be “world-changing technologies” that can change forever how we interact with things and money. How about joining both techs in the same use cases? Can you have secure IoT with the blockchain technology (the underlying tech of Bitcoin and other cryptocurrencies)? Attend this session to explore together the possibilities and see what’s real and what’s not worth a dime.
Leonardo Lima discusses building reliable remote communication devices using Java ME 8. He outlines improvements in Java ME 8 like shared libraries, service loader pattern, events, inter-MIDlet communication and device I/O. These improvements help split code into independent services and libraries to reduce failures. More work is still needed in areas like configuration, concurrency and standard protocols. Future JSRs may also help by adding capabilities like units of measurement.
O documento discute as novidades da plataforma Java ME 8 e seu papel no futuro da Internet das Coisas. Apresenta as principais atualizações da linguagem Java e da API para dispositivos embarcados, incluindo suporte a novas funcionalidades do Java SE 8 e recursos específicos para a programação de sistemas conectados. Também aborda projetos em andamento como a JSR 363 para unidades de medida e prevê a expansão da Internet das Coisas para diversos tipos de equipamentos.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
CAKE: Sharing Slices of Confidential Data on BlockchainClaudio Di Ciccio
Presented at the CAiSE 2024 Forum, Intelligent Information Systems, June 6th, Limassol, Cyprus.
Synopsis: Cooperative information systems typically involve various entities in a collaborative process within a distributed environment. Blockchain technology offers a mechanism for automating such processes, even when only partial trust exists among participants. The data stored on the blockchain is replicated across all nodes in the network, ensuring accessibility to all participants. While this aspect facilitates traceability, integrity, and persistence, it poses challenges for adopting public blockchains in enterprise settings due to confidentiality issues. In this paper, we present a software tool named Control Access via Key Encryption (CAKE), designed to ensure data confidentiality in scenarios involving public blockchains. After outlining its core components and functionalities, we showcase the application of CAKE in the context of a real-world cyber-security project within the logistics domain.
Paper: https://doi.org/10.1007/978-3-031-61000-4_16
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfTechgropse Pvt.Ltd.
In this blog post, we'll delve into the intersection of AI and app development in Saudi Arabia, focusing on the food delivery sector. We'll explore how AI is revolutionizing the way Saudi consumers order food, how restaurants manage their operations, and how delivery partners navigate the bustling streets of cities like Riyadh, Jeddah, and Dammam. Through real-world case studies, we'll showcase how leading Saudi food delivery apps are leveraging AI to redefine convenience, personalization, and efficiency.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
OpenID AuthZEN Interop Read Out - AuthorizationDavid Brossard
During Identiverse 2024 and EIC 2024, members of the OpenID AuthZEN WG got together and demoed their authorization endpoints conforming to the AuthZEN API
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
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!
2. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Abstract
— Collections are a staple in any programming language: the need to collect, sort or iterate over values is needed by nearly all
developers.
The Java language introduced the Collections framework long ago and that's what many (incredibly not all!) developers learn
when they start programming. It has plenty to offer, but many find it lacking: the amount of collection libraries as active open
source projects demonstrate the need for something else.
If we were to search to find a holistic comparison of famous collection libraries, there is not much literature available. The talk
is poised to fill this gap. In this session, we will explore the most common collections (pun intended!) frameworks, what they
have to offer and what you should consider for your next project.
We will also show common programmer use cases, how each library handles them and the impact on memory, processing
power and ease of use/coding.
After this session, you will be able to choose the right bag for your tricks!
3. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Agenda
1. Brief introduction of who we are (2 min)
2. A bit of history about the Java Util Collections framework (6 min), with a timeline of Java releases and what was
introduced in its collection
3. Show the gaps in use cases from that timeline (6 min)
4. Introduce a timeline with other collection frameworks (6 min, 2 min per framework: Apache, Eclipse, Google)
5. Comparison table with use case / packages diagram (5+ min)
6. Examples of said use cases in IDE (10 min)
7. Actual tests with speed and memory use per solution (rest of time)
4. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
About the Speakers
—Donald Raab
• Managing Director at BNY Mellon
• Based in Jersey City, New Jersey
• Creator of Eclipse Collections
• Member of JSR 335 Expert Group (Lambdas/Streams 4 Java)
• Presenter at Devoxx US, JavaOne, EclipseCon, JVMLS, GIDS
5. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
About the Speakers
—Leonardo Lima
• Computer engineer, server & embedded sw developer
• From São Paulo, Brasil, currently in Austin, TX
• CTO at V2COM
• Spec Lead – JSR363 – Units of Measurement
• V2COM’s Representative at JCP Executive Committee
[about.me/leomrlima]
8. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
java.util Collections
— Java Collection Framework has been around since 1998/JDK 1.2.
Very basic but critical collection support for Java.
— Interfaces: Maps and Collections (List, Set, Queue, Deque)
— Implementations: Basic and Concurrent versions of the
interfaces, sorted and concurrent as well
— Algorithms: Sorting, Shuffling, Routine Data Manipulation,
Searching, Composition
— Best way to get started is using the simple and concurrent tutorials
15. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
16. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
19. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
20. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
21. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
22. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
23. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
24. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
public class JDK8DeckOfCards {
private List<Card> cards;
private Map<Suit, List<Card>> cardsBySuit;
A Deck of Cards – Only the Types
public class ApacheCommonsDeckOfCards {
private List<Card> cards;
private MultiValuedMap<Suit, Card> cardsBySuit;
public class EclipseCollectionsDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class GoogleGuavaDeckOfCards {
private ImmutableList<Card> cards;
private ImmutableListMultimap<Suit, Card> cardsBySuit;
public class VavrDeckOfCards {
private List<Card> cards;
private Map<Suit, ? extends List<Card>> cardsBySuit;
25. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
42. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Performance Notes
• Guava’s ImmutableList Collector uses an
ArrayBasedBuilder for adding elements
• The final build step creates the sorts the array and
constructs the ImmutableList
• Eclipse Collections creates a TreeSet from
the array of cards
• The TreeSet is converted to an array via toArray
for final storage
43. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
58. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards
68. Collections.compare(()->{…})
@TheDonRaab @leomrlima @NikhilNanivade#JavaOne
Problem Statement – Deck of Cards
1. Create Deck of Cards
• Store Cards in an “ImmutableList”
• (Cartesian product of Suit x Rank)
• Group the cards by Suit in an “ImmutableListMultimap”
• (Group By)
2. Get the number of cards
• Count By Suit returning “Multiset” or “Bag”
• Count By Rank returning “Multiset” or “Bag”
3. Deal five hands of five cards each
• Return the cards as an “ImmutableList” of five Sets of five cards