While software engineers can disagree on almost any concept of programming best-practice, the necessity of writing unit tests remains undisputed. With the advent of concurrent applications and the ongoing deprecation of the one-thread-per-request model, unit tests do however miss an increasing fraction of programming errors such as race conditions or dead-locking code. But is it even possible to write tests that revise such errors? In the end, a good unit test is characterized by a determined execution path what effectively prevents the use of concurrency within a single test. However, there are tools and programming principles that allow for unit tests of concurrent code. This talk reviews typical mistakes made when concurrent code is tested and introduces Thread Weaver, a test suite for writing valid unit tests that uncover concurrency-related programming errors.
Java Performance Fundamental 세미나 교재입니다
2장은 JVM의 메모리 구조인 Runtime Data Areas에 대한 설명을 하고 있습니다. 크게는4개의 모듈로 나누어 지는 Runtime Data Areas를 부분 별로 자세히 다루고 있습니다. 그리고 나서 우리가 프로그램을 수행할 때 Runtime Data Areas에서는 어떻게 데이터들이 움직이는 지를 간단한 예제를 통해 알아보고자 합니다.
* Runtime Data Areas의 구조
* PC Register
* Java Virtual Machine Stacks
* Native Method Stack
* Method Area
* Java Heap
* Runtime Data Areas Simulation
Lambda: A Peek Under The Hood - Brian GoetzJAX London
This is a *highly technical* session on the details of how Lambda expressions are implemented in the Java language, presented by Java Language Architect Brian Goetz
Java generics(Under The Hood Of The Compiler) by Harmeet singhHarmeet Singh(Taara)
Generics are the powerful feature in Java programming language. In JDK 1.5 the Generics are introduce and it create new evolution in java. Generics are major topic and vast topic but in this we only care about some basics for generics.
While software engineers can disagree on almost any concept of programming best-practice, the necessity of writing unit tests remains undisputed. With the advent of concurrent applications and the ongoing deprecation of the one-thread-per-request model, unit tests do however miss an increasing fraction of programming errors such as race conditions or dead-locking code. But is it even possible to write tests that revise such errors? In the end, a good unit test is characterized by a determined execution path what effectively prevents the use of concurrency within a single test. However, there are tools and programming principles that allow for unit tests of concurrent code. This talk reviews typical mistakes made when concurrent code is tested and introduces Thread Weaver, a test suite for writing valid unit tests that uncover concurrency-related programming errors.
Java Performance Fundamental 세미나 교재입니다
2장은 JVM의 메모리 구조인 Runtime Data Areas에 대한 설명을 하고 있습니다. 크게는4개의 모듈로 나누어 지는 Runtime Data Areas를 부분 별로 자세히 다루고 있습니다. 그리고 나서 우리가 프로그램을 수행할 때 Runtime Data Areas에서는 어떻게 데이터들이 움직이는 지를 간단한 예제를 통해 알아보고자 합니다.
* Runtime Data Areas의 구조
* PC Register
* Java Virtual Machine Stacks
* Native Method Stack
* Method Area
* Java Heap
* Runtime Data Areas Simulation
Lambda: A Peek Under The Hood - Brian GoetzJAX London
This is a *highly technical* session on the details of how Lambda expressions are implemented in the Java language, presented by Java Language Architect Brian Goetz
Java generics(Under The Hood Of The Compiler) by Harmeet singhHarmeet Singh(Taara)
Generics are the powerful feature in Java programming language. In JDK 1.5 the Generics are introduce and it create new evolution in java. Generics are major topic and vast topic but in this we only care about some basics for generics.
Writing software for a virtual machine enables developers to forget about machine code assembly, interrupts, and processor caches. This makes Java a convenient language, but all too many developers see the JVM as a black box and are often unsure of how to optimize their code for performance. This unfortunately adds credence to the myth that Java is always outperformed by native languages. This session takes a peek at the inner workings of Oracle’s HotSpot virtual machine, its just-in-time compiler, and the interplay with a computer’s hardware. From this, you will understand the more common optimizations a virtual machine applies, to be better equipped to improve and reason about a Java program’s performance and how to correctly measure runtime!
Java Performance Fundamental 세미나 자료입니다. 6장은 Thread Synchronization를 다루고 있습니다. 여기서는 Java에서 Thread라는 것은 어떻게 관리되어 왔으며 동기화는 어떤 역할을 하는지를 설명합니다. 더 나아가 JVM의 버전이 올라가면서 추가된 Hotspot JVM의 Biased Lock이나 IBM JVM의 Lock Reservation에 대해서도 설명하고 있습니다.
* Java의 Thread
* Java Synchronization
* Hotspot JVM Synchronization
* IBM JVM Synchronization
ASTs are an incredibly powerful tool for understanding and manipulating JavaScript. We'll explore this topic by looking at examples from ESLint, a pluggable static analysis tool, and Browserify, a client-side module bundler. Through these examples we'll see how ASTs can be great for analyzing and even for modifying your JavaScript. This talk should be interesting to anyone that regularly builds apps in JavaScript either on the client-side or on the server-side.
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)James Titcumb
The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run.
To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before.
After seeing this talk, you’ll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code.
(*actual magic or time-warp not guaranteed)
At first glance, Java byte code can appear to be some low level magic that is both hard to understand and effectively irrelevant to application developers. However, neither is true. With only little practice, Java byte code becomes easy to read and can give true insights into the functioning of a Java program. In this talk, we will cast light on compiled Java code and its interplay with the Java virtual machine. In the process, we will look into the evolution of byte code over the recent major releases with features such as dynamic method invocation which is the basis to Java 8 lambda expressions. Finally, we will learn about tools for the run time generation of Java classes and how these tools are used to build modern frameworks and libraries. Among those tools, I present Byte Buddy, an open source tool of my own efforts and an attempt to considerably simplify run time code generation in Java. (http://bytebuddy.net)
micro(-service) components. While this approach to building software - if done correctly - can improve a system's maintainability and scalability, distributed applications also introduce challanges for operations. Where monolithic applications typically offered direct access to extensive monitoring dashbords, such easy overview is no longer available when multitude services are loosly connected over a network. But how to keep track of a system of such dynamic state?
Distributed tracing is a method of connecting interaction of different services on a network. Collecting and processing such tracing information again allows for the observation of a distributed system in its entirety. This talk shares the presenter's insights gained by working on the JVM-support of distributed tracing for the APM tool Instana. Doing so, it introduces the landscape of distributed tracing on the JVM, discussing popular approaches such as Dapper, Zipkin or Brave/OpenTracing. In the process, it is discussed how byte code instrumentation can be used to capture systems without requiring a user to set up the software under observation. The presentation finishes with a discussion of typical problems of distributed tracing solutions and carefully examines the performance penalties APM tools entail.
At first glance, Java byte code can appear to be some low level magic that is both hard to understand and effectively irrelevant to application developers. However, neither is true. With only little practice, Java byte code becomes easy to read and can give true insights into the functioning of a Java program. In this talk, we will cast light on compiled Java code and its interplay with the Java virtual machine. In the process, we will look into the evolution of byte code over the recent major releases with features such as dynamic method invocation which is the basis to Java 8 lambda expressions. Finally, we will learn about tools for the run time generation of Java classes and how these tools are used to build modern frameworks and libraries. Among those tools, I present Byte Buddy, an open source tool of my own efforts and an attempt to considerably simplify run time code generation in Java.
Writing software for a virtual machine enables developers to forget about machine code assembly, interrupts, and processor caches. This makes Java a convenient language, but all too many developers see the JVM as a black box and are often unsure of how to optimize their code for performance. This unfortunately adds credence to the myth that Java is always outperformed by native languages. This session takes a peek at the inner workings of Oracle’s HotSpot virtual machine, its just-in-time compiler, and the interplay with a computer’s hardware. From this, you will understand the more common optimizations a virtual machine applies, to be better equipped to improve and reason about a Java program’s performance and how to correctly measure runtime!
Java Performance Fundamental 세미나 자료입니다. 6장은 Thread Synchronization를 다루고 있습니다. 여기서는 Java에서 Thread라는 것은 어떻게 관리되어 왔으며 동기화는 어떤 역할을 하는지를 설명합니다. 더 나아가 JVM의 버전이 올라가면서 추가된 Hotspot JVM의 Biased Lock이나 IBM JVM의 Lock Reservation에 대해서도 설명하고 있습니다.
* Java의 Thread
* Java Synchronization
* Hotspot JVM Synchronization
* IBM JVM Synchronization
ASTs are an incredibly powerful tool for understanding and manipulating JavaScript. We'll explore this topic by looking at examples from ESLint, a pluggable static analysis tool, and Browserify, a client-side module bundler. Through these examples we'll see how ASTs can be great for analyzing and even for modifying your JavaScript. This talk should be interesting to anyone that regularly builds apps in JavaScript either on the client-side or on the server-side.
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)James Titcumb
The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run.
To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before.
After seeing this talk, you’ll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code.
(*actual magic or time-warp not guaranteed)
At first glance, Java byte code can appear to be some low level magic that is both hard to understand and effectively irrelevant to application developers. However, neither is true. With only little practice, Java byte code becomes easy to read and can give true insights into the functioning of a Java program. In this talk, we will cast light on compiled Java code and its interplay with the Java virtual machine. In the process, we will look into the evolution of byte code over the recent major releases with features such as dynamic method invocation which is the basis to Java 8 lambda expressions. Finally, we will learn about tools for the run time generation of Java classes and how these tools are used to build modern frameworks and libraries. Among those tools, I present Byte Buddy, an open source tool of my own efforts and an attempt to considerably simplify run time code generation in Java. (http://bytebuddy.net)
micro(-service) components. While this approach to building software - if done correctly - can improve a system's maintainability and scalability, distributed applications also introduce challanges for operations. Where monolithic applications typically offered direct access to extensive monitoring dashbords, such easy overview is no longer available when multitude services are loosly connected over a network. But how to keep track of a system of such dynamic state?
Distributed tracing is a method of connecting interaction of different services on a network. Collecting and processing such tracing information again allows for the observation of a distributed system in its entirety. This talk shares the presenter's insights gained by working on the JVM-support of distributed tracing for the APM tool Instana. Doing so, it introduces the landscape of distributed tracing on the JVM, discussing popular approaches such as Dapper, Zipkin or Brave/OpenTracing. In the process, it is discussed how byte code instrumentation can be used to capture systems without requiring a user to set up the software under observation. The presentation finishes with a discussion of typical problems of distributed tracing solutions and carefully examines the performance penalties APM tools entail.
At first glance, Java byte code can appear to be some low level magic that is both hard to understand and effectively irrelevant to application developers. However, neither is true. With only little practice, Java byte code becomes easy to read and can give true insights into the functioning of a Java program. In this talk, we will cast light on compiled Java code and its interplay with the Java virtual machine. In the process, we will look into the evolution of byte code over the recent major releases with features such as dynamic method invocation which is the basis to Java 8 lambda expressions. Finally, we will learn about tools for the run time generation of Java classes and how these tools are used to build modern frameworks and libraries. Among those tools, I present Byte Buddy, an open source tool of my own efforts and an attempt to considerably simplify run time code generation in Java.
2019/11/23 JJUG CCC 2019 Fall
「多言語対応の仮想マシンGraalVMが照らす未来」のセッションスライドです。
---
オラクル社からGraalVMというOSSプロダクトが発表され、話題を呼んでいます。GraalVMは、Javaで書かれたJITコンパイラ、Graalを搭載しています。さらに、言語実装用のフレームワークTruffleを提供しており、そのフレームワークを使って実装したJavaScriptやRuby、Pythonなど他の言語を、GraalVMは高いパフォーマンス実行できます。GraalVMを多言語対応の仮想マシンと呼ぶ理由です。加えて、それらすべての言語間で、相互に呼び出しができます。また、ネイティブイメージを作成し、JVMを利用せずにアプリケーションを実行できます。MicronautやQuarkus、Helidonといった最新のフレームワークが、この機能を利用して起動時間の短縮を図っています。ともすれば、GraalVMとは、ネイティブイメージを作成するためのものである、というイメージを持たれている方もいるかもしれません。しかし、GraalVMが持つパワーは、それだけではありません。このセッションでは、上述のGraalVMの概要の説明やデモに加え、単にGraalVMの使い方に留まらず、GraalVMによって今後何が実現されるのか、世界でのGraalVMの活用事例、Java on iOSとの関連、といったことお話しします。
Introduction to GraalVM and Native ImageKoichi Sakata
2019/08/23 JVM Language Summit Report Event at KanJava JUG
https://kanjava.connpass.com/event/139770/
This slide is about GraalVM, especially SubstrateVM that is able to generate native images.
Bytecode Manipulation with a Java Agent and Byte BuddyKoichi Sakata
Oracle Code One 2018, Birds of a Feather (BOF) Session
Bytecode Manipulation with a Java Agent and Byte Buddy
[BOF5314]
Tuesday, Oct 23, 07:30 PM - 08:15 PM | Moscone West - Room 2005
Have you ever manipulated Java bytecode? There are several bytecode engineering libraries, and Byte Buddy is one of the easiest, and you can also use Java agents, which are related to the Instrumentation class in the java.lang.instrument API. Instrumentation is the addition of bytecode to methods. Because the changes are purely additive, a Java agent does not modify application state or behavior. With Byte Buddy and a Java agent, we can add behaviors to existing classes. This session explains what Java agents and the instrumentation API are, introduces Byte Buddy, and presents sample code that uses a Java agent and Byte Buddy to modify behavior. The presentation will be useful for those who want to start manipulating Java bytecode with Byte Buddy.
2018 Jul 25th LINE Developer Meetup #41 in Fukuoka
Session Slide in English / セッションスライドです。
Graal in GraalVM - A New JIT Compiler
オラクル社からGraalVMというものが発表され、話題を呼んでいます。GraalVMはHotSpot VM上に新しいJITコンパイラGraalと言語実装用フレームワーク/ASTインタプリタであるTruffle、さらにネイティブイメージ作成機能とその実行に使われるSubstrateVMを併せ持ったものです。すでにTruffleを使用したJavaScriptやRuby、R、Pythonの実装も提供されており、これらの言語とJavaはコードから相互に呼び出しができます。このセッションではGraalVMを概観したあと、JITコンパイラGraalにとくに注力して解説します。GraalとTruffleはOracle Labsとヨハネス・ケプラー大学で共同研究されており、多くの論文が発表されています。HotSpotのJITコンパイラとパフォーマンスや構造などを比較しつつ、GraalのJITコンパイルのテクニックについてもいくつか触れます。とにかく、私がGraalをとても好きなのです。デモも実施しつつ、Graalのすごさを伝えられればと考えています。
2018/03/20(火)に開催した関西Javaエンジニアの会(関ジャバ) '18 3月度イベントでのスライドです。
・From Java EE to Jakarta EE
InfoQ.comの翻訳担当でJava EE関連の記事をかなりの数翻訳しました。MicroProfileのこと、EE4Jのこと、Java EEの名称変更のことなどを話します。
“Purikura” culturein Japan andour web application architectureKoichi Sakata
DevoxxUS Quickie Session on 2017/03/22
Our web application contains more than one billion files of young Japanese women's face image. The photos taken with Photo Booth and are sent to our application through the internet. We use Java, Spring Framework and Oracle RAC as well as MogileFS, is open source distributed filesystem for storing images, . We had not expected that our application had so many images when we started developing. I will explain our architecture, mainly forcused on use cases of MogileFS and troubles we've met. And I also will introduce Japanese "kawaii" culture. "kawaii" includes "lovable", "cute", or "adorable" and the quality of cuteness in the context of Japanese culture. Many Japanese young women take photos with Photo Booth to become more "kawaii".
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matchingharmonylab
公開URL:https://arxiv.org/pdf/2404.19174
出典:Guilherme Potje, Felipe Cadar, Andre Araujo, Renato Martins, Erickson R. ascimento: XFeat: Accelerated Features for Lightweight Image Matching, Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2023)
概要:リソース効率に優れた特徴点マッチングのための軽量なアーキテクチャ「XFeat(Accelerated Features)」を提案します。手法は、局所的な特徴点の検出、抽出、マッチングのための畳み込みニューラルネットワークの基本的な設計を再検討します。特に、リソースが限られたデバイス向けに迅速かつ堅牢なアルゴリズムが必要とされるため、解像度を可能な限り高く保ちながら、ネットワークのチャネル数を制限します。さらに、スパース下でのマッチングを選択できる設計となっており、ナビゲーションやARなどのアプリケーションに適しています。XFeatは、高速かつ同等以上の精度を実現し、一般的なラップトップのCPU上でリアルタイムで動作します。
セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 3 体以上の物体の組み立てが挙げられる.一般に,複数物体を同時に組み立てる際は,対象の部品をそれぞれロボットアームまたは治具でそれぞれ独立に保持することで組み立てを遂行すると考えられる.ただし,この方法ではロボットアームや治具を部品数と同じ数だけ必要とし,部品数が多いほどコスト面や設置スペースの関係で無駄が多くなる.この課題に対して音𣷓らは組み立て対象物に働く接触力等の解析により,治具等で固定されていない対象物が組み立て作業中に運動しにくい状態となる条件を求めた.すなわち,環境中の非把持対象物のロバスト性を考慮して,組み立て作業条件を検討している.本研究ではこの方策に基づいて,複数物体の組み立て作業を単腕マニピュレータで実行することを目的とする.このとき,対象物のロバスト性を考慮することで,仮組状態の複数物体を同時に扱う手法を提案する.作業対象としてパイプジョイントの組み立てを挙げ,簡易な道具を用いることで単腕マニピュレータで複数物体を同時に把持できることを示す.さらに,作業成功率の向上のために RGB-D カメラを用いた物体の位置検出に基づくロボット制御及び動作計画を実装する.
This paper discusses assembly operations using a single manipulator and a parallel gripper to simultaneously
grasp multiple objects and hold the group of temporarily assembled objects. Multiple robots and jigs generally operate
assembly tasks by constraining the target objects mechanically or geometrically to prevent them from moving. It is
necessary to analyze the physical interaction between the objects for such constraints to achieve the tasks with a single
gripper. In this paper, we focus on assembling pipe joints as an example and discuss constraining the motion of the
objects. Our demonstration shows that a simple tool can facilitate holding multiple objects with a single gripper.