SlideShare a Scribd company logo
1 of 29
CRaSH
TH E SH EL L FOR TH E J AVA PL ATFOR M
S E P T E M B E R 2 0 1 3
@julienviet
@defrancea
www.exoplatform.com - Copyright 2012 eXo Platform 2
JULIEN VIET
− Contact
− julien@julienviet.com
− @julienviet
− http://github.com/vietj
− Open source for 10 years
− Official mission: deliver enterprise grade portal
server
− Marseille JUG Leader
− Involved in Java Community Process
www.exoplatform.com - Copyright 2012 eXo Platform 3
WHAT IS EXO PLATFORM?
eXo Platform is an open
source social collaboration
software solution designed
for the Enterprise.
It is full featured, standard
based, extensible and has
an amazing design.
eXo Platform is featured in
Gartner's Magic Quadrant
for Horizontal Portal
Products 2012 as a User
eXperience Platform.
www.exoplatform.com - Copyright 2012 eXo Platform 4
ALAIN DEFRANCE
− Contact
− defrancea@gmail.com
− @alaindefrance
− http://github.com/defrancea
− Open source for 3 years
− Contributed to open source projects like
Crash
− Marseille JUG Leader
www.exoplatform.com - Copyright 2012 eXo Platform 5
BITTITAN
− SAAS Products
− MigrationWiz: Email migration
− SMTPLogic: SMTP gateway
− UserActivation: Easy onboarding to Office365
− Our blog
− http://blog.bittitan.com
www.exoplatform.com - Copyright 2012 eXo Platform 6
CRASH PROJECT
− Latest stable 1.2
− Work in progress 1.3
− Licensed under LGPL
− Compatibility
− Java 6+
− Groovy 1.7+
www.exoplatform.com - Copyright 2012 eXo Platform 7
KEY CONCEPTS
− Command Line Interface for JVM
− Create easily and quickly commands
− Compose commands into pipelines
− Connectors provide local or remote access
www.exoplatform.com - Copyright 2012 eXo Platform 8
MODULAR DESIGN
− Core, connectors, plugins
− Only use what you need
− Memory
− Dependencies
www.exoplatform.com - Copyright 2012 eXo Platform 9
CONNECTORS
− Defines shell interactions
− Asynchronous design
− Implemented by
− System.in / System.out
− Telnet
− SSH
− Web
− Attach
www.exoplatform.com - Copyright 2012 eXo Platform 10
PLUGIN ARCHITECTURE
− Keep core small and lightweight
− New features without impacting core
− Current plugins
− Authentication: simple, jaas, key, crowd, …
− Languages: java, groovy, ruby, …
− Services: mail, cron, …
www.exoplatform.com - Copyright 2012 eXo Platform 11
USER INTERFACE
− Interactive Real-Eval-Print-Loop
− SSH asynchronous execution
− Cron based execution (1.3)
www.exoplatform.com - Copyright 2012 eXo Platform 12
POLYGLOT
− Leverage polyglot JVM ecosystem
− Groovy
− Commands
− REPL (1.3)
− Java
− Commands (1.3)
− Ruby work in progress
www.exoplatform.com - Copyright 2012 eXo Platform 13
EXECUTION MODES
− Standalone
− Attach to a running JVM
− Embedded
− Servlet listener
− Spring
− Guice
− Grails
− VisualVM
www.exoplatform.com - Copyright 2012 eXo Platform 14
BASE COMMANDS
− Covers JVM packages
− system
− jdbc
− jndi
− jmx
− Utilities: filter, sort, egrep, sleep
www.exoplatform.com - Copyright 2012 eXo Platform 15
STANDALONE DEMO
www.exoplatform.com - Copyright 2012 eXo Platform 16
JNDI/JDBC/JPA
ATTACH
DEMO
www.exoplatform.com - Copyright 2012 eXo Platform 17
WRITING A COMMAND
public class mycommand {
@Command
@Usage(“the command”)
public void main(
@Usage(“foo option”)
@Option(names=[ “foo”]) String foo,
@Usage(“command arguments”)
@Argument List<String> args) {
…
}
}
% mycommand –foo the_option value1 value2
www.exoplatform.com - Copyright 2012 eXo Platform 18
EMBEDDED
− Trivial to embed
− Programmatic
− Spring
− Guice
− Servlet listener
− Levels
− Embed
− Virtual file system
www.exoplatform.com - Copyright 2012 eXo Platform 19
EMBEDDED BY
www.exoplatform.com - Copyright 2012 eXo Platform 20
SPRING EMDEDDED
TWITTER COMMAND
DEMO
www.exoplatform.com - Copyright 2012 eXo Platform 21
GIT LIKE COMMAND
public class git {
@Command
public void add(…) {…}
@Command
public void commit(…) {…}
…
}
% git add .
% git commit –m “feature implemented”
www.exoplatform.com - Copyright 2012 eXo Platform 22
TYPES
− String, primitive types, enums
− Converter
− properties, jmx object name …
− Completer
− java.io.File
− system property name
− enums
− …
www.exoplatform.com - Copyright 2012 eXo Platform 23
COMMAND PIPE
jmx find
ObjectName Map
jmx get sort
www.exoplatform.com - Copyright 2012 eXo Platform 24
COMMAND PIPE
public class wc {
@Command
public PipeCommand<String, Integer>) main() {
return new PipeCommand<String, Integer>() {
int count = 0;
public void provide(String s) {
count += s.split(“n”).length;
}
public void close() {
context.provide(count);
}
}
}
}
www.exoplatform.com - Copyright 2012 eXo Platform 25
JMX PIPE
DEMO
www.exoplatform.com - Copyright 2012 eXo Platform 26
MAIL/CRON
DEMO
www.exoplatform.com - Copyright 2012 eXo Platform 27
READ-EVAL-PRINT-LOOP
− Feature of 1.3
− Polyglot
www.exoplatform.com - Copyright 2012 eXo Platform 28
REPL
DEMO
www.exoplatform.com - Copyright 2012 eXo Platform 29
WRAP UP
− A multi facet, powerful and extensible tool
for all of us
− Try online : try.crashub.org
− Reach us at
− crashub.org
− @crashub
− crash-users@googlegroups.com

