This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
The document discusses static analysis in Go. It describes how the Go programming language and standard library packages like go/scanner, go/token, go/parser, and go/types enable easy static analysis of Go code. These packages allow tokenizing, parsing, building abstract syntax trees, and type checking Go source code. Examples of static analysis tools for Go are provided, including tools for formatting, linting, and refactoring code. Static analysis is also discussed in the context of building products like documentation generators and configuration evaluation tools.
This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
The document discusses static analysis in Go. It describes how the Go programming language and standard library packages like go/scanner, go/token, go/parser, and go/types enable easy static analysis of Go code. These packages allow tokenizing, parsing, building abstract syntax trees, and type checking Go source code. Examples of static analysis tools for Go are provided, including tools for formatting, linting, and refactoring code. Static analysis is also discussed in the context of building products like documentation generators and configuration evaluation tools.
Mobile Apps by Pure Go with Reverse BindingTakuya Ueda
This document discusses developing Android apps in Go using the gomobile tool. It covers cross-compiling Go code for Android, using cgo to access Android platform APIs, and developing both SDK and native Android apps in Go. It then describes how gomobile bind can generate bindings between Go and Java to allow accessing Android platform APIs from Go code through reverse bindings. This allows writing fully native Android apps directly in Go.
This document discusses differences in how browsers implement WebRTC. It describes the architectures of Chrome, Firefox, and Webkit and how they vary in their use of the libWebRTC library. For Chrome, it notes that Chrome does not use libWebRTC directly due to its layered architecture and security model. It also provides code snippets to enable logging to trace the different browser implementations without recompiling.
13. 本日のコンテンツ
OutOfMemoryErrorに備える
• GCログによる過度なヒープ消費の発見
• クラスヒストグラム
/
ヒープダンプによる解析
スローダウン
/
タイムアウトに備える
• スレッドダンプ と hprofプロファイラ
• JTAタイムアウトの罠
OSの設定漏れに備える
• too
many
open
files
• unable
to
create
new
na6ve
thread
【JJUG
CCC
2014
Spring
H-‐2】
トラブル 第1位
トラブル 第2位
トラブル 第3位
14. 本日のコンテンツ
OutOfMemoryErrorに備える
• GCログによる過度なヒープ消費の発見
• クラスヒストグラム
/
ヒープダンプによる解析
スローダウン
/
タイムアウトに備える
• スレッドダンプ と hprofプロファイラ
• JTAタイムアウトの罠
OSの設定漏れに備える
• too
many
open
files
• unable
to
create
new
na6ve
thread
【JJUG
CCC
2014
Spring
H-‐2】
トラブル 第1位
トラブル 第2位
トラブル 第3位
15. 【JJUG
CCC
2014
Spring
H-‐2】
Meta
Space
Other
JVM
Mem
Eden
Survivor
Old(Tenured)
Young(New)
OutOfMemoryとは
:
Javaヒープ振り返り
S0
S1
User agetsuma =
new
User(“Norito Agetsuma”);
java.lang.OutOfMemoryError:
Java
heap
space
ヒープが足りない
16. 【JJUG
CCC
2014
Spring
H-‐2】
OutOfMemoryErrorに備える
【1.予兆の確認】
Java
Heap
6me
-‐Xmx:
4G
3GB
2GB
1GB
『GCログの出力』
【2.発生時の解析】
『ヒープダンプ』
『クラスヒストグラム』
num
#instances
#bytes
class
name
-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐
1
10000
250000
java.lang.String
2
8000
200000
foo.Sample
Old
New
S0
S1
.hprofファイル(バイナリ形式)
負荷大
負荷中
25.471:
[GC
(Alloca6on
Failure)
192453K-‐>98057K(506816K),
0.1321301
secs]
負荷小
46. スレッドダンプ出力例
"default
task-‐10"
prio=5
6d=0x00007fef5bb8d000
nid=0xb307
wai6ng
on
condi6on
[0x000000011090a000]
java.lang.Thread.State:
TIMED_WAITING
(parking)
at
sun.misc.Unsafe.park(Na6ve
Method)
-‐
parking
to
wait
for
<0x00000007fea15470>
at
java.u6l.concurrent.locks.LockSupport.parkNanos
…
〜
省略 〜
at
org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnec6on…
at
slowweb.SlowServlet.processRequest(SlowServlet.java:44)
at
slowweb.SlowServlet.doGet(SlowServlet.java:78)
at
javax.servlet.hjp.HjpServlet.service(HjpServlet.java:687)
アプリケーション
のスタック
WildFly内部
のスタック
【JJUG
CCC
2014
Spring
H-‐2】
47. スレッドダンプ出力例
"default
task-‐10"
prio=5
6d=0x00007fef5bb8d000
nid=0xb307
wai6ng
on
condi6on
[0x000000011090a000]
java.lang.Thread.State:
TIMED_WAITING
(parking)
at
sun.misc.Unsafe.park(Na6ve
Method)
-‐
parking
to
wait
for
<0x00000007fea15470>
at
java.u6l.concurrent.locks.LockSupport.parkNanos
…
〜
省略 〜
at
org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnec6on…
at
slowweb.SlowServlet.processRequest(SlowServlet.java:44)
at
slowweb.SlowServlet.doGet(SlowServlet.java:78)
at
javax.servlet.hjp.HjpServlet.service(HjpServlet.java:687)
アプリケーション
のスタック
WildFly内部
のスタック
データソースプール枯渇時の接続取得待ちスレッドの例
【JJUG
CCC
2014
Spring
H-‐2】