Spring Fest 2018 Spring Bootで作るRESTful Web ServiceWataruOhno
Spring Fest 2018の資料です。
本セッションでは、Spring BootでRESTful Web Serviceを作成する方法についてお話しします。 環境構築から実装方法、またMockMVCを使ったテストまでを簡単なサンプルを使って解説していきます。 初心者向けのセッションですので、興味のある方はお気軽にお越しください。
JJUC-CCC - Japan Java Users Group Cross Communiy Conference - 2016 Spring 講演資料。
テスト、書いてますか?はい、我々は書いていませんでした。しかし今は違います。将棋の駒を動かすかのように一手ずつテストを書き進めるための戦術と戦略のようなものを、お話しできればと思います。このセッションは同じチームの同僚による昨年秋のセッション「JJUG-CCC 2015 Fall CD-2 Java8移行から始めた技術的負債との戦い」の続編のようなものです。
Spring Fest 2018で発表した資料です。Spring BootからAmazon MQとMongoDBにアクセスする方法を紹介しています。
This document is the material of my presentation at Spring Fest 2018. I will show you how to access ActiveMQ and MongoDB with Spring Boot.
Spring Fest 2018 Spring Bootで作るRESTful Web ServiceWataruOhno
Spring Fest 2018の資料です。
本セッションでは、Spring BootでRESTful Web Serviceを作成する方法についてお話しします。 環境構築から実装方法、またMockMVCを使ったテストまでを簡単なサンプルを使って解説していきます。 初心者向けのセッションですので、興味のある方はお気軽にお越しください。
JJUC-CCC - Japan Java Users Group Cross Communiy Conference - 2016 Spring 講演資料。
テスト、書いてますか?はい、我々は書いていませんでした。しかし今は違います。将棋の駒を動かすかのように一手ずつテストを書き進めるための戦術と戦略のようなものを、お話しできればと思います。このセッションは同じチームの同僚による昨年秋のセッション「JJUG-CCC 2015 Fall CD-2 Java8移行から始めた技術的負債との戦い」の続編のようなものです。
Spring Fest 2018で発表した資料です。Spring BootからAmazon MQとMongoDBにアクセスする方法を紹介しています。
This document is the material of my presentation at Spring Fest 2018. I will show you how to access ActiveMQ and MongoDB with Spring Boot.
WalB: Real-time and Incremental Backup System for Block Devicesuchan_nos
WalB is an open-source backup system that consists of block devices, called WalB devices, and userland utilities, called WalB tools. A WalB device records write-I/Os. WalB tools extracts them to create restorable snapshots in an incremental manner.
Compared with dm-snap and dm-thin, WalB is designed to achieve small I/O latency overhead and short backup time. We conducted an experiment to take an incremental backup of a volume under random write workload. The result confirms those advantages of WalB.
Cybozu cloud platform, which has 500TB volumes and processes 25TB write-I/Os per day, is required to achieve (1) stable workload performance without I/O spikes which may affect application user experience and (2) short backup interval specified in our service level objective. WalB satisfies the requirements, while dm-snap is not enough to and dm-thin is not expected to.
Next2Dで始めるゲーム開発 - Game Development Starting with Next2DToshiyuki Ienaga
CEDEC2022に応募したのですが、見事に落選しました。
が、折角作った資料なので公開します。
I applied for CEDEC2022, but was not selected.
However, I am publishing this document because I made it at an opportunity.
【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.
8. SpringOne 2gx 2014
• 5つのトラック約120セッション
• Core Spring
• Data & Integration
•Web & JavaScript
• Applied Spring
• Big Data
• http://www.slideshare.net/SpringCentral/tag/springone2gx2014
31. Jacksonの@JsonViewサポート
interface PublicView {};
class User {
@PublicView
private String username;
private String password;
// …
}
@RestController
class UserController {
@RequestMapping("/user")
@JsonView(PublicView.class)
User getUser() {
return new User("demo", "password");
}
}
32. Jacksonの@JsonViewサポート
interface PublicView {};
class User {
@PublicView
private String username;
private String password;
// …
}
@RestController
class UserController {
@RequestMapping("/user")
@JsonView(PublicView.class)
User getUser() {
{"username":"demo"}
return new User("demo", "password");
}
}
33. JSONPサポート
@ControllerAdvice
public class JsonpAdvice extends
AbstractJsonpResponseBodyAdvice {
public JsonpAdvice() {
super("callback");
}
}
34. JSONPサポート
@RestController
class UserController {
@RequestMapping("/user")
User getUser() {
return new User("demo", "password");
}
}
GET /user?callback=foo
foo({"username":"demo",
"password":"password"})
37. 使い方
従来のXMLの場合
<mvc:annotation-driven>
<mvc:message-converters>
<bean class=“….GsonHttpMessageConverter” />
</mvc:message-converters>
</mvc:annotation-driven>
Spring Bootの場合
@Configuration
class AppConfig {
@Bean
HttpMessageConverter gsonHttpMessageConverter() {
return new GsonHttpMessageConverter();
}
}
38. ResponseEntityビルダーサポート
Before
public ResponseEntity<String> handle() {
String body = "Hi!";
HttpHeaders headers = new HttpHeaders();
headers.setLocation(location);
return new ResponseEntity(body, headers,
HttpStatus.CREATED);
}
After
public ResponseEntity<String> handle() {
URI location = …;
return ResponseEntity.created(location).body("Hi!");
}
39. RequestEntityビルダーサポート
Before
HttpHeaders headers = new HttpHeaders();
headers.setAccept(MediaType.APPLICATION_JSON);
HttpEntity entity = new HttpEntity("Hi!", headers);
restTemplate.exchange(uri, HttpMethod.POST, entity,
String.class);
After
restTemplate.exchange(RequestEntity.post(uri)
.accept(MediaType.APPLICATION_JSON)
.body(Hi!), String.class);
40. EL関数 s:mvcUrl 追加
@Controller
@RequestMapping("/hotels/{hotel}")
public class BookingController {
@RequestMapping("/bookings/{booking}")
String getBooking(@PathVariable Long booking) {/*…*/}
}
Before
<a href="${pageContext.request.contextPath}/hotels/
21/42" />
After
<a href="${s:mvcUrl('BC#getBooking').arg(0,
42).buildAndExpand(21)}" />
41. URI逆引き
static import MvcUriComponentsBuilder.*;
UriComponents uriComponents = fromMethodCall(
on(BookingController.class).getBooking(21)
).buildAndExpand(42);
URI uri = uriComponents.encode().toUri();
OR
UriComponents uriComponents =
fromMappingName("BC#getBooking")
.arg(0, 21)
.buildAndExpand(42);
URI uri = uriComponents.encode().toUri();
57. Springのキャッシュサポート
Before (Spring 3.1~)
org.springframework.cache.annotation.*
public class BookService {
@Cacheable("books")
public Book findById(String id) {/**/}
@Cacheable(value="books",key=
"T(com.example.BookIdResolver).resolve(#isbn)")
public Book findByIsbn(ISBN isbn) {/**/}
@CachePut(value="books",key="#book.id")
public void update(Book book) {/**/}
@CacheEvict("books")
public void delete(String id) {/**/}
}
58. Springのキャッシュサポート
Before (Spring 4.1の改善)
@CacheConfig("books")
public class BookService {
@Cacheable
public Book findById(String id) {/**/}
@Cacheable(key="T(com.example.BookIdResolver).resolve(#isbn)")
public Book findByIsbn(ISBN isbn) {/**/}
@CachePut(key="#book.id")
public void update(Book book) {/**/}
@CacheEvict
public void delete(String id) {/**/}
}
org.springframework.cache.annotation.*
59. JCacheサポート
After
javax.cache.annotation.*
@CacheDefaults(cacheName = "books")
public class BookService {
@CacheResult
public Book findById(String id) {/**/}
@CacheResult(cacheKeyGenerator = IsbnCacheKeyGenerator.class)
public Book findByIsbn(ISBN isbn) {/**/}
@CachePut
public void update(String id,
@CacheValue Book book) {/**/}
@CacheRemove
public void delete(String id) {/**/}}
60. Configuration
@Configuration
@EnableCaching
public class AppConfig {
@Value("classpath:my-ehcache.xml")
Resource ehCacheConfig;
@Bean
CacheManager cacheManager() {
return new EhCacheManager(EhCacheManagerUtils
.buildCacheManager(ehCacheConfig));
}
// …
}
Before
61. Configuration
Before
@Configuration
@EnableCaching
public class AppConfig {
@Bean
CacheManager cacheManager() {
return new JCacheManager();
}
// …
}
62. Configuration
Before
@Configuration
@EnableCaching
public class AppConfig {
@Bean
CacheManager cacheManager() {
javax.cache.CacheManager
cacheManager = Caching.getCachingProvider()
.getCacheManager();
// JCache standard configuration …
return new JCacheManager(cacheManager);
}
}