More Related Content

Similar to CRaSH: the shell for the Java Platform

Java application server in the cloud
Java application server in the cloudJava application server in the cloud
Java application server in the cloud
adm_exoplatform
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
Minko3D
 
Windows 8 Metro Apps
Windows 8 Metro AppsWindows 8 Metro Apps
Windows 8 Metro Apps
Sam Basu
 
Next Generation Portals : How OpenSocial Standard Adds Social to the Mix?
Next Generation Portals : How OpenSocial Standard Adds Social to the Mix? Next Generation Portals : How OpenSocial Standard Adds Social to the Mix?
Next Generation Portals : How OpenSocial Standard Adds Social to the Mix?
Tugdual Grall
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
bryan costanich
 
Open social gadgets in ibm connections
Open social gadgets in ibm connectionsOpen social gadgets in ibm connections
Open social gadgets in ibm connections
Vincent Burckhardt
 

Similar to CRaSH: the shell for the Java Platform (20)

CVMichelGallant
CVMichelGallantCVMichelGallant
CVMichelGallant
 
Java application server in the cloud
Java application server in the cloudJava application server in the cloud
Java application server in the cloud
 
JDK 9: The Start of a New Future for Java
JDK 9: The Start of a New Future for JavaJDK 9: The Start of a New Future for Java
JDK 9: The Start of a New Future for Java
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
 
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)
 
Windows 8 Metro Apps
Windows 8 Metro AppsWindows 8 Metro Apps
Windows 8 Metro Apps
 
Next Generation Portals : How OpenSocial Standard Adds Social to the Mix?
Next Generation Portals : How OpenSocial Standard Adds Social to the Mix? Next Generation Portals : How OpenSocial Standard Adds Social to the Mix?
Next Generation Portals : How OpenSocial Standard Adds Social to the Mix?
 
