Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement session manager #8

Open
8 tasks
oubiwann opened this issue Aug 13, 2015 · 1 comment
Open
8 tasks

Implement session manager #8

oubiwann opened this issue Aug 13, 2015 · 1 comment
Labels
Milestone

Comments

@oubiwann
Copy link
Member

oubiwann commented Aug 13, 2015

The shell manager needs to create an LFE shell for each "user" (client IP address). The following capabilities would be needed:

  • The ability to dynamically start a new "shell" process (maybe not a real LFE shell ...) per "user"
  • A means of tracking how long a user has been active / idle
  • Add a long-running processes that regularly checks for stale user sessions  #19 - The ability to prune idle processes (stale sessions)
  • A way of recording the number of any "bad actor" calls made from any given IP address
  • A way of recording the number of connection requests per second/minute/hour/etc made by any given IP address
  • Putting "shell creation" requests into a "queue" with bad IP addresses getting put into exponentially longer waiting times before connection after recorded bad actions
  • Watch for errors in "shells" (sessions) and kill processes with errors, transparently initiating a session re-creation the next time that IP address asks for an LFE code eval
  • Track overall manager runtime and the ability to request self-restart after a fixed time

Note: the need for this might be obviated by the option proposed in ticket #14.

@rvirding
Copy link
Member

These three issues, #8 #9 and #14, are really three sides of the same problem so I will write once and copy and then we will see where the discussion goes.

  • It would be quite easy to open the LFE shell and provide externally callable functions to process commands. run_string and run_script almost do that today.
  • You would then write a new top-loop using these functions.
  • This would not solve the problem of input/output when processing the commands, they by default send to/read from standard_io.

An easier way might then be to use the existing shell but to reset where the shell's, and the processes it starts, standard_io to control input/output. You then automatically handle all io in the commands. This is actually very easy to do, an example*:

http://www.geekherocomic.com/2008/11/12/real-programmers-dont-write-documentation/

This can also make the shell manager easier. The real question is then how we want to interface the "shell".

  • This is also a good example of how versatile the io system really is. :-)

@oubiwann oubiwann added this to the 0.3.0 milestone Feb 19, 2021
@oubiwann oubiwann changed the title Implement shell manager Implement session manager Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants