SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
Engineering Efficiency
powered by Go
Huy Do
Software Engineering
LINE corp
reflect.TypeOf(Who)
me := &Who {

Name: "Huy Do",

Location: "Tokyo",

Org: "LINE corp",

Misc: "admin member of Ruby
Vietnam group, and co-founded
kipalog.com",

}
Engineering Efficiency
How to measure
effectiveness?
effectiveness
=
Time Saved
“We massively underinvest
in this kind of work”
Peter Seibel, Twitter
How many
dedicated engineers?
http://www.gigamonkeys.com/flowers/
Engineering
Efficiency at LINE
We do anything,
except raising your
salary!
• Building in-house deploy system
• Building scale in-house monitoring system
• Building / maintaining OSS CI/Repository
system
Building many tools help our colleague
engineers focus in write code efficiently
https://linecorp.com/ja/career/position/786
Introduce Lineflow
LINE
Development process
https://engineering.linecorp.com/ja/blog/detail/38
1. Make JIRA ticket
2. Create local branch follow TICKET-ID-feature
3. Make a Pull Request to upstream/develop
4. Release to Beta server
5. Request QA team to confirm feature
6. Cherry-pick changes to local TICKET-ID-release branch
7. Make a Pull Request to upstream/release
8. Increase artifact version
9. Create RC branch and release to staging server and confirm 

integration
10. Release to Canary server and confirm no big problem
11. Release to all server
12. Close JIRA ticket
We need to follow many
conventions as well
12 steps needed to release
your code production!!!!
it's just too much!!!!!
But Process is needed
• Procedures protect us from stepping
on another's toes
• Conventions help us inspect problem
Problem 1:
Manual copy paste is just painful
design CLI tool for
process automation
Lineflow goals
• Extensible
• Safe
• Reflect the domain
• Zero dependency
Some concepts
• flow
• Set of commands belong to
same domain
• subcommand
• Represent single execute step
workflow
subcommand
Implementation
type Command struct {
Execute func(cmd *Command, args *Args)
Flag flag.FlagSet
...
Name string
parent *Command
childs map[string]*Command
}
type Args struct {
Executable string
Command string
ProgramPath string
Params []string
...
}
type Executor struct {
commands map[string]*Command
execute func(cmds []*cmd.Cmd) error
}
We wrote simple wrapper 