Integrating Backend Systems
Integrating Backend SystemsIntegrating Backend Systems
Integrating Backend Systems
 
How to develop nice portlet with Juzu framework
How to develop nice portlet with Juzu frameworkHow to develop nice portlet with Juzu framework
How to develop nice portlet with Juzu framework
 
LavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesLavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promises
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
Hexagonal architecture in PHP
Hexagonal architecture in PHPHexagonal architecture in PHP
Hexagonal architecture in PHP
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Development withforce
Development withforceDevelopment withforce
Development withforce
 
Vincent Burckhardt - Exending Connections with OpenSocial Gadgets
Vincent Burckhardt - Exending Connections with OpenSocial GadgetsVincent Burckhardt - Exending Connections with OpenSocial Gadgets
Vincent Burckhardt - Exending Connections with OpenSocial Gadgets
 
Open social gadgets in ibm connections
Open social gadgets in ibm connectionsOpen social gadgets in ibm connections
Open social gadgets in ibm connections
 
Open World Forum 2012 : eXo & the Cloud
Open World Forum 2012 : eXo & the CloudOpen World Forum 2012 : eXo & the Cloud
Open World Forum 2012 : eXo & the Cloud
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework
 
Introduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile PlatformIntroduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile Platform
 

More from jviet (6)

Annotations pour les Geeks
Annotations pour les GeeksAnnotations pour les Geeks
Annotations pour les Geeks
 
Crash
CrashCrash
Crash
 
Navigation Service
Navigation ServiceNavigation Service
Navigation Service
 
GateIn Frameworks
GateIn FrameworksGateIn Frameworks
GateIn Frameworks
 
Good GateIn Stuff
Good GateIn StuffGood GateIn Stuff
Good GateIn Stuff
 
What's new and cool in Portlet 2.0
What's new and cool in Portlet 2.0What's new and cool in Portlet 2.0
What's new and cool in Portlet 2.0
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

