Shared Lisp: What is the best way to use libraries in a shared hosting environment?

I was thinking about this the other day and wanted to see what the SO community had to say about the subject.

Currently, Common Lisp is receiving some attention as a web development platform and not without reason (of which I am sure that you are already sure).

I was wondering how you can use a library in a shared environment similar to PHP.

If I configured something like SBCL as an interpreter for interpreting FASL files like Python or PHP, that would be the best way to use libraries (like clsql ).

Most of them are as installable as Adobe, but it will be a dumb amount of overhead requiring and installing the library every time the request is executed.

Keeping this in mind for shared hosting; would be better...

1) Install system copies of libraries for use in applications; reduces space, but problems may arise with using the correct version of the library.

2) Allow users (through the control panel) to install local copies for themselves; more space, version issues.

3) Tell them to wrap it in a module and load it on demand, like Python does (I'm not sure what / how this can be done with Lisp). Just being able to load the library for use would be a better option, but I don't think many of them are designed to be used that way.

In any case, wanting to hear your opinion, thank you.

+4
source share
1 answer

There are two ways to look at it:

  • run Lisp for each request

    Thus, it would be much better if Lisp is a saved image with all the necessary libraries and loaded data. But this approach does not look very promising for me.

  • start Lisp and enable the interface (web browser, another web server, ...)

    This way you can either run the saved image or Lisp, which loads a bunch of stuff once and executes queries.

I like to use saved images / applications in a deployment script. They can be quickly launched, contain all the necessary software and are not dependent on changes in the library.

Thus, it may be useful to provide pre-configured Lisp images that contain the necessary software, or to allow the user to customize and save the image.

+2
source

All Articles