SlideShare a Scribd company logo
1 of 78
Download to read offline
Plugin-based software design
with Ruby and RubyGems
Sadayuki Furuhashi

Founder & Software Architect
RubyKaigi 2015
A little about me…
Sadayuki Furuhashi
github: @frsyuki
Fluentd - Unifid log collection infrastracture
Embulk - Plugin-based parallel ETL Founder & Software Architect
It's like JSON.
but fast and small.
A little about me…
What’s Plugin Architecture?
Benefits of Plugin Architecture
> Plugins bring many features
> Plugins keep core software simple
> Plugins are easy to test
> Plugins builds active developer community
Benefits of Plugin Architecture
> Plugins bring many features
> Plugins keep core software simple
> Plugins are easy to test
> Plugins builds active developer community
> “…if it’s designed well”.


plugin architecture?
How to design


plugin architecture?
How did I design
How to design
Today’s topic
> Plugin Architecture Design Patterns
> Plugin Architecture of Fluentd
> Plugin Architecture of Embulk
> Pitfalls & Challenges
Plugin Architecture

Design Patterns
Plugin Architecture Design Patterns
a) Traditional Extensible Software Architecture
b) Plugin-based Software Architecture
Traditional Extensible Software Architecture
Host
Application
Plugin
Plugin
Register plugins
to extension points
To add more extensibility,
add more extension points.
Plugin-based software architecture
Core
Plugin
Plugin
Plugin Plugin Plugin
Plugin Plugin
Application
Plugin-based software architecture
• Application as a network of plugins.
> Plugins: provide features.
> Core: framework to implement plugins.
• More flexibility != More complexity.
• Application must be designed as modularized.
> It’s hard to design :(
> Optimizing performance is difficult :(
• Loosely-coupled API often makes performance
worse.
Design Pattern 1: Dependency Injection
Core
class
interface
class interface interface
class class A component is
an interface or

a class.
Each component publishes API:
Design Pattern 1: Dependency Injection
Core
class
Plugin
Plugin Plugin Plugin
class Plugin
When application runs:
A DI container

replaces objects
with plugins when
application runs
Replace classes
with mocks for
unit tests
Design Pattern 1: Dependency Injection
Core
dummy
dummy
dummy dummy dummy
Plugin dummy
Testing the application
Dependency Injection (Java)
public interface Store
{
void store(String data);
}
public class Module
{
@Inject
Module(Store store)
{
store.store();
}
}
public class DummyStore
implements Store
{
void store(String data) { }
}
public class MainModule
implements Module
{
public void configure(
Binder binder)
{
binder.bind(Store.class)
.to(DummyStore.class);
}
}
interface → implementation

mapping
From source code,
implementation is black box.
It’s replaced at runtime.
Dependency Injection (Ruby)
Ruby?
(What’s a good way to use DI in Ruby?)
(Please tell me if you know)
Dependency Injection (Ruby)
class Module
def initialize(store:
DummyStore.new)
store.store(”data”)
end
end
class DummyStore
def store(data)
end
end
injector = Injector.new.
bind(store: DBStore)
object = injector.get(Module)
class DBStore
def initialize(db: DBM.new)
@db = db
end
def store(data)
@db.insert(data)
end
end
injector = Injector.new.
bind(store: DBStore).
bind(db: SqliteDBImpl)
object = injector.get(Module)
I want to do this: Keyword arguments
{:keyword => class} mapping

at runtime
Design Pattern 2: Dynamic Plugin Loader
Core
Plugin Plugin
Calls Plugin loader
to load plugins
Plugin
Loader
Design Pattern 2: Dynamic Plugin Loader
Core
Plugin Plugin
Plugins also call Plugin Loader.
Plugins create an ecosystem.
Plugin
Loader
Plugin Plugin
Design Pattern 3: Combination
Core
class
Plugin
class Plugin Plugin
class class
Plugin
Loader
Plugin
Plugin Plugin
Plugin Plugin
Dependency Injection + Plugin Loader
Plugin Architecture Design Patterns
a) Traditional Extensible Software Architecture
b) Plugin-based Software Architecture
> Dependency Injection (DI)
> Dynamic Plugin Loader
> Combination of those
There’re trade-offs
> Choose the best solution for each project
Plugin Architecture

