Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Glint
Search
Kentaro Kuribayashi
June 07, 2013
Technology
3.7k
2
Share
Glint
RedDotRubyConf 2013
http://www.reddotrubyconf.com/
Kentaro Kuribayashi
June 07, 2013
More Decks by Kentaro Kuribayashi
See All by Kentaro Kuribayashi
あとはAIに任せて人間は自由に生きる
kentaro
5
2.2k
社会人力と研究力ー博士号をキャリアの武器にするー
kentaro
3
310
IoTシステム開発の複雑さを低減するための統合的アーキテクチャ
kentaro
2
2.4k
Bidirectional Quadratic Voting Leveraging Issue-Based Matching
kentaro
2
760
大高生へのメッセージ(令和6年度「大高未来塾」) / Messages to Current Students
kentaro
0
350
「始め方」の始め方 / How to Start Starting Things
kentaro
5
1k
Dynamic IoT Applications and Isomorphic IoT Systems Using WebAssembly
kentaro
1
1.7k
わたしがこのところハマっている「ライセンスフリー無線」のご紹介 / An Invitation to License-Free Radio
kentaro
1
760
先行きの見えなさを楽しさに変える ーVUCA時代のキャリア論と絶対他力主義ー / How to develop your career in the VUCA era
kentaro
8
6.9k
Other Decks in Technology
See All in Technology
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
250
Unlocking the Apps
pimterry
0
230
運用を見据えたAIエージェント設計実践
amacbee
1
2.8k
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
450
Mastering Ruby Box
tagomoris
3
150
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
180
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
5
3.7k
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
140
サイバーセキュリティ概論 / Introduction to Cybersecurity
ks91
PRO
0
150
「コーディング」しない人のための Claude Code 入門 ChatGPT の次の一歩 — 業務に組み込む 育成・共有・自動化
rfdnxbro
2
1.2k
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
180
Databricks 月刊サービスアップデート 2026年05月号
tyosi1212
0
210
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
Typedesign – Prime Four
hannesfritz
42
3.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Chasing Engaging Ingredients in Design
codingconduct
0
210
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Paper Plane (Part 1)
katiecoart
PRO
0
8.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Tell your own story through comics
letsgokoyo
1
940
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Become a Pro
speakerdeck
PRO
31
6k
The agentic SEO stack - context over prompts
schlessera
0
790
Transcript
Glint Fires arbitrary TCP servers http://www.flickr.com/photos/tjblackwell/3107540997/
@kentaro Software engineer to build technical basis Rubyist / Perl
Monger Kentaro Kuribayashi paperboy&co.
None
Problem
Applications often consists of various components
• Cache servers • Storage servers • Job queue/workers •
Other applications (e.g. external APIs) • etc.
• Launch servers in advance (e.g mysql/pg with Rails) •
Stub out connections to the servers (e.g. stub/mock in RSpec) To deal with it, you may:
Launching Servers • We don’t always need such many servers
• It can be waste of limited resources of our daily- used local machine
Stubbing out Connections • Efficient way to test apps that
depends on external components • But we can’t tell whether or not our apps work well indeed against real servers
Solution
Glint
Glint is a library which allows you to fire arbitrary
TCP servers to help you test your codes against those real servers without stubbing out.
1. Fork a child process for a TCP server 2.
Find an empty port for the server 3. Exec the server program using the port 4. Destroy the child process when it’s no longer needed
1. Fork a child process for a TCP server 2.
Find an empty port for the server 3. Exec the server program using the port 4. Destroy the child process when it’s no longer needed
Basic usage
With RSpec
servers/memcached.rb
spec_helper.rb
**_spec.rb
App + External App
initializer/**.rb
**_spec.rb
TCP server + TCP server
Fluentd::Integration
How Glint Cleans up the Servers
http://ruby-doc.org/core-2.0/ObjectSpace.html “ObjectSpace also provides support for object finalizers, procs that
will be called when a specific object is about to be destroyed by garbage collection.”
glint/server.rb Glint::Server#stop
• Stubbing out external connection may cause some problems •
Glint allows you to easily fire up TCP servers as you need • Patches are welcome! Recap