CRaSH: the shell for the Java Platform

  • 1. CRaSH TH E SH EL L FOR TH E J AVA PL ATFOR M S E P T E M B E R 2 0 1 3 @julienviet @defrancea
  • 2. www.exoplatform.com - Copyright 2012 eXo Platform 2 JULIEN VIET − Contact − julien@julienviet.com − @julienviet − http://github.com/vietj − Open source for 10 years − Official mission: deliver enterprise grade portal server − Marseille JUG Leader − Involved in Java Community Process
  • 3. www.exoplatform.com - Copyright 2012 eXo Platform 3 WHAT IS EXO PLATFORM? eXo Platform is an open source social collaboration software solution designed for the Enterprise. It is full featured, standard based, extensible and has an amazing design. eXo Platform is featured in Gartner's Magic Quadrant for Horizontal Portal Products 2012 as a User eXperience Platform.
  • 4. www.exoplatform.com - Copyright 2012 eXo Platform 4 ALAIN DEFRANCE − Contact − defrancea@gmail.com − @alaindefrance − http://github.com/defrancea − Open source for 3 years − Contributed to open source projects like Crash − Marseille JUG Leader
  • 5. www.exoplatform.com - Copyright 2012 eXo Platform 5 BITTITAN − SAAS Products − MigrationWiz: Email migration − SMTPLogic: SMTP gateway − UserActivation: Easy onboarding to Office365 − Our blog − http://blog.bittitan.com
  • 6. www.exoplatform.com - Copyright 2012 eXo Platform 6 CRASH PROJECT − Latest stable 1.2 − Work in progress 1.3 − Licensed under LGPL − Compatibility − Java 6+ − Groovy 1.7+
  • 7. www.exoplatform.com - Copyright 2012 eXo Platform 7 KEY CONCEPTS − Command Line Interface for JVM − Create easily and quickly commands − Compose commands into pipelines − Connectors provide local or remote access
  • 8. www.exoplatform.com - Copyright 2012 eXo Platform 8 MODULAR DESIGN − Core, connectors, plugins − Only use what you need − Memory − Dependencies
  • 9. www.exoplatform.com - Copyright 2012 eXo Platform 9 CONNECTORS − Defines shell interactions − Asynchronous design − Implemented by − System.in / System.out − Telnet − SSH − Web − Attach
  • 10. www.exoplatform.com - Copyright 2012 eXo Platform 10 PLUGIN ARCHITECTURE − Keep core small and lightweight − New features without impacting core − Current plugins − Authentication: simple, jaas, key, crowd, … − Languages: java, groovy, ruby, … − Services: mail, cron, …
  • 11. www.exoplatform.com - Copyright 2012 eXo Platform 11 USER INTERFACE − Interactive Real-Eval-Print-Loop − SSH asynchronous execution − Cron based execution (1.3)
  • 12. www.exoplatform.com - Copyright 2012 eXo Platform 12 POLYGLOT − Leverage polyglot JVM ecosystem − Groovy − Commands − REPL (1.3) − Java − Commands (1.3) − Ruby work in progress
  • 13. www.exoplatform.com - Copyright 2012 eXo Platform 13 EXECUTION MODES − Standalone − Attach to a running JVM − Embedded − Servlet listener − Spring − Guice − Grails − VisualVM
  • 14. www.exoplatform.com - Copyright 2012 eXo Platform 14 BASE COMMANDS − Covers JVM packages − system − jdbc − jndi − jmx − Utilities: filter, sort, egrep, sleep
  • 15. www.exoplatform.com - Copyright 2012 eXo Platform 15 STANDALONE DEMO
  • 16. www.exoplatform.com - Copyright 2012 eXo Platform 16 JNDI/JDBC/JPA ATTACH DEMO
  • 17. www.exoplatform.com - Copyright 2012 eXo Platform 17 WRITING A COMMAND public class mycommand { @Command @Usage(“the command”) public void main( @Usage(“foo option”) @Option(names=[ “foo”]) String foo, @Usage(“command arguments”) @Argument List<String> args) { … } } % mycommand –foo the_option value1 value2
  • 18. www.exoplatform.com - Copyright 2012 eXo Platform 18 EMBEDDED − Trivial to embed − Programmatic − Spring − Guice − Servlet listener − Levels − Embed − Virtual file system
  • 19. www.exoplatform.com - Copyright 2012 eXo Platform 19 EMBEDDED BY
  • 20. www.exoplatform.com - Copyright 2012 eXo Platform 20 SPRING EMDEDDED TWITTER COMMAND DEMO
  • 21. www.exoplatform.com - Copyright 2012 eXo Platform 21 GIT LIKE COMMAND public class git { @Command public void add(…) {…} @Command public void commit(…) {…} … } % git add . % git commit –m “feature implemented”
  • 22. www.exoplatform.com - Copyright 2012 eXo Platform 22 TYPES − String, primitive types, enums − Converter − properties, jmx object name … − Completer − java.io.File − system property name − enums − …
  • 23. www.exoplatform.com - Copyright 2012 eXo Platform 23 COMMAND PIPE jmx find ObjectName Map jmx get sort
  • 24. www.exoplatform.com - Copyright 2012 eXo Platform 24 COMMAND PIPE public class wc { @Command public PipeCommand<String, Integer>) main() { return new PipeCommand<String, Integer>() { int count = 0; public void provide(String s) { count += s.split(“n”).length; } public void close() { context.provide(count); } } } }
  • 25. www.exoplatform.com - Copyright 2012 eXo Platform 25 JMX PIPE DEMO
  • 26. www.exoplatform.com - Copyright 2012 eXo Platform 26 MAIL/CRON DEMO
  • 27. www.exoplatform.com - Copyright 2012 eXo Platform 27 READ-EVAL-PRINT-LOOP − Feature of 1.3 − Polyglot
  • 28. www.exoplatform.com - Copyright 2012 eXo Platform 28 REPL DEMO
  • 29. www.exoplatform.com - Copyright 2012 eXo Platform 29 WRAP UP − A multi facet, powerful and extensible tool for all of us − Try online : try.crashub.org − Reach us at − crashub.org − @crashub − crash-users@googlegroups.com