of Fluentd
What’s Fluentd?
> Data collector for unified logging layer
> Streaming data transfer based on JSON
> Written in C & Ruby
> Plugin Marketplace on RubyGems
> http://www.fluentd.org/plugins
> Working in production
> http://www.fluentd.org/testimonials
Deployment of Fluentd
Deployment of Fluentd
The problems around log collection…
Solution: N × M → N + M
plugins
# logs from a file
<source>
type tail
path /var/log/httpd.log
pos_file /tmp/pos_file
format apache2
tag web.access
</source>
# logs from client libraries
<source>
type forward
port 24224
</source>
# store logs to ES and HDFS
<match web.*>
type copy
<store>
type elasticsearch
logstash_format true
</store>
<store>
type s3
bucket s3-event-archive
</store>
</match>
<match metrics.*>
type nagios
host watch-server
</match>
Example: Simple forwarding
Example: HA & High performance
- HA (fail over)
- Load-balancing
- Choice of at-most-once or at-least-once
Example: Realtime search + Batch Analytics combo
All data
Hot data
Fluentd Core
Event

Router
Input
Plugin
Output
Plugin
Filter
Plugin
Buffer
Plugin
Output
Plugin
Input
Plugin
Plugin Architecture of Fluentd
Plugin
Loader
Fluentd Core
Event

Router
Input
Plugin
Output
Plugin
Filter
Plugin
Buffer
Plugin
Output
Plugin
Input
Plugin
Plugin Marketplace using RubyGems.org
$ gem install
fluent-plugin-s3
Plugin
Loader
/gems/
RubyGems.org
Fluentd’s Plugin Architecture
• Fluentd is a plugin-based event collector.
> Fluentd core: takes care of message routing
between plugins.
> Plugins: do all other things!
• 300+ plugins released on RubyGems.org
• Fluentd loads plugins using Gem API.
Plugin Architecture

of Embulk
Embulk:
Open-source Bulk Data Loader
written in Java & JRuby
Amazon S3
MySQL
FTP
CSV Files
Access Logs
Salesforce.com
Elasticsearch
Cassandra
Hive
Redis
Reliable
framework :-)
Parallel execution,
transaction, auto guess,
…and many by plugins.
Demo
Use case 1: Sync MySQL to Elasticsearch
embulk-input-mysql
embulk-filter-kuromoji
embulk-output-elasticsearch
MySQL
kuromoji
Elasticsearch
Use case 2: Load from S3 to Analytics
embulk-parser-csv
embulk-decoder-gzip
embulk-input-s3
csv.gz
on S3
Treasure Data
BigQuery
Redshift
+
+
embulk-output-td
embulk-output-bigquery
embulk-output-redshift
embulk-executor-mapreduce
Use case 3: Embulk as a Service at Treasure Data
Use case 3: Embulk as a Service at Treasure Data
REST API to load/export data
to/from Treasure Data
Input Output
Embulk’s Plugin Architecture
Embulk Core
Executor Plugin
Filter Filter
Guess
Output
Embulk’s Plugin Architecture
Embulk Core
Executor Plugin
Filter Filter
GuessFileInput
Parser
Decoder
Guess
Embulk’s Plugin Architecture
Embulk Core
FileInput
Executor Plugin
Parser
Decoder
FileOutput
Formatter
Encoder
Filter Filter
Embulk’s Plugin Architecture
Embulk Core
PluginManager
Executor Plugin
InjectedPluginSource
ParserPlugin
JRubyPluginLoader
FormatterPlugin
JRuby
Plugin
Loader
Plugin
FilterPlugin
OutputPluginInputPlugin
JRuby RuntimeJava Runtime
Plugin Marketplace using RubyGems.org
Embulk Core
PluginManager
Executor Plugin
InjectedPluginSource
ParserPlugin FormatterPluginFilterPlugin
OutputPluginInputPlugin
JRuby RuntimeJava Runtime
$ embulk gem install
embulk-input-oracle
/gems/
RubyGems.org
JRubyPluginLoader
JRuby
Plugin
Loader
Plugin
Plugin Package Structure
embulk-input-s3.gem
+- build.gradle
|
+- src/main/java/org/embulk/input/s3
| - S3FileInputPlugin.java
| AwsCredentials.java
|
+- classpath/
| - embulk-input-s3-0.2.6.jar
| aws-java-sdk-s3-1.10.33.jar
| httpclient-4.3.6.jar
|
+- lib/embulk/input/
- s3.rb
Java source
files
Compiled
jar file
All dependent

jar files
Ruby script to

