http://qs321.pair.com?node_id=1226741

kaldor has asked for the wisdom of the Perl Monks concerning the following question:

Hello, this is my first question...

I'd like to write a small multi-user text application accessible by different interfaces (web, terminal, ssh and maybe others). The typical scenario is a few hundreds total users, with a dozen users connected at the same time.

I have the following prototype working : SQLite + DBI + Dancer2 web app running as FastCGI (on mac/linux). Now I wonder how to add CLI interfaces without duplicating code and logic... As fas as I understand, the SQLite "file" can be accessed safely by different processes.

Should I just write a basic CLI that accesses the DB directly and use xinetd? Or do I have to write a backend that accesses the DB and executes the logic for UI-only clients?

Suggestions and advice are welcome. Thank you.