SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Destacado

Plantilla institucional acreditacion_dpi
Plantilla institucional acreditacion_dpiPlantilla institucional acreditacion_dpi
Plantilla institucional acreditacion_dpi
Telsy Bernal
 
Quick Glance at Our Capabilities!
Quick Glance at Our Capabilities!Quick Glance at Our Capabilities!
Quick Glance at Our Capabilities!
Roberta Fimognari
 

Destacado (9)

Z bve floorplan 2015 (gio)
Z bve floorplan 2015 (gio)Z bve floorplan 2015 (gio)
Z bve floorplan 2015 (gio)
 
Estado del arte 1er avance
Estado del arte 1er avanceEstado del arte 1er avance
Estado del arte 1er avance
 
Plantilla institucional acreditacion_dpi
Plantilla institucional acreditacion_dpiPlantilla institucional acreditacion_dpi
Plantilla institucional acreditacion_dpi
 
Clearswift f5 information_visibility_reducing_business_risk_whitepaper
Clearswift f5 information_visibility_reducing_business_risk_whitepaperClearswift f5 information_visibility_reducing_business_risk_whitepaper
Clearswift f5 information_visibility_reducing_business_risk_whitepaper
 
Operacion ballena azul
Operacion ballena azulOperacion ballena azul
Operacion ballena azul
 
Brochure nimai place_sec_e.114
Brochure nimai place_sec_e.114Brochure nimai place_sec_e.114
Brochure nimai place_sec_e.114
 
2010-06-30 (UC3M) daniel molina gesfor I jornadas eMadrid
2010-06-30 (UC3M) daniel molina gesfor I jornadas eMadrid2010-06-30 (UC3M) daniel molina gesfor I jornadas eMadrid
2010-06-30 (UC3M) daniel molina gesfor I jornadas eMadrid
 
Islandia 2
Islandia 2Islandia 2
Islandia 2
 
Quick Glance at Our Capabilities!
Quick Glance at Our Capabilities!Quick Glance at Our Capabilities!
Quick Glance at Our Capabilities!
 

Más de eXo Platform

Más de eXo Platform (14)

Workshop blockchain au service de l engagement - 20-3-2019
Workshop blockchain au service de l engagement - 20-3-2019Workshop blockchain au service de l engagement - 20-3-2019
Workshop blockchain au service de l engagement - 20-3-2019
 
Digitalisation RH –Avec ou sans les DRH
Digitalisation RH –Avec ou sans les DRHDigitalisation RH –Avec ou sans les DRH
Digitalisation RH –Avec ou sans les DRH
 
De l'Intranet institutionnel à la Digital Workplace : la démarche du groupe d...
De l'Intranet institutionnel à la Digital Workplace : la démarche du groupe d...De l'Intranet institutionnel à la Digital Workplace : la démarche du groupe d...
De l'Intranet institutionnel à la Digital Workplace : la démarche du groupe d...
 
L’Intranet, socle de l’entreprise digitale !
L’Intranet, socle de l’entreprise digitale !L’Intranet, socle de l’entreprise digitale !
L’Intranet, socle de l’entreprise digitale !
 
Un hub collaboratif unique et intégré : les pour et les contre
Un hub collaboratif unique et intégré : les pour et les contreUn hub collaboratif unique et intégré : les pour et les contre
Un hub collaboratif unique et intégré : les pour et les contre
 
Intranet Project: Roll-out Strategy & Pain Points to consider
Intranet Project: Roll-out Strategy & Pain Points to considerIntranet Project: Roll-out Strategy & Pain Points to consider
Intranet Project: Roll-out Strategy & Pain Points to consider
 
How we migrate 350+ Maven CI jobs to Pipeline as Code with Jenkins 2 and Docker
How we migrate 350+ Maven CI jobs to Pipeline as Code with Jenkins 2 and DockerHow we migrate 350+ Maven CI jobs to Pipeline as Code with Jenkins 2 and Docker
How we migrate 350+ Maven CI jobs to Pipeline as Code with Jenkins 2 and Docker
 
Peut-on décider un changement de culture d'entreprise?
Peut-on décider un changement de culture d'entreprise? Peut-on décider un changement de culture d'entreprise?
Peut-on décider un changement de culture d'entreprise?
 
Conférence sur la Digital Workplace au Salon Intranet & Collaboratif
Conférence sur la Digital Workplace au Salon Intranet & CollaboratifConférence sur la Digital Workplace au Salon Intranet & Collaboratif
Conférence sur la Digital Workplace au Salon Intranet & Collaboratif
 
eXo Platform - Votre plateforme de travail collaboratif
eXo Platform - Votre plateforme de travail collaboratifeXo Platform - Votre plateforme de travail collaboratif
eXo Platform - Votre plateforme de travail collaboratif
 
Solutions to your employee disengagement
Solutions to your employee disengagementSolutions to your employee disengagement
Solutions to your employee disengagement
 
Introduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationIntroduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design Application
 
Modèles Business Open Source - Success story eXo
Modèles Business Open Source - Success story eXoModèles Business Open Source - Success story eXo
Modèles Business Open Source - Success story eXo
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van Nghi
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
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
 

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