load the jar files
Embulk Plugin Load Sequence
Bundler.setup_environment
Embulk::Runner = Embulk::Runner.new(
.embulk.EmbulkEmbed::Bootstrap.new.initialize)
Embulk::Runner.run(ARGV)
Java
JRuby
Java
org.embulk.cli.Main.main(String[] args) {
org.jruby.Main.main(
"embulk.jar!/embulk/command/embulk_bundle.rb",
args);
}
org.embulk.exec.BulkLoader.run(…)
org.embulk.plugin.PluginManager.newPlugin(…)
{
jruby = org.jruby.embed.ScriptingContainer()
rubyObj = jruby.runScriptlet("Embulk::Plugin")
jruby.callMethod(rubyObj, "new_java_input", "s3")
}
Embulk Plugin Load Sequence
def new_java_input(type)
rubyPluginClass = lookup(:input, type)
return rubyPluginClass.new_java
end
Java
JRuby
org.embulk.plugin.PluginManager.newPlugin(…)
Embulk Plugin Load Sequence
def new_java
jars = Dir["classpath/**/*.jar"]
factory = org.embulk.embulk.plugin.PluginClassLoaderFactory.new
classloader = factory.create(jars)
return classloader.loadClass("org.embulk.input.s3.S3InputPlugin")
end
Java
JRuby
PluginClassLoaderFactory.create(URL[] jarPaths) {
return new PluginClassLoader(jarPaths);
}
Embulk
• Embulk is a plugin-based parallel bulk data loader.
• Guess plugins suggest you what plugins are
necessary, and how to configure the plugins.
• Executor plugins run plugins in parallel.
• Embulk core takes care of message passing
between plugins.
• Embulk loads plugins using JRuby and Gem API.
./embulk.jar
$ ./embulk.jar guess example.yml
executable jar!
Header of embulk.jar
: <<BAT
@echo off
setlocal
set this=%~f0
set java_args=
rem ...
java %java_args% -jar %this% %args%
exit /b %ERRORLEVEL%
BAT
# ...
exec java $java_args -jar "$0" "$@"
exit 127
PK...
embulk.jar is a shell script
: <<BAT
@echo off
setlocal
set this=%~f0
set java_args=
rem ...
java %java_args% -jar %this% %args%
exit /b %ERRORLEVEL%
BAT
# ...
exec java $java_args -jar "$0" "$@"
exit 127
PK...
argument of “:” command (heredoc).
“:” is a command that does nothing.
#!/bin/sh is optional.
Empty first line means a shell script.
java -jar $0
shell script exits here
(following data is ignored)
embulk.jar is a bat file
: <<BAT
@echo off
setlocal
set this=%~f0
set java_args=
rem ...
java %java_args% -jar %this% %args%
exit /b %ERRORLEVEL%
BAT
# ...
exec java $java_args -jar "$0" "$@"
exit 127
PK...
.bat exits here
(following lines are ignored)
“:” means a comment-line
embulk.jar is a jar file
: <<BAT
@echo off
setlocal
set this=%~f0
set java_args=
rem ...
java %java_args% -jar %this% %args%
exit /b %ERRORLEVEL%
BAT
# ...
exec java $java_args -jar "$0" "$@"
exit 127
PK...
jar (zip) format ignores headers
(file entries are in footer)
Pitfalls & Challenges
Pitfalls & Challenges
• Plugin version conflicts
• Performance impact due to loosely-coupled API
Plugin Version Conflicts
Embulk Core
Java Runtime
aws-sdk.jar v1.9
embulk-input-s3.jar
Version conflicts!
aws-sdk.jar v1.10
embulk-output-redshift.jar
Multiple Classloaders in JVM
Embulk Core
Java Runtime
aws-sdk.jar v1.9
embulk-input-s3.jar
Isolated
environments
aws-sdk.jar v1.10
embulk-output-redshift.jar
Class Loader 1
Class Loader 2
Version conflicts in a JRuby Runtime
Embulk Core
Java Runtime
httpclient 2.5.0
embulk-input-sfdc.gem
Version conflicts!
httpclient v2.6.0
embulk-input-marketo.gem
JRuby Runtime
Java Runtime
Multiple JRuby Runtime?
Fluentd Core
activerecord ~> 3.4
fluentd-plugin-sql.gem
Isolated
environments?
activerecord ~> 4.2
fluent-plugin-presto.gem ?
Sub VM 1?
Sub VM 2?
Version conflicts in Fluentd
Fluentd Core
CRuby Runtime
activerecord ~> 3.4
fluentd-plugin-sql.gem
Version conflicts!
activerecord ~> 4.2
fluent-plugin-presto.gem ?
Challenges
• Version conflict is not completely solved.
• Java can use multiple ClassLoader
• I haven’t figured out hot to do the same thing in
Ruby
• I don’t have clear ideas to solve performance impact
• Write more code to learn?
Wrapping Up
“How did I build Plugin Architecture?”
• I built Fluentd using dynamic plugin loader.
• “Plugin calls Plugins”
• Most of features are provided by the ecosystem of plugins.
• I built Embulk using combination of:
• Dependency Injection,
• JRuby to implement a Dynamic Plugin Loader,
• Java VM and nested ClassLoaders to load multiple versions
of plugins.
• But some problems are not solved yet:
• Version conflicts in a Ruby VM.
• Design patterns of plugins AND high performance.
What’s Next?
• You build plugin-based software architecture!
• And you’ll talk to me how you did :-)
• I’m working on another project: a distributed
workflow engine
• Java VM + Python
Thank You!
Sadayuki Furuhashi