for os/exec
func (r *Executor) Execute() ExecError {
....
cmd := Find(args.Command)
if cmd != nil {
return r.Call(cmd, args)
}
printUsage()
return newExecError(errors.New("command not exist"))
}
func (r *Executor) Find(name string) *Command {
return r.commands[name]
}
Problem 2:
I just forgot what I should do next
Command suggestion
Implementation
Define flow order
flowSpec.Next(cmdCommit).
Next(cmdDevelopPullRequest).
Next(cmdReleaseCherryPick).
Next(cmdReleasePullRequest).
Next(cmdVersionCommit).
Next(cmdRcBranchCreate).
Next(cmdReleaseShareTemplate).
Next(cmdNewDevelopBranch)
DSL to define depedency graph
type FlowSpec struct {
root *CmdNode
last *CmdNode
}
func (f *FlowSpec) NextOf(cmd *c.Command)
(*c.Command, error)
func (f *FlowSpec) Next(cmd *c.Command)
*FlowSpec
struct
called FlowSpec
to implement
the DSL
type CmdNode struct {
value *c.Command
next *CmdNode
prev *CmdNode
}
func (n *CmdNode) Prev(cn *CmdNode) {
n.prev = cn
cn.next = n
}
func (n *CmdNode) Next(cn *CmdNode) {
n.next = cn
cn.prev = n
}
func (n *CmdNode) GetNext() *CmdNode {
return n.next
}
func (n *CmdNode) GetPrev() *CmdNode {
return n.prev
}
Simple double
linked list
What is the last thing
that you've done ?
• Branch name as unique identity
• Just store every executed command
in ~/.lineflow_history (same idea
with .bash_history)
type History struct {
fileLocation string
commands []*c.Command
}
func (h *History) Register(cs ...*c.Command)
func (h *History) Save(cmd *c.Command, meta string) error
func (h *History) traverseFromTop(
f func(*c.Command, string) bool) error
func (h *History) Last(parent *c.Command, meta string)
*c.Command
func (h *History) toHistoryString(cmd *c.Command) string
func (h *History) historyStringToCommand(s string)
(*c.Command, string, error)
So basically that's how
lineflow is built
Thanks to https://github.com/studio3104
lineflow + peco
Lineflow impact
• Saved time
• 500 engineer * 5 minutes ~ 41 hours (per day)
• Make foundation for further internal
tool intergration
• Help new comer get used to the process
What we learned
• Golang is bad at writing DSL
• Hard to develop plugin-style due static
code loader (compare to ruby)
How golang survive in
Java shop
• IntelliJ Golang plugin is great (we can
work with both java/golang in same editor)
• go tools ecosystem is great (debugger,
benchmark, test tool..)
• Distribute golang code is great (we love binary)
How to build good
internal product
• MUST invest resource (there are no
good short-term solution)
• API, and good API
• You need to be an evangelist for your
own product, or no body will use yours :(
Thank you

Contenu connexe

Tendances

The Future starts with a Promise
The Future starts with a PromiseThe Future starts with a Promise
The Future starts with a Promise
Alexandru Nedelcu
 
Asynkron programmering i Visual Studio 11
Asynkron programmering i Visual Studio 11Asynkron programmering i Visual Studio 11
Asynkron programmering i Visual Studio 11
MortenWennevik
 

Tendances (20)

From C++ to JS via Emscripten
From C++ to JS via EmscriptenFrom C++ to JS via Emscripten
From C++ to JS via Emscripten
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScript
 
.Net passé, présent et futur
.Net passé, présent et futur.Net passé, présent et futur
.Net passé, présent et futur
 
C# 6 and 7 and Futures 20180607
C# 6 and 7 and Futures 20180607C# 6 and 7 and Futures 20180607
C# 6 and 7 and Futures 20180607
 
202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP
 
Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.
 
Intro to elixir metaprogramming
Intro to elixir metaprogrammingIntro to elixir metaprogramming
Intro to elixir metaprogramming
 
Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applications
 
SubScript: A Process Algebra extension progress and perspectives
SubScript: A Process Algebra extension progress and perspectivesSubScript: A Process Algebra extension progress and perspectives
SubScript: A Process Algebra extension progress and perspectives
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
The Future starts with a Promise
The Future starts with a PromiseThe Future starts with a Promise
The Future starts with a Promise
 
Asynkron programmering i Visual Studio 11
Asynkron programmering i Visual Studio 11Asynkron programmering i Visual Studio 11
Asynkron programmering i Visual Studio 11
 
C# and vb
C# and vbC# and vb
C# and vb
 
Flow-based programming with Elixir
Flow-based programming with ElixirFlow-based programming with Elixir
Flow-based programming with Elixir
 
Get together on getting more out of typescript & angular 2
Get together on getting more out of typescript & angular 2Get together on getting more out of typescript & angular 2
Get together on getting more out of typescript & angular 2
 
JavaScript Execution Context
JavaScript Execution ContextJavaScript Execution Context
JavaScript Execution Context
 
Dynamic in C# 4.0
Dynamic in C# 4.0Dynamic in C# 4.0
Dynamic in C# 4.0
 
Getting started with typescript
Getting started with typescriptGetting started with typescript
Getting started with typescript
 
2CPP02 - C++ Primer
2CPP02 - C++ Primer2CPP02 - C++ Primer
2CPP02 - C++ Primer
 

Similaire à Engineering Efficiency in LINE

MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
Thomas Conté
 
Advanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien PouliotAdvanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien Pouliot
Xamarin
 

Similaire à Engineering Efficiency in LINE (20)

Ruby on Rails vs ASP.NET MVC
Ruby on Rails vs ASP.NET MVCRuby on Rails vs ASP.NET MVC
Ruby on Rails vs ASP.NET MVC
 
Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms
Creating 3 Beautiful Apps At Once - Intro To Xamarin.FormsCreating 3 Beautiful Apps At Once - Intro To Xamarin.Forms
Creating 3 Beautiful Apps At Once - Intro To Xamarin.Forms
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
Tamir Dresher - Demystifying the Core of .NET Core
Tamir Dresher  - Demystifying the Core of .NET CoreTamir Dresher  - Demystifying the Core of .NET Core
Tamir Dresher - Demystifying the Core of .NET Core
 
Debugging & profiling node.js
Debugging & profiling node.jsDebugging & profiling node.js
Debugging & profiling node.js
 
ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
Advanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien PouliotAdvanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien Pouliot
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
 
Session Four C#
Session Four C# Session Four C#
Session Four C#
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
MSMDC_CLI363
MSMDC_CLI363MSMDC_CLI363
MSMDC_CLI363
 
Dot net guide for beginner
Dot net guide for beginner Dot net guide for beginner
Dot net guide for beginner
 
Skillwise cics part 1
Skillwise cics part 1Skillwise cics part 1
Skillwise cics part 1
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
 
Streaming SQL for Data Engineers: The Next Big Thing? With Yaroslav Tkachenko...
Streaming SQL for Data Engineers: The Next Big Thing? With Yaroslav Tkachenko...Streaming SQL for Data Engineers: The Next Big Thing? With Yaroslav Tkachenko...
Streaming SQL for Data Engineers: The Next Big Thing? With Yaroslav Tkachenko...
 
Streaming SQL for Data Engineers: The Next Big Thing?
Streaming SQL for Data Engineers: The Next Big Thing?Streaming SQL for Data Engineers: The Next Big Thing?
Streaming SQL for Data Engineers: The Next Big Thing?
 
Docking with Docker
Docking with DockerDocking with Docker
Docking with Docker
 
Capistrano Overview
Capistrano OverviewCapistrano Overview
Capistrano Overview
 
IOC + Javascript
IOC + JavascriptIOC + Javascript
IOC + Javascript
 

Plus de Huy Do

CacheとRailsの簡単まとめ
CacheとRailsの簡単まとめCacheとRailsの簡単まとめ
CacheとRailsの簡単まとめ
Huy Do
 
[Htmlday]present
[Htmlday]present[Htmlday]present
[Htmlday]present
Huy Do
 

Plus de Huy Do (16)

Distributed Tracing, from internal SAAS insights
Distributed Tracing, from internal SAAS insightsDistributed Tracing, from internal SAAS insights
Distributed Tracing, from internal SAAS insights
 
Write on memory TSDB database (gocon tokyo autumn 2018)
Write on memory TSDB database (gocon tokyo autumn 2018)Write on memory TSDB database (gocon tokyo autumn 2018)
Write on memory TSDB database (gocon tokyo autumn 2018)
 
Some note about GC algorithm
Some note about GC algorithmSome note about GC algorithm
Some note about GC algorithm
 
Story Writing Byte Serializer in Golang
Story Writing Byte Serializer in GolangStory Writing Byte Serializer in Golang
Story Writing Byte Serializer in Golang
 
Akka と Typeの話
Akka と Typeの話Akka と Typeの話
Akka と Typeの話
 
[Scalameetup]spark shuffle
[Scalameetup]spark shuffle[Scalameetup]spark shuffle
[Scalameetup]spark shuffle
 
DI in ruby
DI in rubyDI in ruby
DI in ruby
 
Itlc2015
Itlc2015Itlc2015
Itlc2015
 
Consistent Hashingの小ネタ
Consistent Hashingの小ネタConsistent Hashingの小ネタ
Consistent Hashingの小ネタ
 
Thriftを用いた分散型のNyancatを作ってきた
Thriftを用いた分散型のNyancatを作ってきたThriftを用いた分散型のNyancatを作ってきた
Thriftを用いた分散型のNyancatを作ってきた
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
実践Akka
実践Akka実践Akka
実践Akka
 
CA15卒勉強会 メタプログラミングについて
CA15卒勉強会 メタプログラミングについてCA15卒勉強会 メタプログラミングについて
CA15卒勉強会 メタプログラミングについて
 
Making CLI app in ruby
Making CLI app in rubyMaking CLI app in ruby
Making CLI app in ruby
 
CacheとRailsの簡単まとめ
CacheとRailsの簡単まとめCacheとRailsの簡単まとめ
CacheとRailsの簡単まとめ
 
[Htmlday]present
[Htmlday]present[Htmlday]present
[Htmlday]present
 

Dernier

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 

Dernier (20)

%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 

Engineering Efficiency in LINE