Using MySQL on (headless) Linux

Richard Gaskin ambassador at fourthworld.com
Tue Feb 2 19:31:37 EST 2021


Good rules in general, but my question was about something else entirely.

As for the IDE, it's a GUI; I'm not sure what could be done with it on a 
headless system.  (Yes, instructions are provided for sys admins to 
automate *installing* it via command line -- great for computer labs and 
such -- but I can't imagine how one would *use* the IDE from Terminal.)


As for my post, it was a question in reply to Mark Waddingham's note 
about how only standalones can be expected to use externals.  That is, 
at least as I read it.

I'm hoping I misread it because for headless systems LC Server is 
designed to be the optimal solution:

- Lean runtime

- Can run scripts in stack files, script-only stacks, and even
   plain executable text files in the traditional shebang way:
   https://livecode.com/a-livecode-shell/

- The same engine installed once for general system programming
   can also be aliased in cgi-bin to offer all of the above plus
   PHP-style implicit merge under Apache or Lighttpd. Even if you
   don't need public-facing web hosting, there are a great many
   benefits to having systems communicate via REST.


I was resistant to using LC Server for many years when it first came 
out, because I missed the shebang simplicity we'd enjoyed with MC, and I 
wasn't sure how long LC Ltd would stick with it.  Both concerns have 
been well addressed now, and it's my go-to for headless.  I've even 
replaced many installs that had been standalones during my reluctant years.

-- 
  Richard Gaskin
  Fourth World Systems



Mark Talluto wrote:
> My simple rule on this is:
> 
> If I need to write code, use the IDE. 
> 
> If I need to deploy code, use a standalone.
> You get the best possible performance. They are flexible since you can dynamically load code. They do not have the burden of  the IDE. It seems the right path to go.
> 
> Maybe there is a reason Ben wants to deploy with the IDE? 
> 
> Best regards,
> 
> Mark Talluto
> livecloud.io <http://livecloud.io/>
> nursenotes.net <http://nursenotes.net/>
> canelasoftware.com <http://www.canelasoftware.com/>
> 
> 
>> On Feb 2, 2021, at 10:58 AM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> LC Server doesn't handle externals, so for that we need a standalone?
>> 
>> I think I'm missing something.
>> 
>> -- 
>> Richard Gaskin
>> Fourth World Systems
>>
>> 
>> Mark Waddingham wrote:
>>> On 2021-02-01 22:25, Ben Rubinstein via use-livecode wrote:
>>>> Undesirable things found:
>>>> 1. I've not found how to access externals (in this case the database
>>>> library) without explicitly setting the 'externals' property of the
>>>> stack to a (generally unreliably) full path before the stack is saved.
>>>> 3. revSetDatabaseDriverPath is required even when the drivers are in
>>>> the standard location inside the app 'bundle'.
>>>> I'll report (2) and (3) formally when I've done a bit more
>>>> investigation. I'd still love to know what I'm doing wrong, in
>>>> relation to (1).
>>> Please don't - as neither are bugs :)
>>> The standalone engine inside the runtime folders in the IDE install is just a bare engine.
>>> In community you can certainly run the bare engine without building a standalone but as you have discovered it is just what it is - a bare engine, it knows nothing of externals, database drivers, widgets, script libraries or anything else.
>>> If you want a headless (community) engine which has dependencies then all you have to do is deploy a standalone with a launcher stack embedded into it.
>>> The launcher stack should have the inclusions you want configured for it, and it can just run the stack you pass as an argument on the command-line.
>>> Doing it this way, it means the standalone builder will take care to ensure all the 'inclusions' you set are present and configured correctly (including widgets, externals and script libraries).
>>> You only need to rebuild the standalone if your inclusion requirements change, or you want to change engine version.
>>> Warmest Regards,
>>> Mark.
>>> P.S. In regards to (1) the trick is to do this:
>>> ```
>>> set the externals of the templateStack to <external files list>
>>> create invisible stack "Externals" -- or any name you like
>>> inser the script of it into back
>>> reset the templateStack
>>> ```
>>> This allows you to compute the external paths at runtime when the engine starts (e.g. by using the engine folder, or the filename of the stack and computing the paths).
>>> -- 
>>> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
>>> LiveCode: Everyone can create apps






More information about the use-livecode mailing list