Coder Social home page Coder Social logo

Comments (6)

vietj avatar vietj commented on August 27, 2024

really need to open an issue for this :-) ?

a couple of reasons (non exhaustive):

1/ CRaSH developed its own connectors based on Apache SSHD, Telnetd. Apache SSHD came with Mina, Telnetd was not really supported anymore. At the same time when I joined Vert.x team I started to write a new Telnet server implementation based on Netty because Telnetd was quite old and also not supported anymore. Then I got the idea to make a lib https://github.com/termd/termd in the Vert.x spirit that only focus on doing Term things (that is no command, shell concepts, etc...). This library is much more easier to embed than CRaSH and also all network connectors (Telnet, SSH) are based on Netty that is embedded already in Vert.x 3.

2/ second reason and it's an important one, vertx-shell based on CRaSH would be quite difficult to achieve correctly because CRaSH is designed to be blocking and Vert. So vertx-shell is quite well integrated with Vert.x in term of programming model (non blocking, context behavior). Also Termd is written in non blocking, event style which helps to develop a shell based on that.

3/ Vertx-shell leverages also the polyglot capabilties of Vert.x, which makes easy to write vertx-shell command in any language. CRaSH got this polyglot aspect too but using its own mechanism (obviously) and at the end it was only providing Groovy commands, not JS, not Ruby. Obviously they could have been developed. But rather reuse what already exist in Vert.x 3 today.

that being said, Vertx-shell does not aim to be like CRaSH (which is a general purpose tool for the JVM) and rather focus on providing the best shell for Vert.x 3.

finally, obviously there could have been good reasons to reuse CRaSH and embed it, but it just came naturally this way :-)

from vertx-shell.

vietj avatar vietj commented on August 27, 2024

note : CRaSh should somehow be refactored to follow non blocking style as it has already some aspect of this, specially in the pipeline of commands, CRaSH style is:

public void provide(T t) {
  // Do something with T
  U u = doSomethingWith(t);
  next.provide(u);
}

what does not work is the whole pipe line execution (internal detail). I believe it should be refactored this way. More over it should refactor the pipeline on reactive streams library as this is really similar behavior.

from vertx-shell.

vietj avatar vietj commented on August 27, 2024

other note to @apatrida if you want to make your own REPL and only care about Terminal, you should consider using Termd as it provides a much better terminal implementation than the one in CRaSH (but it's normal, I wrote it :-) )

from vertx-shell.

apatrida avatar apatrida commented on August 27, 2024

Termd but with local console in/out instead of telnet or ssh.

Thanks for all the info.

from vertx-shell.

vietj avatar vietj commented on August 27, 2024

open an issue for locale console in termd project.

from vertx-shell.

apatrida avatar apatrida commented on August 27, 2024

I wrote a well crafted lengthy and expressive request for local console there. Thanks

from vertx-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.