Coder Social home page Coder Social logo

Persistent history about vantage HOT 6 OPEN

dthree avatar dthree commented on June 15, 2024
Persistent history

from vantage.

Comments (6)

dthree avatar dthree commented on June 15, 2024

I totally agree this should be added to Vantage.

I also think it should be built-in native, not as an extension.

There are a ton of ways to do it, which makes me uneasy. It should be done exactly the way Linux/SSH sessions handle persistent command history, so there is consistency - it should behave exactly the way people are used to it behaving.

I'll have to find out how it's done (i.e. when SSHing to another terminal, the commands are persisted locally, etc., as well as what primary keys are used to match up users and terminals to a given history, etc.).

If there's any way you could help do research on that, it would definitely help speed up the implementation!

from vantage.

slezica avatar slezica commented on June 15, 2024

ssh doesn't keep history: the shell does. When you start a remote shell via SSH, history is managed normally, local to the shell process. bash, for example, writes to ~/bash_history.

In other words, you could say history is stored remotely, on a per-user basis, in a plain file.

vantage could manage this, as it does have authentication. Unauthenticated accesses could share history. It would be a matter of picking a default directory, exposing a configuration function in the vantage object, and storing history in plain-text files.

For example, I can picture this kind of interface:

vantage.history(".vantage-history") // current directory storage, shared
vantage.history(".vantage/<user>-history") // current directory, per-user
vantage.history("/vantage/<app>/<user>-history") // system-wide, per-app + per-user

I could spare some free time to implement this and submit a pull request. If you're short on time, let me know and give me a few days =)

from vantage.

dthree avatar dthree commented on June 15, 2024

Nice and thanks for the data - I didn't know those things. Your idea sounds right. On unauthenticated access, I think I assign a user account as guest or something, so it could store it under that name.

I'm very short on time, so it would be totally awesome if you could spare time to do this!

I should probably fill you in on some more details as to how Vantage handles sessions, etc. as getting this working is going to require modifications across the code base, particularly adding content to:

./lib/vantage.js
./lib/client.js
./lib/server.js

Feel free to ask me any questions or confusions - don't hesitate at all!

In regards interface, I think we should go with Convention over Configuration and not try to expose it that publicly to users, unless they really need to change it. It should just work as a default, I think.

from vantage.

dthree avatar dthree commented on June 15, 2024

@slezica does it look like you're going to be able to work on this?

from vantage.

slezica avatar slezica commented on June 15, 2024

@dthree I'm sorry for the dissapearance. I switched jobs, working both during the transition, and have been unable to spare time for any of my personal projects.

I'd love to contribute this feature (I use vantage and feel the need for it myself), but I'm 200% swamped. I have to be realistic and pass. Sorry I didn't tell you earlier, I honestly forgot.

I hope I can come back and contribute some solid code to this project in the future.

from vantage.

dthree avatar dthree commented on June 15, 2024

No probs and thanks for letting me know.

from vantage.

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.