1. The document discusses RESTful APIs and gRPC, comparing their characteristics and use cases.
2. RESTful APIs typically use HTTP and JSON to access resources via URLs while gRPC uses protocol buffers and HTTP/2 for efficient streaming and RPC.
3. gRPC is better suited for microservices and mobile apps due to its ability to handle streaming and performance, while REST is more widely used due to its simplicity and support in most languages.
「TECH x GAME COLLEGE #21」 2019/06/05 登壇資料
https://techxgamecollege.connpass.com/event/130420/
【Laravelを用いたゲームサーバーのチューニング】
主にDB周りの話題で、
・速度を出す
・水平分散をする
という観点で
Laravelをゲームサーバーで用いた際にチューニングしてきたことを紹介します。
The document discusses 3D modeling in JavaFX and describes how to create a basic cube shape using a Box primitive. Code is provided to instantiate a new Box object with dimensions of 150 units each way and add it to the scene graph as a child of the parent node. Additional 3D primitives like sphere and cylinder are listed, as well as options for custom meshes, importing models, and viewing 3D content in JavaFX.
1. The document discusses RESTful APIs and gRPC, comparing their characteristics and use cases.
2. RESTful APIs typically use HTTP and JSON to access resources via URLs while gRPC uses protocol buffers and HTTP/2 for efficient streaming and RPC.
3. gRPC is better suited for microservices and mobile apps due to its ability to handle streaming and performance, while REST is more widely used due to its simplicity and support in most languages.
「TECH x GAME COLLEGE #21」 2019/06/05 登壇資料
https://techxgamecollege.connpass.com/event/130420/
【Laravelを用いたゲームサーバーのチューニング】
主にDB周りの話題で、
・速度を出す
・水平分散をする
という観点で
Laravelをゲームサーバーで用いた際にチューニングしてきたことを紹介します。
The document discusses 3D modeling in JavaFX and describes how to create a basic cube shape using a Box primitive. Code is provided to instantiate a new Box object with dimensions of 150 units each way and add it to the scene graph as a child of the parent node. Additional 3D primitives like sphere and cylinder are listed, as well as options for custom meshes, importing models, and viewing 3D content in JavaFX.
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)savageautomate
Presented @ DEVOXX 2014
RASPBERRY PI WITH JAVA 8
UNIVERSITY SESSION
Tuesday at 13:30 - 16:30 @ ROOM 9
Stephen Chin (@SteveOnJava)
James Weaver (@JavaFXpert)
Robert Savage (@savageautomate)
http://cfp.devoxx.be/2014/talk/IWS-5192/Raspberry_Pi_with_Java_8
http://www.savagehomeautomation.com/projects/pi4j-devoxx-2014.html
These slides are the Pi4J portion of the presentation presented by Robert Savage.
This document summarizes a presentation on using Raspberry Pi with Java 8. It discusses using Pi4J to access GPIO pins and I2C on the Raspberry Pi to control hardware components like LEDs, switches, and sensors. Example code is provided to toggle an LED using a button press via GPIO interrupts. Attendees will learn how to interface with common sensors like temperature, pressure and more to build a prototype shipping container monitoring device.
IoT Devices Compliant with JC-STAR Using Linux as a Container OSTomohiro Saneyoshi
Security requirements for IoT devices are becoming more defined, as seen with the EU Cyber Resilience Act and Japan’s JC-STAR.
It's common for IoT devices to run Linux as their operating system. However, adopting general-purpose Linux distributions like Ubuntu or Debian, or Yocto-based Linux, presents certain difficulties. This article outlines those difficulties.
It also, it highlights the security benefits of using a Linux-based container OS and explains how to adopt it with JC-STAR, using the "Armadillo Base OS" as an example.
Feb.25.2025@JAWS-UG IoT
36. 36
関数型インターフェース(JLS9.8)
A functional interface is an interface that has just one abstract method, and thus represents a single function contract. (In some cases, this "single" method may take the form of multiple
abstract methods with override-equivalent signatures (8.4.2) inherited from superinterfaces; in this case, the inherited methods logically represent a single method.)
More precisely, for interface I, let M be the set of abstract methods that are members of I but that do not have the same signature as any public instance method of the class Object. Then I is
a functional interface if there exists a method m in M for which the following conditions hold:
The signature of m is a subsignature (8.4.2) of every method's signature in M.
m is return-type-substitutable (8.4.5) for every method in M.
In addition to the usual process of creating an interface instance by declaring (8.1) and instantiating (15.9) a class, instances of functional interfaces can be created with lambda expressions
(15.27), method references (15.28), or constructor references.
The function descriptor of a functional interface I is a method type (8.2) that can be used to legally override (8.4.8) the abstract method(s) of I.
Let M be the set of abstract methods defined above for I. The descriptor of I consists of the following:
Type parameters, formal parameters, and return types: Let m be a method in M with i) a signature that is a subsignature of every method's signature in M and ii) a return type that is a
subtype of every method's return type in M (after adapting for any type parameters (8.4.4)); if no such method exists, then let m be a method in M that i) has a signature that is a subsignature
of every method's signature in M and ii) is return-type-substitutable for every method in M. Then the descriptor's type parameters, formal parameter types, and return type are as given by m.
Thrown types: The descriptor's thrown types are derived from the throws clauses of the methods in M. If the descriptor is generic, these clauses are first adapted to the type parameters of
the descriptor (8.4.4); if the descriptor is not generic but at least one method in M is, these clauses are first erased. Then the descriptor's thrown types include every type, E, satisfying the
following constraints:
E is mentioned in one of the throws clauses.
For each throws clause, E is a subtype of some type named in that clause.
A functional interface type is one of the following:
A functional interface
A parameterization (4.5) of a functional interface
An intersection (4.9) of interface types that meets the following criteria:
Exactly one element of the intersection is a functional interface, or a parameterization of a functional interface. Let F be this interface.
A notional interface, I, that extends all the interfaces in the intersection would be a functional interface. If any of the intersection elements is a parameterized type, then I is generic: for
each element of the intersection that is a parameterized type J<A1...An>, let P1...Pn be the type parameters of J; then P1...Pn are also type parameters of I, and I extends the type
J<P1...Pn>.
The function descriptor of I is the same as the function descriptor of F.
The function descriptor of a parameterized functional interface, F<A1...An>, where A1...An are type arguments (4.5.1), is derived as follows. Let P1...Pn be the type parameters of F; types
T1...Tn are derived from the type arguments according to the following rules (for 1 ≤ i ≤ n):
If Ai is a type, then Ti = Ai.
If Ai is a upper-bounded wildcard ? extends Ui, then Ti = Ui.
If Ai is a lower-bounded wildcard ? super Li, then Ti = Li.
If Ai is an unbound wildcard ?, then if Pi has upper bound Bi that mentions none of P1...Pn, then Ti = Bi; otherwise, Ti = Object.
If F<T1...Tn> is a well-formed type, then the descriptor of F<A1...An> is the result of applying substitution [P1:=T1, ..., Pn:=Tn] to the descriptor of interface F. Otherwise, the descriptor of
F<A1...An> is undefined.
The function descriptor of an intersection that is a functional interface type is the same as the function descriptor of the functional interface or parameterization of a functional interface that is
an element of the intersection.
37. 37
関数型インターフェース(JLS9.8)
A functional interface is an interface that has just one abstract method, and thus represents a single function contract. (In some cases, this "single" method may take the form of multiple
abstract methods with override-equivalent signatures (8.4.2) inherited from superinterfaces; in this case, the inherited methods logically represent a single method.)
More precisely, for interface I, let M be the set of abstract methods that are members of I but that do not have the same signature as any public instance method of the class Object. Then I is
a functional interface if there exists a method m in M for which the following conditions hold:
The signature of m is a subsignature (8.4.2) of every method's signature in M.
m is return-type-substitutable (8.4.5) for every method in M.
In addition to the usual process of creating an interface instance by declaring (8.1) and instantiating (15.9) a class, instances of functional interfaces can be created with lambda expressions
(15.27), method references (15.28), or constructor references.
The function descriptor of a functional interface I is a method type (8.2) that can be used to legally override (8.4.8) the abstract method(s) of I.
Let M be the set of abstract methods defined above for I. The descriptor of I consists of the following:
Type parameters, formal parameters, and return types: Let m be a method in M with i) a signature that is a subsignature of every method's signature in M and ii) a return type that is a
subtype of every method's return type in M (after adapting for any type parameters (8.4.4)); if no such method exists, then let m be a method in M that i) has a signature that is a subsignature
of every method's signature in M and ii) is return-type-substitutable for every method in M. Then the descriptor's type parameters, formal parameter types, and return type are as given by m.
Thrown types: The descriptor's thrown types are derived from the throws clauses of the methods in M. If the descriptor is generic, these clauses are first adapted to the type parameters of
the descriptor (8.4.4); if the descriptor is not generic but at least one method in M is, these clauses are first erased. Then the descriptor's thrown types include every type, E, satisfying the
following constraints:
E is mentioned in one of the throws clauses.
For each throws clause, E is a subtype of some type named in that clause.
A functional interface type is one of the following:
A functional interface
A parameterization (4.5) of a functional interface
An intersection (4.9) of interface types that meets the following criteria:
Exactly one element of the intersection is a functional interface, or a parameterization of a functional interface. Let F be this interface.
A notional interface, I, that extends all the interfaces in the intersection would be a functional interface. If any of the intersection elements is a parameterized type, then I is generic: for
each element of the intersection that is a parameterized type J<A1...An>, let P1...Pn be the type parameters of J; then P1...Pn are also type parameters of I, and I extends the type
J<P1...Pn>.
The function descriptor of I is the same as the function descriptor of F.
The function descriptor of a parameterized functional interface, F<A1...An>, where A1...An are type arguments (4.5.1), is derived as follows. Let P1...Pn be the type parameters of F; types
T1...Tn are derived from the type arguments according to the following rules (for 1 ≤ i ≤ n):
If Ai is a type, then Ti = Ai.
If Ai is a upper-bounded wildcard ? extends Ui, then Ti = Ui.
If Ai is a lower-bounded wildcard ? super Li, then Ti = Li.
If Ai is an unbound wildcard ?, then if Pi has upper bound Bi that mentions none of P1...Pn, then Ti = Bi; otherwise, Ti = Object.
If F<T1...Tn> is a well-formed type, then the descriptor of F<A1...An> is the result of applying substitution [P1:=T1, ..., Pn:=Tn] to the descriptor of interface F. Otherwise, the descriptor of
F<A1...An> is undefined.
The function descriptor of an intersection that is a functional interface type is the same as the function descriptor of the functional interface or parameterization of a functional interface that is
an element of the intersection.
@
FunctionalInterface
54. 54
ラムダ式のメソッド本体
(int n) -> {return n + 5;}
(n) -> {return n + 5;}
n -> {return n + 5;}
● return文のみ場合,return等を省略できる
(int n) -> n + 5
(n) -> n + 5
n -> n + 5
70. 70
ラムダ式の利用例
p -> p.getName()
s -> Integer.parseInt(s)
o -> list.add(o)
init -> new MyClass(init)
n -> new int[n]
● 引数を受け流すパターン
71. 71
ラムダ式の利用例
p -> p.getName()
s -> Integer.parseInt(s)
o -> list.add(o)
init -> new MyClass(init)
n -> new int[n]
● 引数を受け流すパターン
● メソッド・コンストラクタ参照
72. 72
メソッド・コンストラクタ参照
p -> p.getName()
s -> Integer.parseInt(s)
o -> list.add(o)
init -> new MyClass(init)
n -> new int[n]
● クラス名等::メソッド or new
Person::getName
Integer::perseInt
list::add
MyClass::new
int[]::new
126. 126
多重継承
class BasicPerson {
public boolean isMan() {/*...*/}
}
class ComplexPerson extends BasicPerson
implements Person {
public Sex getSex() {/*...*/}
}
130. 130
Class always win
class BasicPerson {
public boolean isMan() {/*...*/}
}
class ComplexPerson extends BasicPerson implements
Person {
public Sex getSex() {/*...*/}
}
● BasicPerson#isManが使われる
– “Class always win”
131. 131
親インターフェースの呼び出し
class ComplexPerson extends BasicPerson
implements Person {
public Sex getSex() {/*...*/}
public boolean isMan() {
return Person.super.isMan();
}
}
● インターフェース名.super.メソッド名(...)
186. 194
Putting it together
List<StudentID> list = new ArrayList<>();
for (Student s : students) {
if (s.getGrade() == 2 &&
s.getGPA() >= 3.5) {
list.add(s.getID());
}
}