Founder & Software Architect

More Related Content

What's hot

Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Introducción a Wiremock
Introducción a WiremockIntroducción a Wiremock
Introducción a WiremockJose Ortiz
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitJukka Zitting
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLEDB
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)Lucas Jellema
 
Java Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepJava Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepGuo Albert
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialSveta Smirnova
 
Creating a Plug-In Architecture
Creating a Plug-In ArchitectureCreating a Plug-In Architecture
Creating a Plug-In Architectureondrejbalas
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-ComposeSimon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-ComposeFlink Forward
 
Kotlin Crash Course
Kotlin Crash CourseKotlin Crash Course
Kotlin Crash CourseHaim Michael
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursJ V
 
RACF - The Basics (v1.2)
RACF - The Basics (v1.2)RACF - The Basics (v1.2)
RACF - The Basics (v1.2)Rui Miguel Feio
 

What's hot (20)

Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Github basics
Github basicsGithub basics
Github basics
 
Introducción a Wiremock
Introducción a WiremockIntroducción a Wiremock
Introducción a Wiremock
 
Logstash
LogstashLogstash
Logstash
 
The Elastic ELK Stack
The Elastic ELK StackThe Elastic ELK Stack
The Elastic ELK Stack
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 
SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)
 
Java Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepJava Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By Step
 
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucketIntro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete Tutorial
 
Creating a Plug-In Architecture
Creating a Plug-In ArchitectureCreating a Plug-In Architecture
Creating a Plug-In Architecture
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-ComposeSimon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
 
Final field semantics
Final field semanticsFinal field semantics
Final field semantics
 
Kotlin Crash Course
Kotlin Crash CourseKotlin Crash Course
Kotlin Crash Course
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
RACF - The Basics (v1.2)
RACF - The Basics (v1.2)RACF - The Basics (v1.2)
RACF - The Basics (v1.2)
 
Git and github
Git and githubGit and github
Git and github
 

Viewers also liked

The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015Fernando Hamasaki de Amorim
 
Practical Testing of Ruby Core
Practical Testing of Ruby CorePractical Testing of Ruby Core
Practical Testing of Ruby CoreHiroshi SHIBATA
 
An easy guide to Plugin Development
An easy guide to Plugin DevelopmentAn easy guide to Plugin Development
An easy guide to Plugin DevelopmentShinichi Nishikawa
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Masahiro Nagano
 
TRICK2015 results
TRICK2015 resultsTRICK2015 results
TRICK2015 resultsmametter
 
Techmix2014 温故知新
Techmix2014 温故知新Techmix2014 温故知新
Techmix2014 温故知新Kazuya Numata
 
Do you trust that certificate?
Do you trust that certificate?Do you trust that certificate?
Do you trust that certificate?zunda
 
Metaprogramming in Haskell
Metaprogramming in HaskellMetaprogramming in Haskell
Metaprogramming in HaskellHiromi Ishii
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingDougal Campbell
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third PluginJustin Ryan
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview Lars Vogel
 
Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)andrewnacin
 
Building GPE: What We Learned
Building GPE: What We LearnedBuilding GPE: What We Learned
Building GPE: What We Learnedrajeevdayal
 
The overview of Server-ide Bulk Loader
 The overview of Server-ide Bulk Loader The overview of Server-ide Bulk Loader
The overview of Server-ide Bulk LoaderTreasure Data, Inc.
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicketnielsvk
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creationbenalman
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
 
Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginDaniel Spilker
 
M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"
M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"
M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"Media & Learning Conference
 

Viewers also liked (20)

Ruby meets Go
Ruby meets GoRuby meets Go
Ruby meets Go
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
 
Practical Testing of Ruby Core
Practical Testing of Ruby CorePractical Testing of Ruby Core
Practical Testing of Ruby Core
 
An easy guide to Plugin Development
An easy guide to Plugin DevelopmentAn easy guide to Plugin Development
An easy guide to Plugin Development
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
 
TRICK2015 results
TRICK2015 resultsTRICK2015 results
TRICK2015 results
 
Techmix2014 温故知新
Techmix2014 温故知新Techmix2014 温故知新
Techmix2014 温故知新
 
