CRaSH the shell for the JVM

Post on 14-Jun-2015

611 views 1 download

Tags:

description

CRaSH is the shell for the Java Virtual Machine

Transcript of CRaSH the shell for the JVM

An extensible command line for the JVM

Julien VietSenior software engineer

eXo Platform

@julienviet

Alain DefranceSoftware engineer

eXo Platform

@alaindefrance

@julienviet

10 years of Open Source

■ eXo Platform 2008

■ Red Hat 2006

■ JBoss 2002

Various

■ Portal stuff (JBoss / GateIn)

■ JCP a while ago

3

2 years of Open Source■ eXo Platform 2010

Various■ Develop social product

@alaindefrance

Project

Open source LGPL: http://www.crashub.orgCRaSH 1.0 – April 2012CRaSH 1.1 – August 2012CRaSH 1.2 – Soon (in release candidate)

What/Why?

CLI are still relevantUbiquitousExpressive: find . -name “*.java” -exec grep julien {} \; -print

Made for us Trends: NoSQL, MS Powershell, Drupal, Jenkins, Cloud, etc…

Fun!

Comparison with UN*X shell

Same client interface

■ History

■ Completion

■ Command Line Editing

■ Options & Arguments

■ Pipes

6

But hosted by JVM■ Java threads■ JVM access

Usage

Runtime modes

■ Standalone

■ Embedded (web app, Spring, …)

■ Attach

7

Get it from■ crashub download■ Maven Central

dependency

Simple stack

TelnetSSH ConsoleWebVisualV

MAttach

Native Client

Connectors

CRaSH

Groovy Commands

What you can do with CRaSH

Swiss army knifeEmbed in your runtimeCreate your commandsMonitoring toolScriptingAnd more…

Out of the box

Out of the box

Install CRaSHRun CRaSH standaloneCLI basicsJVM base commandsTest it online

The Swiss Knife

The Swiss Knife

Attach CRaSH to JBoss Application ServerExecute commands in the Application Server

Extend your runtime

Extend your runtime

Embed CRaSH in a Spring web applicationConnect using remote protocolDevelop a command to access Spring beansAdd options and arguments to the command

Monitoring

Monitoring

Attach to Tomcat with VisualVMUse JMX command pipesCreate pipesAssemble in custom dashboard

%jmx find …

Pipelined object stream

jmx find

jmx get

sort

<Void, ObjectName><ObjectName, Map> <Map, Map>

Wrap up

Multi facet, powerful and extensibleReach uscrash-users@googlegroups.com@crashub http://www.crashub.org

Hackergarten hands on coding Tuesday

Q&A