This document provides an overview of Kotlin for backend development. It discusses Kotlin's advantages like Java interoperability and null safety. Coroutines are presented as an alternative to callback-based asynchronous programming. Examples are given of adopting Kotlin in different contexts like libraries, components and web applications. Strategies covered include preparing development tools and environments, evaluating current skills, and sharing experiences.
이일민 / Epril
---
스프링5에 도입된 웹플럭스와 리액티브 함수형 프로그래밍 기술에 대한 여러가지 테스트 기술을 살펴보고 이를 효과적으로 개발에 적용하는 방법을 설명합니다.
- 리액티브 함수형 프로그래밍과 테스트
- 웹플럭스를 이용하는 웹 테스트
- 스프링5 애플리케이션의 테스트 전략
Building Fast and Scalable Persistence Layers with Spring Data JPAVMware Tanzu
SpringOne 2021:
Session Title: Building Fast and Scalable Persistence Layers with Spring Data JPA
Speaker: Thorben Janssen, Freelancer at Self-employed
All you need to know about the JavaScript event loopSaša Tatar
Learn the difference between JavaScript Engine, JavaScript Runtime, what is JavaScript event loop and why we should care.
At the end the presentation goes through a couple of examples and implementations of throttle and debounce utility functions.
A short presentation that explains the internals of the Spring Boot framework. Includes an example of a starter and an autoconfig artifac, and a github repo:
https://github.com/MichelSchudel/springbootunderdahood
CMake is an open-source cross-platform build system. It is increasingly becoming the build system of choice for open source projects. The Qt project recently announced that Qbs, the replacement build system for qmake, will no longer be supported and future efforts will focus on CMake. It may become the default build system for Qt version 6.
CMake has offered support for building Qt applications for some time, and is supported within the Qt Creator IDE. In this webinar we will:
-Introduce you to CMake
-Cover its basic features and how to use it
-Show some CMake configurations including Qt-based applications
-Prove how easy it is to use Cmake with Qt so you'll be ready to use it for your C++ and Qt-based applications!
Este conteúdo disponibiliza um curso para o desenvolvimento de APIs RESTful utilizando recursos avançados da especificações JAX-RS, seguindo as boas práticas de desenvolvimento de APIs REST com base nos níveis de maturidade REST descritos por Leonard Richardson.
A customização da API RESTful é realizada a partir de providers JAX-RS, implementando a autenticação com JWT (Json Web Token) e customizações de Hypermedia, tornando a API altamente customizável e adaptável para a leitura e escrita de tipos de dados de vários formatos enviados e recebidos pelo cliente da API REST.
Além do desenvolvimento da API em JAX-RS, será demonstrado exemplos de utilização da API via interfaces Resources, criado clientes proxies HTTP para consumir a API utilizando as implementações da especificação JAX-RS RestEasy.
Todo o código fonte está disponibilizado no repositório: https://bitbucket.org/luan_knebel/vendarapidarestapi/src/master
Obs: Ao baixar o PDF as imagens estarão em melhor qualidade.
이일민 / Epril
---
스프링5에 도입된 웹플럭스와 리액티브 함수형 프로그래밍 기술에 대한 여러가지 테스트 기술을 살펴보고 이를 효과적으로 개발에 적용하는 방법을 설명합니다.
- 리액티브 함수형 프로그래밍과 테스트
- 웹플럭스를 이용하는 웹 테스트
- 스프링5 애플리케이션의 테스트 전략
Building Fast and Scalable Persistence Layers with Spring Data JPAVMware Tanzu
SpringOne 2021:
Session Title: Building Fast and Scalable Persistence Layers with Spring Data JPA
Speaker: Thorben Janssen, Freelancer at Self-employed
All you need to know about the JavaScript event loopSaša Tatar
Learn the difference between JavaScript Engine, JavaScript Runtime, what is JavaScript event loop and why we should care.
At the end the presentation goes through a couple of examples and implementations of throttle and debounce utility functions.
A short presentation that explains the internals of the Spring Boot framework. Includes an example of a starter and an autoconfig artifac, and a github repo:
https://github.com/MichelSchudel/springbootunderdahood
CMake is an open-source cross-platform build system. It is increasingly becoming the build system of choice for open source projects. The Qt project recently announced that Qbs, the replacement build system for qmake, will no longer be supported and future efforts will focus on CMake. It may become the default build system for Qt version 6.
CMake has offered support for building Qt applications for some time, and is supported within the Qt Creator IDE. In this webinar we will:
-Introduce you to CMake
-Cover its basic features and how to use it
-Show some CMake configurations including Qt-based applications
-Prove how easy it is to use Cmake with Qt so you'll be ready to use it for your C++ and Qt-based applications!
Este conteúdo disponibiliza um curso para o desenvolvimento de APIs RESTful utilizando recursos avançados da especificações JAX-RS, seguindo as boas práticas de desenvolvimento de APIs REST com base nos níveis de maturidade REST descritos por Leonard Richardson.
A customização da API RESTful é realizada a partir de providers JAX-RS, implementando a autenticação com JWT (Json Web Token) e customizações de Hypermedia, tornando a API altamente customizável e adaptável para a leitura e escrita de tipos de dados de vários formatos enviados e recebidos pelo cliente da API REST.
Além do desenvolvimento da API em JAX-RS, será demonstrado exemplos de utilização da API via interfaces Resources, criado clientes proxies HTTP para consumir a API utilizando as implementações da especificação JAX-RS RestEasy.
Todo o código fonte está disponibilizado no repositório: https://bitbucket.org/luan_knebel/vendarapidarestapi/src/master
Obs: Ao baixar o PDF as imagens estarão em melhor qualidade.
Spring Data is a high level SpringSource project whose purpose is to unify and ease the access to different kinds of persistence stores, both relational database systems and NoSQL data stores.
Kotlin Bytecode Generation and Runtime Performanceintelliyole
In this talk, we'll dive into the details of how various language features supported by Kotlin are translated to Java bytecode. We'll use the JMH microbenchmarking tool to study the relative performance of various constructs and to understand how we can ensure top performance of the Kotlin code that we write.
Modularizing a project is never easy, a lot of files to move and the dependencies between them is not always what we expect. Then the Dagger configuration used in a single module project often doesn't scale well to a multi module project. Hilt is opinionated about the configuration to use (we don't need to argue anymore about using component dependencies or subcomponents!) and this configuration works perfectly even in a multi module project. In this talk we'll see first an introduction to Hilt and a comparison with Dagger to understand why it's easier to configure. Then we'll see how to leverage it in a multi module project (both in a standard layered architecture and in a Clean Architecture that uses the Dependency Inversion) to improve build speed and code testability. Spoiler alert: using sample apps that include a single feature in the app helps a lot!
Two days git training with labs
First day covers git basis and essential commands
Second day covers git additional command with a big lab using a git workflow
Achievers IT React JS Certification Course in Bangalore. ... UI Development training in Marathahalli ; also benefits as UI training online and UI Developer
EXPLAIN ANALYZE is a new query profiling tool first released in MySQL 8.0.18. This presentation covers how this new feature works, both on the surface and on the inside, and how you can use it to better understand your queries, to improve them and make them go faster.
This presentation is for everyone who has ever had to understand why a query is executed slower than anticipated, and for everyone who wants to learn more about query plans and query execution in MySQL.
**** Java Certification Training: https://www.edureka.co/java-j2ee-soa-training ****
This Edureka tutorial on “Lambda Expressions in Java” will introduce you to a new Java feature called Lambda Expressions. It will also talk about the functional interface in Java. Through this tutorial you will learn the following topics:
Java Lambda Expressions
Functional Interface
Lambda Parameters
Lambda as an Object
Lambda Value Capture
Method References as lambdas
Check out our Java Tutorial blog series: https://goo.gl/osrGrS
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Talk on how to think when building Android apps using a reactive Clean Architecture. This talk was held at the Stockholm Android Meetup group April 17 2018 at Developers bay.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Java som sprog har ikke bevæget sig meget de seneste år. Vi har stadig ikke closures eller funktionelle aspekter som f.eks. C# har haft siden version 3. Er Scala svaret på enhver Javaudviklers bønner eller er sproget kun interessant for tågehoveder som mig, som begynder at synes bedre og bedre om funktionsorientering? Er den store portion syntaktisk sukker, Scala bringer på bordet, bare tomme kalorier?
Spring Data is a high level SpringSource project whose purpose is to unify and ease the access to different kinds of persistence stores, both relational database systems and NoSQL data stores.
Kotlin Bytecode Generation and Runtime Performanceintelliyole
In this talk, we'll dive into the details of how various language features supported by Kotlin are translated to Java bytecode. We'll use the JMH microbenchmarking tool to study the relative performance of various constructs and to understand how we can ensure top performance of the Kotlin code that we write.
Modularizing a project is never easy, a lot of files to move and the dependencies between them is not always what we expect. Then the Dagger configuration used in a single module project often doesn't scale well to a multi module project. Hilt is opinionated about the configuration to use (we don't need to argue anymore about using component dependencies or subcomponents!) and this configuration works perfectly even in a multi module project. In this talk we'll see first an introduction to Hilt and a comparison with Dagger to understand why it's easier to configure. Then we'll see how to leverage it in a multi module project (both in a standard layered architecture and in a Clean Architecture that uses the Dependency Inversion) to improve build speed and code testability. Spoiler alert: using sample apps that include a single feature in the app helps a lot!
Two days git training with labs
First day covers git basis and essential commands
Second day covers git additional command with a big lab using a git workflow
Achievers IT React JS Certification Course in Bangalore. ... UI Development training in Marathahalli ; also benefits as UI training online and UI Developer
EXPLAIN ANALYZE is a new query profiling tool first released in MySQL 8.0.18. This presentation covers how this new feature works, both on the surface and on the inside, and how you can use it to better understand your queries, to improve them and make them go faster.
This presentation is for everyone who has ever had to understand why a query is executed slower than anticipated, and for everyone who wants to learn more about query plans and query execution in MySQL.
**** Java Certification Training: https://www.edureka.co/java-j2ee-soa-training ****
This Edureka tutorial on “Lambda Expressions in Java” will introduce you to a new Java feature called Lambda Expressions. It will also talk about the functional interface in Java. Through this tutorial you will learn the following topics:
Java Lambda Expressions
Functional Interface
Lambda Parameters
Lambda as an Object
Lambda Value Capture
Method References as lambdas
Check out our Java Tutorial blog series: https://goo.gl/osrGrS
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Talk on how to think when building Android apps using a reactive Clean Architecture. This talk was held at the Stockholm Android Meetup group April 17 2018 at Developers bay.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Java som sprog har ikke bevæget sig meget de seneste år. Vi har stadig ikke closures eller funktionelle aspekter som f.eks. C# har haft siden version 3. Er Scala svaret på enhver Javaudviklers bønner eller er sproget kun interessant for tågehoveder som mig, som begynder at synes bedre og bedre om funktionsorientering? Er den store portion syntaktisk sukker, Scala bringer på bordet, bare tomme kalorier?
2017 02-07 - elastic & spark. building a search geo locatorAlberto Paro
Presentazione dell'evento EsInRome del 7 Febbraio 2017 - Integrazione Elasticsearch in architettura BigData e facilità di integrazione con Apache Spark.
2017 02-07 - elastic & spark. building a search geo locatorAlberto Paro
Using Elasticsearch in a BigData environment is very simple. In this talk, we analyse what's Big Data and we show how it is easy integrating ElasticSearch with Apache Spark
Ever wonder what this "new" Kotlin thing is? Curious what the syntax looks like? Unsure how to implement this at your own company? Or do you just want to know what Nick and Cody's favorite things are about this language?
All that and (maybe) more are revealed in Privet Kotlin.
A look at the future of JVM languages including Kotlin, Scala, Groovy, and latest Java.
Which language to use ? what are the benefits of higher level abstractions ? and what are the benefits of programming on the JVM ?
From Java to Parellel Clojure - Clojure South 2019Leonardo Borges
Java still ranks at the top of the TIOBE index. The JVM is a trusted platform which has stood the test of time and is used widely to develop complex, reliable and high performing systems. By choosing to target the JVM, Clojure can leverage all of its power while bringing new ways of writing reliable software into the mix. But why should a Java developer care?
In this talk we will examine the main differences between Java and Clojure, pointing out new patterns and tools and finally ending with a discussion of the concurrency and parallelism abstractions provided by Clojure.
By the end of this talk you will have developed an understanding of Clojure’s fundamental building blocks for writing concurrent applications.
These are the outline slides that I used for the Pune Clojure Course.
The slides may not be much useful standalone, but I have uploaded them for reference.
Python 101 language features and functional programmingLukasz Dynowski
Presentation reviles the syntax solution for common encountered programming challenges, gives insight in to python datatypes, and explains core design principles behind the program
Spring Data Requery is alternatives of Spring Data JPA
Requery is lightweight ORM for DBMS (MySQL, PostgreSQL, H2, SQLite, Oracle, SQL Server)
Spring Data Requery provide Query By Native Query, Query By Example and Query By Property like Spring Data JPA
Spring Data Requery is better performance than JPA
Alternatives of JPA
Requery provide simple Object Mapping & Generate SQL to execute without reflection and session, so fast than JPA, simple and easy to learn.
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
Cryptocurrency trading bots are computer programs designed to automate buying, selling, and managing cryptocurrency transactions. These bots utilize advanced algorithms and machine learning techniques to analyze market data, identify trading opportunities, and execute trades on behalf of their users. By automating the decision-making process, crypto trading bots can react to market changes faster than human traders
Hivelance, a leading provider of cryptocurrency trading bot development services, stands out as the premier choice for crypto traders and developers. Hivelance boasts a team of seasoned cryptocurrency experts and software engineers who deeply understand the crypto market and the latest trends in automated trading, Hivelance leverages the latest technologies and tools in the industry, including advanced AI and machine learning algorithms, to create highly efficient and adaptable crypto trading bots
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.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
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.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
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!
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Studiovity film pre-production and screenwriting softwareinfo611746
Best Video, Film-TV production management & Screenplay software. Take control of your storywriting & film production now. Manage & Collaborate projects with your team. Send call sheet, schedule scenes, attain new productivity peak.
It's World’s #1st Cross-Platform Application For Film Makers & Writers.
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
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.
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
Data privacy is one of the most critical issues that businesses face. This presentation shares insights on the principles and best practices for ensuring the resilience and security of your workload.
Drawing on a real-life project from the HR industry, the various challenges will be demonstrated: data protection, self-healing, business continuity, security, and transparency of data processing. This systematized approach allowed to create a secure AWS cloud infrastructure that not only met strict compliance rules but also exceeded the client's expectations.
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.
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.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
9. Kotlin - The Good (1/3)
• Java Interoperability (@JvmXXXX)
• Familiar Syntax (like Scala, C#, Groovy, Swift …)
• Type Inference (like Scala, C#)
• Smart Casts (`is`, `as`)
• Data Class (Scala case class, POJO with @Data)
10. Kotlin - The Good (1/3)
when (x) {
is Int -> print(x + 1)
is String -> print(x.length + 1)
is IntArray -> print(x.sum())
!is BigDecimal -> print(x)
1L..10L -> print(x)
}
val x: String? = y as String (Unsafe)
val x: String? = y as String? (Unsafe)
val x: String? = y as? String (Safe)
is / !is
as / as?
11. Kotlin - The Good (1/3)
public class User {
private String name;
private Integer age;
public User(String name) {
this(name, 0);
}
public User(String name, Integer age) {
this.name = name;
this.age = age;
}
public String getName() {return this.name;}
public Integer getAge() {return this.age;}
public void setName(String name) {this.name = name; }
public void setAge(Integer age) {this.age = age; }
public boolean equals(Object o) { /* 생략 */ }
public int hashCode() {
return Objects.hash(name, age);
}
protected boolean canEqual(Object other) {return other instanceof User;}
public String toString() {return "User(name=" + this.getName() + ", age=" + this.getAge() + ")";}
}
12. Kotlin - The Good (1/3)
public class User {
private String name;
private Integer age;
public User(String name) {
this(name, 0);
}
public User(String name, Integer age) {
this.name = name;
this.age = age;
}
public String getName() {return this.name;}
public Integer getAge() {return this.age;}
public void setName(String name) {this.name = name; }
public void setAge(Integer age) {this.age = age; }
public boolean equals(Object o) { /* 생략 */ }
public int hashCode() {
return Objects.hash(name, age);
}
protected boolean canEqual(Object other) {return other instanceof User;}
public String toString() {return "User(name=" + this.getName() + ", age=" + this.getAge() + ")";}
}
data class User(var name:String) {
var age:Int = 0
}
13. Kotlin - The Good (2/3)
• Default Arguments
• String Templates (Scala - string interpolation)
• Properties (C#, No Getter, Setter)
14. val tomAge = map["tom"] ?: 0
map["jane"] = 29
val query = """
| CREATE KEYSPACE IF NOT EXISTS $keyspaceName
| WITH replication = { 'class': '$replicationStrategy',
| 'replication_factor':$replicationFactor }
""".trimMargin()
val s = "abc"
val str = "$s.length is ${s.length}" // prints "abc.length is 3"
Kotlin - The Good (2/3)
fun read(b:ByteArray, offset:Int = 0, length:Int = b.size) {
TODO(”Not Implemented”)
}
15. val tomAge = map["tom"] ?: 0
map["jane"] = 29
val query = """
| CREATE KEYSPACE IF NOT EXISTS $keyspaceName
| WITH replication = { 'class': '$replicationStrategy',
| 'replication_factor':$replicationFactor }
""".trimMargin()
val s = "abc"
val str = "$s.length is ${s.length}" // prints "abc.length is 3"
Kotlin - The Good (2/3)
fun read(b:ByteArray, offset:Int = 0, length:Int = b.size) {
TODO(”Not Implemented”)
}
16. val tomAge = map["tom"] ?: 0
map["jane"] = 29
val query = """
| CREATE KEYSPACE IF NOT EXISTS $keyspaceName
| WITH replication = { 'class': '$replicationStrategy',
| 'replication_factor':$replicationFactor }
""".trimMargin()
val s = "abc"
val str = "$s.length is ${s.length}" // prints "abc.length is 3"
Kotlin - The Good (2/3)
fun read(b:ByteArray, offset:Int = 0, length:Int = b.size) {
TODO(”Not Implemented”)
}
17. val tomAge = map["tom"] ?: 0
map["jane"] = 29
val query = """
| CREATE KEYSPACE IF NOT EXISTS $keyspaceName
| WITH replication = { 'class': '$replicationStrategy',
| 'replication_factor':$replicationFactor }
""".trimMargin()
val s = "abc"
val str = "$s.length is ${s.length}" // prints "abc.length is 3"
Kotlin - The Good (2/3)
fun read(b:ByteArray, offset:Int = 0, length:Int = b.size) {
TODO(”Not Implemented”)
}
18. Kotlin - The Good (3/3)
• Destructuring Declarations
• Class, Property Delegates
• Extension Functions (C#)
• Null Safety (C#)
• Better Lambdas than Java (same Scala)
• Scala functional features (use arrow)
• Coroutines (kotlinx-coroutines)
19.
20. Kotlin - The Good (3/3)
fun Int.millis(): Duration = Duration.ofMillis(this.toLong())
fun Int.seconds(): Duration = Duration.ofSeconds(this.toLong())
// 5.seconds() + 400.millis() —> 5400 msec
if (text != null) text.length else -1
text?.length ?: -1
suspend fun Period.daySequence(): Sequence<Int> = buildSequence {
var day = 0
val days = this@daySequence.days
while (day < days) {
yield(day++)
}
}
}
21. Kotlin - The Good (3/3)
if(command!=null) {
if(command.getThreadPoolProperties()!=null) {
if(command.getThreadPoolProperties().maxQueueSize()!=null) {
val x = command.getThreadPoolProperties().maxQueueSize().get()
}
}
}
22. val x = command?.getThreadPoolProperties()?.maxQueueSize()?.get() ?: 0
Kotlin - The Good (3/3)
if(command!=null) {
if(command.getThreadPoolProperties()!=null) {
if(command.getThreadPoolProperties().maxQueueSize()!=null) {
val x = command.getThreadPoolProperties().maxQueueSize().get()
}
}
}
26. Kotlin - The Bad
• No namespace (package variable, methods)
• No static modifier (use companion object)
27. Kotlin - The Bad
class OffHeapOutputStream(private var ohm: OffHeapMemory) : OutputStream() {
companion object {
private val bax = ByteArrayTool.Factory.create()
@JvmField val EMPTY = OffHeapOutputStream(0)
}
}
@file:JvmName("Localex")
/** 지정한 Locale 이 null 이면 기본 Locale 을 반환합니다 */
fun Locale?.orDefault(): Locale = this ?: Locale.getDefault()
29. Kotlin - The Ugly
• SAM conversion
• Unit returning lambdas (Use in java)
• Final by default (안정성? 성능? A bit about picking defaults)
• Open: 50%, Final : 50%
registerCallback(() -> {
/** do stuff */
return Unit.INSTANCE;
})
46. Quiz - How much time takes?
runBlocking {
val jobs = List(100_000) {
launch(CommonPool) {
delay(1000L)
print(".")
}
}
jobs.forEach { it.join() }
}
47. Quiz - How much time takes?
runBlocking {
val jobs = List(100_000) {
launch(CommonPool) {
delay(1000L)
print(".")
}
}
jobs.forEach { it.join() }
}
100,000 Seconds?
48. Quiz - How much time takes?
runBlocking {
val jobs = List(100_000) {
launch(CommonPool) {
delay(1000L)
print(".")
}
}
jobs.forEach { it.join() }
}
100,000 Seconds? Or 1~3 seconds?
49. Quiz - How much time takes?
runBlocking {
val jobs = List(100_000) {
launch(CommonPool) {
delay(1000L)
print(".")
}
}
jobs.forEach { it.join() }
}
100,000 Seconds? Or 1~3 seconds?
51. What is our problem?
• 개발자 수준 편차가 크다
• 조직 수준은 최하위 개발자 수준의 의해 결정된다
52. 변화를 추구하려면?
• 객관적 시각 유지
• History 및 현실 상황 대한 이해 (기술부채)
• 현 조직의 개발 역량 평가
• 동기부여 - 필요성 설득보다는 자각할 수 있도록 자극
• 충분한 학습 시간
• 변화 경험 공유
• ASP -> C#, Java -> Scala
53. Environments 준비
• 개발 Tool 지원 - IntelliJ IDEA
• Static code analysis - ktlint, detekt
• Test code coverage - jacoco (sample)
• Sonarcube - sonar-kotlin plugin
55. Use cases
• Common Library (2017. 6 ~)
• Kotlin extension library
• Components (2017.08 ~ 2017.12)
• Aho-corasick, Korean Tokenizer, Kafka Client
• Standalone Web Application (2017.10~~2017.12)
• Audit Tool
• Large scale system (2017.09~2018.01)
• Catalog creation pipeline system
56. 1. Kotlin Extension library
• Coupang Standard Framework 보조
• Kotlin Best practices 제공
• Object / IO / Utils / Cache / JDBC / Spring …
• Kotlin 학습 예제 제공 (Test cases / Examples)
• Based debop4k (personal project)
57. 2. Korean Tokenizer
• 중복상품 Merge 위한 Tokenizer 필요 (명사 위주)
• Twitter 에서 개발한 open-korean-text 를 Customizing
• Scala vs Kotlin 성능 비교
• Kotlin version is 1.5 ~ 3X faster with Coroutines
• 효과
• Full Indexing per Day 부하 감소 : 30%
• Elastic Search 질의 부하 : 80%
58. “제테스 MSW-3928PR 남성 비치트렁크, 95(L), 블랙블랙계열”
은전한닢 Twitter
블랙
비치
비치트렁크
계열
제테스
3928PR
블랙블랙계열
PR
MSW
,
(
)-
트렁크
3928
95
제테스
남성
59. “제테스 MSW-3928PR 남성 비치트렁크, 95(L), 블랙블랙계열”
은전한닢 Twitter
블랙
비치
비치트렁크
계열
제테스
3928PR
블랙블랙계열
PR
MSW
,
(
)-
트렁크
3928
95
제테스
남성
60. “제테스 MSW-3928PR 남성 비치트렁크, 95(L), 블랙블랙계열”
은전한닢 Twitter
블랙
비치
비치트렁크
계열
제테스
3928PR
블랙블랙계열
PR
MSW
,
(
)
L -
트렁크
3928
95
제테스
남성
61. Tokenizer Benchmark
은전한닢 Twitter RATIO
RPS 73.2 429.5 5.87 X
Avg Latency 626 ms 106 ms 5.91 X
Avg CPU Load 90% 55% 35 % Down
Twitter Tokenizer 는 한음절을 분석하지 못하는 단점이 있다
62. Scala Kotlin RATIO
Tokenize 668.620 ms 197.632 ms 3.38 X
Phrase extractor 644.902 ms 212.500 ms 3.13 X
구문 : “동해물과 백두산이 마르고 닳도록“
Benchmark by jmh
Linux Mint 18.2 Intel I7, 32GB, SSD
63. Why Kotlin is faster?
• Scala 의 loop는 느리다 - 아주 느릴 수 있다
• eclipse-collections 사용
• 메모리 절약
• Primitive type collection 지원
• Kotlin Coroutines
• 비동기 / Non-Blocking
64. 3. Kafka Client - Wilson
• 동기
• 안정된 Kafka 사용을 위해 Offset 관리가 필수
• 각 팀별 중복된 Client 구현 및 삽질
• 효과
• Message 중복 / 유실 없음 (Latest strategy)
• Retry / Circuit breaker 지원
• Metrics 를 활용한 Ack 지원
• 전사 확대 적용 중
65. Wilson message flows
Producer ConsumerKafka
Retry
Circuit Breaker
Metrics
Retry
Circuit Breaker
Metrics
Dead letters
Sending box
Redis
MySQL
Couchbase
Dead letters
Received box
Last sent timestamp Kafka Offset Manager
Message Managements
• Metrics
• Recovery / Retry
• Deadletter handling
67. 4. Audit Tool
• 상품 정보 Audit System
• developers : 1 senior, 2 junior developer
• Software stack
• React
• Spring Boot 1.5 on Vitamin Framework
• jOOQ (향후 requery로 변환 예정)
• Pilot 로 시작, 개발자들의 노력으로 정식 시스템으로 승격
69. 5. Creation Pipeline System
• 상품 정보 생성 프로세스 관리 시스템
• Features
• Workflow (Heavy use Kafka)
• Asynchronous / Non-blocking System
• Need High throughput
75. 반성해야 하는 점
• 기본기 학습 - 닥치고 코딩 (X)
• Java와 차이점 및 Kotlin best practices 검토 필요
• 첫 술에 배부를 수 없다
• 실망하지 말라, Refactoring 은 필수다
• Coroutines 에 대한 학습 및 테스트
• 어차피 비동기는 어렵다.
• Coroutines는 하나의 방법일 뿐이다
76. 안정적 도입을 위한 Tips
• 충분한 학습 기회 & 실습
• Code Quality 중요성 인식
• Upsource 전사 활용 중
• 강력한 동기 부여
• Tech Leader의 지속적인 Leading & Coach
• 성공 사례 만들기 (작은 것부터)
77. 효과
• Safety Code
• Readable Code
• 성능 향상
• Latency 감소, High Throughput 달성
• Asynchronous/Non-Blocking 적용 용이
• 유지보수성 향상 (장애 감소)