Do you trust that certificate?
Do you trust that certificate?Do you trust that certificate?
Do you trust that certificate?
 
Metaprogramming in Haskell
Metaprogramming in HaskellMetaprogramming in Haskell
Metaprogramming in Haskell
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin Programming
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third Plugin
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)
 
Building GPE: What We Learned
Building GPE: What We LearnedBuilding GPE: What We Learned
Building GPE: What We Learned
 
The overview of Server-ide Bulk Loader
 The overview of Server-ide Bulk Loader The overview of Server-ide Bulk Loader
The overview of Server-ide Bulk Loader
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicket
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creation
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL Plugin
 
M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"
M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"
M&L Webinar: “Open Source ILIAS Plugin: Interactive Videos"
 

Similar to Plugin-based software design with Ruby and RubyGems

Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbtFabio Fumarola
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunSaiyam Pathak
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfLuca Mattia Ferrari
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftWan Muzaffar Wan Hashim
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventJohn Schneider
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Amazon Web Services
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJSDicoding
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneDeepu S Nath
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersJavan Rasokat
 
Embulk, an open-source plugin-based parallel bulk data loader
Embulk, an open-source plugin-based parallel bulk data loaderEmbulk, an open-source plugin-based parallel bulk data loader
Embulk, an open-source plugin-based parallel bulk data loaderSadayuki Furuhashi
 

Similar to Plugin-based software design with Ruby and RubyGems (20)

Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
 
Core Android
Core AndroidCore Android
Core Android
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in Swift
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJS
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Embulk, an open-source plugin-based parallel bulk data loader
Embulk, an open-source plugin-based parallel bulk data loaderEmbulk, an open-source plugin-based parallel bulk data loader
Embulk, an open-source plugin-based parallel bulk data loader
 

More from Sadayuki Furuhashi

Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019
Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019
Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019Sadayuki Furuhashi
 
Automating Workflows for Analytics Pipelines
Automating Workflows for Analytics PipelinesAutomating Workflows for Analytics Pipelines
Automating Workflows for Analytics PipelinesSadayuki Furuhashi
 
Digdagによる大規模データ処理の自動化とエラー処理
Digdagによる大規模データ処理の自動化とエラー処理Digdagによる大規模データ処理の自動化とエラー処理
Digdagによる大規模データ処理の自動化とエラー処理Sadayuki Furuhashi
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupSadayuki Furuhashi
 
DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?Sadayuki Furuhashi
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container EraSadayuki Furuhashi
 
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11Sadayuki Furuhashi
 
Fighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with EmbulkFighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with EmbulkSadayuki Furuhashi
 
Embulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダEmbulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダSadayuki Furuhashi
 
Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Sadayuki Furuhashi
 
Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014Sadayuki Furuhashi
 
Fluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect MoreFluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect MoreSadayuki Furuhashi
 
Prestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for PrestoPrestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for PrestoSadayuki Furuhashi
 
What's new in v11 - Fluentd Casual Talks #3 #fluentdcasual
What's new in v11 - Fluentd Casual Talks #3 #fluentdcasualWhat's new in v11 - Fluentd Casual Talks #3 #fluentdcasual
What's new in v11 - Fluentd Casual Talks #3 #fluentdcasualSadayuki Furuhashi
 
How we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataHow we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataSadayuki Furuhashi
 

More from Sadayuki Furuhashi (20)

Scripting Embulk Plugins
Scripting Embulk PluginsScripting Embulk Plugins
Scripting Embulk Plugins
 
Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019
Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019
Performance Optimization Techniques of MessagePack-Ruby - RubyKaigi 2019
 
Making KVS 10x Scalable
Making KVS 10x ScalableMaking KVS 10x Scalable
Making KVS 10x Scalable
 
Automating Workflows for Analytics Pipelines
Automating Workflows for Analytics PipelinesAutomating Workflows for Analytics Pipelines
Automating Workflows for Analytics Pipelines
 
Digdagによる大規模データ処理の自動化とエラー処理
Digdagによる大規模データ処理の自動化とエラー処理Digdagによる大規模データ処理の自動化とエラー処理
Digdagによる大規模データ処理の自動化とエラー処理
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes Meetup
 
DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
 
Fighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with EmbulkFighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with Embulk
 
Embulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダEmbulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダ
 
Embuk internals
Embuk internalsEmbuk internals
Embuk internals
 
Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1
 
Prestogres internals
Prestogres internalsPrestogres internals
Prestogres internals
 
Presto+MySQLで分散SQL
Presto+MySQLで分散SQLPresto+MySQLで分散SQL
Presto+MySQLで分散SQL
 
Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014
 
Fluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect MoreFluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect More
 
Prestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for PrestoPrestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for Presto
 
What's new in v11 - Fluentd Casual Talks #3 #fluentdcasual
What's new in v11 - Fluentd Casual Talks #3 #fluentdcasualWhat's new in v11 - Fluentd Casual Talks #3 #fluentdcasual
What's new in v11 - Fluentd Casual Talks #3 #fluentdcasual
 
How we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataHow we use Fluentd in Treasure Data
How we use Fluentd in Treasure Data
 

Recently uploaded

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Recently uploaded (20)

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

Plugin-based software design with Ruby and RubyGems

  • 1. Plugin-based software design with Ruby and RubyGems Sadayuki Furuhashi
 Founder & Software Architect RubyKaigi 2015
  • 2. A little about me… Sadayuki Furuhashi github: @frsyuki Fluentd - Unifid log collection infrastracture Embulk - Plugin-based parallel ETL Founder & Software Architect
  • 3. It's like JSON. but fast and small. A little about me…
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Benefits of Plugin Architecture > Plugins bring many features > Plugins keep core software simple > Plugins are easy to test > Plugins builds active developer community
  • 12. Benefits of Plugin Architecture > Plugins bring many features > Plugins keep core software simple > Plugins are easy to test > Plugins builds active developer community > “…if it’s designed well”.
  • 14. 
 plugin architecture? How did I design How to design
  • 15. Today’s topic > Plugin Architecture Design Patterns > Plugin Architecture of Fluentd > Plugin Architecture of Embulk > Pitfalls & Challenges
  • 17. Plugin Architecture Design Patterns a) Traditional Extensible Software Architecture b) Plugin-based Software Architecture
  • 18. Traditional Extensible Software Architecture Host Application Plugin Plugin Register plugins to extension points To add more extensibility, add more extension points.
  • 19. Plugin-based software architecture Core Plugin Plugin Plugin Plugin Plugin Plugin Plugin Application
  • 20. Plugin-based software architecture • Application as a network of plugins. > Plugins: provide features. > Core: framework to implement plugins. • More flexibility != More complexity. • Application must be designed as modularized. > It’s hard to design :( > Optimizing performance is difficult :( • Loosely-coupled API often makes performance worse.
  • 21. Design Pattern 1: Dependency Injection Core class interface class interface interface class class A component is an interface or
 a class. Each component publishes API:
  • 22. Design Pattern 1: Dependency Injection Core class Plugin Plugin Plugin Plugin class Plugin When application runs: A DI container
 replaces objects with plugins when application runs
  • 23. Replace classes with mocks for unit tests Design Pattern 1: Dependency Injection Core dummy dummy dummy dummy dummy Plugin dummy Testing the application
  • 24. Dependency Injection (Java) public interface Store { void store(String data); } public class Module { @Inject Module(Store store) { store.store(); } } public class DummyStore implements Store { void store(String data) { } } public class MainModule implements Module { public void configure( Binder binder) { binder.bind(Store.class) .to(DummyStore.class); } } interface → implementation
 mapping From source code, implementation is black box. It’s replaced at runtime.
  • 25. Dependency Injection (Ruby) Ruby? (What’s a good way to use DI in Ruby?) (Please tell me if you know)
  • 26. Dependency Injection (Ruby) class Module def initialize(store: DummyStore.new) store.store(”data”) end end class DummyStore def store(data) end end injector = Injector.new. bind(store: DBStore) object = injector.get(Module) class DBStore def initialize(db: DBM.new) @db = db end def store(data) @db.insert(data) end end injector = Injector.new. bind(store: DBStore). bind(db: SqliteDBImpl) object = injector.get(Module) I want to do this: Keyword arguments {:keyword => class} mapping
 at runtime
  • 27. Design Pattern 2: Dynamic Plugin Loader Core Plugin Plugin Calls Plugin loader to load plugins Plugin Loader
  • 28. Design Pattern 2: Dynamic Plugin Loader Core Plugin Plugin Plugins also call Plugin Loader. Plugins create an ecosystem. Plugin Loader Plugin Plugin
  • 29. Design Pattern 3: Combination Core class Plugin class Plugin Plugin class class Plugin Loader Plugin Plugin Plugin Plugin Plugin Dependency Injection + Plugin Loader
  • 30. Plugin Architecture Design Patterns a) Traditional Extensible Software Architecture b) Plugin-based Software Architecture > Dependency Injection (DI) > Dynamic Plugin Loader > Combination of those There’re trade-offs > Choose the best solution for each project
  • 32. What’s Fluentd? > Data collector for unified logging layer > Streaming data transfer based on JSON > Written in C & Ruby > Plugin Marketplace on RubyGems > http://www.fluentd.org/plugins > Working in production > http://www.fluentd.org/testimonials
  • 35. The problems around log collection…
  • 36. Solution: N × M → N + M plugins
  • 37. # logs from a file <source> type tail path /var/log/httpd.log pos_file /tmp/pos_file format apache2 tag web.access </source> # logs from client libraries <source> type forward port 24224 </source> # store logs to ES and HDFS <match web.*> type copy <store> type elasticsearch logstash_format true </store> <store> type s3 bucket s3-event-archive </store> </match> <match metrics.*> type nagios host watch-server </match>
  • 39. Example: HA & High performance - HA (fail over) - Load-balancing - Choice of at-most-once or at-least-once
  • 40. Example: Realtime search + Batch Analytics combo All data Hot data
  • 42. Fluentd Core Event
 Router Input Plugin Output Plugin Filter Plugin Buffer Plugin Output Plugin Input Plugin Plugin Marketplace using RubyGems.org $ gem install fluent-plugin-s3 Plugin Loader /gems/ RubyGems.org
  • 43.
  • 44. Fluentd’s Plugin Architecture • Fluentd is a plugin-based event collector. > Fluentd core: takes care of message routing between plugins. > Plugins: do all other things! • 300+ plugins released on RubyGems.org • Fluentd loads plugins using Gem API.
  • 46. Embulk: Open-source Bulk Data Loader written in Java & JRuby
  • 47. Amazon S3 MySQL FTP CSV Files Access Logs Salesforce.com Elasticsearch Cassandra Hive Redis Reliable framework :-) Parallel execution, transaction, auto guess, …and many by plugins.
  • 48. Demo
  • 49. Use case 1: Sync MySQL to Elasticsearch embulk-input-mysql embulk-filter-kuromoji embulk-output-elasticsearch MySQL kuromoji Elasticsearch
  • 50. Use case 2: Load from S3 to Analytics embulk-parser-csv embulk-decoder-gzip embulk-input-s3 csv.gz on S3 Treasure Data BigQuery Redshift + + embulk-output-td embulk-output-bigquery embulk-output-redshift embulk-executor-mapreduce
  • 51. Use case 3: Embulk as a Service at Treasure Data
  • 52. Use case 3: Embulk as a Service at Treasure Data REST API to load/export data to/from Treasure Data
  • 53. Input Output Embulk’s Plugin Architecture Embulk Core Executor Plugin Filter Filter Guess
  • 54. Output Embulk’s Plugin Architecture Embulk Core Executor Plugin Filter Filter GuessFileInput Parser Decoder
  • 55. Guess Embulk’s Plugin Architecture Embulk Core FileInput Executor Plugin Parser Decoder FileOutput Formatter Encoder Filter Filter
  • 56. Embulk’s Plugin Architecture Embulk Core PluginManager Executor Plugin InjectedPluginSource ParserPlugin JRubyPluginLoader FormatterPlugin JRuby Plugin Loader Plugin FilterPlugin OutputPluginInputPlugin JRuby RuntimeJava Runtime
  • 57. Plugin Marketplace using RubyGems.org Embulk Core PluginManager Executor Plugin InjectedPluginSource ParserPlugin FormatterPluginFilterPlugin OutputPluginInputPlugin JRuby RuntimeJava Runtime $ embulk gem install embulk-input-oracle /gems/ RubyGems.org JRubyPluginLoader JRuby Plugin Loader Plugin
  • 58. Plugin Package Structure embulk-input-s3.gem +- build.gradle | +- src/main/java/org/embulk/input/s3 | - S3FileInputPlugin.java | AwsCredentials.java | +- classpath/ | - embulk-input-s3-0.2.6.jar | aws-java-sdk-s3-1.10.33.jar | httpclient-4.3.6.jar | +- lib/embulk/input/ - s3.rb Java source files Compiled jar file All dependent
 jar files Ruby script to
 load the jar files
  • 59. Embulk Plugin Load Sequence Bundler.setup_environment Embulk::Runner = Embulk::Runner.new( .embulk.EmbulkEmbed::Bootstrap.new.initialize) Embulk::Runner.run(ARGV) Java JRuby Java org.embulk.cli.Main.main(String[] args) { org.jruby.Main.main( "embulk.jar!/embulk/command/embulk_bundle.rb", args); } org.embulk.exec.BulkLoader.run(…) org.embulk.plugin.PluginManager.newPlugin(…)
  • 60. { jruby = org.jruby.embed.ScriptingContainer() rubyObj = jruby.runScriptlet("Embulk::Plugin") jruby.callMethod(rubyObj, "new_java_input", "s3") } Embulk Plugin Load Sequence def new_java_input(type) rubyPluginClass = lookup(:input, type) return rubyPluginClass.new_java end Java JRuby org.embulk.plugin.PluginManager.newPlugin(…)
  • 61. Embulk Plugin Load Sequence def new_java jars = Dir["classpath/**/*.jar"] factory = org.embulk.embulk.plugin.PluginClassLoaderFactory.new classloader = factory.create(jars) return classloader.loadClass("org.embulk.input.s3.S3InputPlugin") end Java JRuby PluginClassLoaderFactory.create(URL[] jarPaths) { return new PluginClassLoader(jarPaths); }
  • 62. Embulk • Embulk is a plugin-based parallel bulk data loader. • Guess plugins suggest you what plugins are necessary, and how to configure the plugins. • Executor plugins run plugins in parallel. • Embulk core takes care of message passing between plugins. • Embulk loads plugins using JRuby and Gem API.
  • 63. ./embulk.jar $ ./embulk.jar guess example.yml executable jar!
  • 64. Header of embulk.jar : <<BAT @echo off setlocal set this=%~f0 set java_args= rem ... java %java_args% -jar %this% %args% exit /b %ERRORLEVEL% BAT # ... exec java $java_args -jar "$0" "$@" exit 127 PK...
  • 65. embulk.jar is a shell script : <<BAT @echo off setlocal set this=%~f0 set java_args= rem ... java %java_args% -jar %this% %args% exit /b %ERRORLEVEL% BAT # ... exec java $java_args -jar "$0" "$@" exit 127 PK... argument of “:” command (heredoc). “:” is a command that does nothing. #!/bin/sh is optional. Empty first line means a shell script. java -jar $0 shell script exits here (following data is ignored)
  • 66. embulk.jar is a bat file : <<BAT @echo off setlocal set this=%~f0 set java_args= rem ... java %java_args% -jar %this% %args% exit /b %ERRORLEVEL% BAT # ... exec java $java_args -jar "$0" "$@" exit 127 PK... .bat exits here (following lines are ignored) “:” means a comment-line
  • 67. embulk.jar is a jar file : <<BAT @echo off setlocal set this=%~f0 set java_args= rem ... java %java_args% -jar %this% %args% exit /b %ERRORLEVEL% BAT # ... exec java $java_args -jar "$0" "$@" exit 127 PK... jar (zip) format ignores headers (file entries are in footer)
  • 69. Pitfalls & Challenges • Plugin version conflicts • Performance impact due to loosely-coupled API
  • 70. Plugin Version Conflicts Embulk Core Java Runtime aws-sdk.jar v1.9 embulk-input-s3.jar Version conflicts! aws-sdk.jar v1.10 embulk-output-redshift.jar
  • 71. Multiple Classloaders in JVM Embulk Core Java Runtime aws-sdk.jar v1.9 embulk-input-s3.jar Isolated environments aws-sdk.jar v1.10 embulk-output-redshift.jar Class Loader 1 Class Loader 2
  • 72. Version conflicts in a JRuby Runtime Embulk Core Java Runtime httpclient 2.5.0 embulk-input-sfdc.gem Version conflicts! httpclient v2.6.0 embulk-input-marketo.gem JRuby Runtime
  • 73. Java Runtime Multiple JRuby Runtime? Fluentd Core activerecord ~> 3.4 fluentd-plugin-sql.gem Isolated environments? activerecord ~> 4.2 fluent-plugin-presto.gem ? Sub VM 1? Sub VM 2?
  • 74. Version conflicts in Fluentd Fluentd Core CRuby Runtime activerecord ~> 3.4 fluentd-plugin-sql.gem Version conflicts! activerecord ~> 4.2 fluent-plugin-presto.gem ?
  • 75. Challenges • Version conflict is not completely solved. • Java can use multiple ClassLoader • I haven’t figured out hot to do the same thing in Ruby • I don’t have clear ideas to solve performance impact • Write more code to learn?
  • 77. “How did I build Plugin Architecture?” • I built Fluentd using dynamic plugin loader. • “Plugin calls Plugins” • Most of features are provided by the ecosystem of plugins. • I built Embulk using combination of: • Dependency Injection, • JRuby to implement a Dynamic Plugin Loader, • Java VM and nested ClassLoaders to load multiple versions of plugins. • But some problems are not solved yet: • Version conflicts in a Ruby VM. • Design patterns of plugins AND high performance.
  • 78. What’s Next? • You build plugin-based software architecture! • And you’ll talk to me how you did :-) • I’m working on another project: a distributed workflow engine • Java VM + Python Thank You! Sadayuki Furuhashi
 Founder & Software Architect