POLL: LiveCode Server deployment

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

How do you use LiveCode Server?

I haven't used it yet but intend to.
20
27%
I run it on a VPS or dedicated server.
22
30%
I run it on a shared hosting service.
24
33%
I have no interest in LiveCode Server.
7
10%
 
Total votes: 73

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

POLL: LiveCode Server deployment

Post by FourthWorld » Fri Mar 11, 2016 1:05 am

I'm curious about how people are using LiveCode Server - please pick the option that best describes how you use it.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2826
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: POLL: LiveCode Server deployment

Post by mwieder » Fri Mar 11, 2016 1:27 am

A: None of the above

I use it on my desktop machine and run script tasks rather like shell scripting.

Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am
Location: Bamboo River

Re: POLL: LiveCode Server deployment

Post by Peter Wood » Fri Mar 11, 2016 2:34 am

A. None of the above

I use it to develop LiveCode script only stacks on a desktop machine.

I tried to use it for a website on on-rev but found the installed version to have bugs that affected my scripts so I used Ruby instead.

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: POLL: LiveCode Server deployment

Post by malte » Fri Mar 11, 2016 6:23 am

I am currently evaluating a lot of stuff I can do with a NUC machine (Gigabyte Brix) running LC Server and really am surprised hjow powerful it really is. Makes me wonder why the information on liveCodes website is so sparse. Tough to find information on server (and its licensing) there...

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Fri Mar 11, 2016 6:44 am

I love NUCs. I got ASRock's BeeBox N3750 a couple months ago, doubling as a test server and media player. They pack so much into such tiny boxes these days!
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

livfoss
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7
Joined: Sun Apr 09, 2006 10:03 am
Location: UK and France
Contact:

Re: POLL: LiveCode Server deployment

Post by livfoss » Fri Mar 11, 2016 1:15 pm

I have been involved in a long struggle to use LiveCode Server as part of a small web site that offers a paid-for software download (in fact an LC-constructed desktop app). The site uses PayPal "Pay Now" buttons and Jaque Gay's "Zygodact" system to generate unique serial numbers - for this reason it needs the commercial version of LC Server.

This turned out to be very hard: the LC documentation is inaccurate; to get LC Server to work on Dreamhost involved setting permissions, which I abolutely could not have done without Stephen Barncard's generous help; also without scripts generously provided by Jaque, I would never have got near deploying the PayPal buttons. The PayPal documentation itself is comprehensive but not user-friendly, at least not to me.

I was right outside my comfort zone, which is firmly based on LiveCode programming and not much else. I still am. The upshot has been that I have kept delaying the completion of the project. Doubtless this is subjective and says more about me than about LC Server, but there it is.

That said, I have no doubt that it will all work well eventually.
Graham Samuel / The Living Fossil Co. / UK & France

livfoss
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7
Joined: Sun Apr 09, 2006 10:03 am
Location: UK and France
Contact:

Re: POLL: LiveCode Server deployment

Post by livfoss » Fri Mar 11, 2016 2:23 pm

Sorry, in my previous remarks I didn't actually contribute to your survey. My answer is really A, as I have submitted now. I also said that I run it on a dedicated server, without really knowing what this means - out of my comfort zone again. Basically, we've got a bit of space on DreamHost for a small set of web sites, and I've put LC Server Commercial into the cgi-bin of one of them. Is that dedicated? I would suppose so. I wouldn't know how to make the engine available to all the sites at once, but I'm sure someone would tell me if I asked.

I suppose the answer to all my grumbling is to have a complete worked example of LC Server deployment, including what directory structures and permissions are needed and a long list of gotchas. The LC documentation could do this, but it doesn't.
Graham Samuel / The Living Fossil Co. / UK & France

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Fri Mar 11, 2016 5:19 pm

livfoss wrote:I also said that I run it on a dedicated server, without really knowing what this means - out of my comfort zone again.
No worries - that's part of my motivation in conducting this survey, to assess needs in the community for tutorials and/or tools to make these things easier.
Basically, we've got a bit of space on DreamHost for a small set of web sites, and I've put LC Server Commercial into the cgi-bin of one of them. Is that dedicated?
The distinction in type of server has more to do with how the server is set up than your use of it:

Shared Hosting Service is a computer set up by a hosting company with multiple users on it. On most commercial shared hosting services the number of users can range between 50 and 300, and while that may seem like a lot keep in mind that most users of shared hosting services have fairly low-traffic sites, so the cost/benefit of a shared service is quite good for the resources actually used. The hosting company manages the computer's OS and server software and configuration, and a user only needs to manage their own media and CGIs. Typical costs range between $5/mo and $10/mo, which isn't bad for low-traffic sites considering that most of the work is done by the hosting company. CPU and RAM are shared among users of the machine, so resource fluctuations are common, but since most folks using a shared-hosting service aren't running massive sites these fluctuations are rarely an issue. Because resources are shared, such services typically support only CGI (like LC Server) for additional processing, and do not allow always-on processes like custom socket servers. The only additional always-on program commonly available on shared servers is MySQL, and those are usually run on a separate server made available to users of the shared machine through a control panel.

Dedicated Server is a computer at a hosting company on which you are the only user. These systems usually put you in the driver's seat, which means you're responsible for maintaining the OS and server software, altering the configurations as you add more domains, etc. These offer the greatest flexibility, performance, and resource availability but also cost the most, typically between $100/mo and $400/mo depending on the hardware and support services offered. Since you're the only user on the machine you can do whatever you want, including any number of socket servers or even replace Apache with with some other web server like NginX or Node.js. You can run any database you want, or none at all. You can complete control over the machine, and are usually completely responsible for it as well.

VPS is a Virtual Private Server, almost a mid-point between shared and dedicated in terms of flexibility and performance. These are virtual machines running on a computer that will typically have only a few dozen of them. Each VPS instance usually has a dedicated amount of RAM allocated for it, which is guaranteed to be available at all times. CPU time is often similarly partitioned. Being a self-contained OS instance, you have much of the flexibility of a dedicated server, but only a portion of the CPU and RAM on the machine. There are two main benefits of VPSes over dedicated servers: cost, and scalability. Scaling can be as simple as purchasing more RAM and CPU space, and the VM goes offline only momentarily as those are increased, whereas on a physical machine you'd have to open the case to add more RAM. Amazon and other cloud services are typically VPSes, operating within an infrastructure which allows rapid scaling. The downside of larger cloud service is often file I/O, since storage is often separated from the app and carries additional latency as data is moved between the storage server and the compute server. For most of us building smaller systems, affordable VPS solutions sacrifice automatic scalling for cost: you can get a VPS from Dreamhost, Digital Ocean, InterServer, ChunkHost, and others for between $5/mo and $15/mo for configurations with 1 GB RAM and a single dedicated slice of CPU time. These VPSes can run multiple web sites more efficiently than a shared server, and because you have complete control over them you can also configure them however you like and even run custom socket servers, making them a very good fit for a wide range of microservices. The one downside to VPSes is the same as with a dedicated server: great power means great responsibility; you're in charge of setting up and maintaining the system.

I suppose the answer to all my grumbling is to have a complete worked example of LC Server deployment, including what directory structures and permissions are needed and a long list of gotchas. The LC documentation could do this, but it doesn't.
This is a challenge that will be difficult to overcome, since shared hosting companies each have their own configuration for handling CGIs like LC Server. What works on Dreamhost will be different from what works on Hostgator, InterServer, or others.

We as a community could provide documentation for each of the major shared hosting companies, and a few have setup notes posted in stickies in this forum.

But there will always be another host that uses a different setup, so personally I see two routes going forward:

1. For the "get it running now and I don't care how it works" user it may be best to stick to services that provide LC Server pre-installed. Right now I know of only two: On-rev.com and hostm.com.

2. For everyone else, rather than simply list the steps for HOW to set up a server, I believe it may be even more useful to explain WHY those steps are needed. By conveying the principles that determine the practices, the reader of such a tutorial would be better equipped to handle the inevitable exception to whatever the tutorial attempts to offer.

Such a tutorial would take some time to write, and should be a collection of inter-linked tutorials so the reader can easily get details on areas they're not familiar with but not get bogged down with lengthy explanations of things they already know.

I've been taking notes on these sorts of things based on observing where users express frustration. The challenge for me has been two-fold: client work dominates my time because I have bills to pay, and my own personal preference lately is for VPSes, while most people are using shared hosting. The costs are similar these days, but I prefer the flexibility of a VPS though I respect that a VPS is much more work for folks just looking to add a little server-side processing to an otherwise stock Apache setup such as a shared host provides easily.

How to reconcile those challenges is something I'm pondering. Perhaps others can write tutorials as well - the ones at Simon's LiveCode Server site are most excellent and one of the very best resources our community has for server-related info at this time:
http://activethought.net/livecode-server/introduction/

Here's a thought: It wouldn't be all that hard for any of us familiar with setting up LC Server on a given host to write a tool that could handle installing and setting it up, all in one click. It would be more work to write the tool than to do the steps manually, but would save everyone else significant time. Given the differences between hosting companies we'd need different tools for each - one for Dreamhost, one for InterServer, another for HostGator, etc. But it would be doable (time permitting), and ultimately pretty cool to have in our community so everyone could get started with LC Server easily.

But as nice as that sounds, there is also a risk with such a tool: anything that insulates the learner from knowing what's happening behind the scenes means that a certain amount of education which may be valuable will be missing. So while a one-click installer could obviate the need to understand how file permissions work, for example, inevitably as we get past installation to use LC Server that understanding will be needed in order for our scripts to be able to work with files robustly and securely.

There's a balance here that I haven't yet figured out the optimal mix for between convenience as a service and convenience as a disservice....
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

asayd
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 95
Joined: Mon Apr 10, 2006 7:02 pm
Location: Provo, Utah, USA
Contact:

Re: POLL: LiveCode Server deployment

Post by asayd » Fri Mar 11, 2016 5:38 pm

I guess I'm closest to B. I run LC Server on several physical and virtual servers that are wholly owned by my department at the university. That means I can configure them for all or just selected virtual hosts on each server. Typically I will modify the host config file for only those virtual hosts that want to use LC Server.

The main thing I use Server for is to write middleware--APIs for interacting with MySQL databases that serve as the backend data store for my desktop applications. So instead of the old school approach of establishing DB connections directly from my applications, I write task-specific .lc scripts that access the DB. This way I don't have to pass DB access credentials over the network. Credentials are stored, encrypted, on the server where the .lc scripts reside. When a script is called it reads and decrypts the credentials, makes the DB connection, executes the transaction, then closes the connection. Subjectively, I have found execution time to be very fast, at least as fast or faster than direct connections from the application.

BTW, my use of decryption means I need to use Server Commercial version.

Devin
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

Brahmanathaswami
Posts: 51
Joined: Mon Jun 24, 2013 4:10 am
Location: Hawaii
Contact:

Re: POLL: LiveCode Server deployment

Post by Brahmanathaswami » Fri Mar 11, 2016 8:35 pm

I use it on two different Linode Cloud Instances which run public facing web sites. www.himalayanacademy.com is 95% revIgniter LC plus WordPress in /blog...
http://www.wailuarivernursery.com is 100% revIgnter/Livecode... built in less than a week of man hours

VPS servers I guess you would call them (not shared).

We also use it in house on a box on the LAN for internal enterprise web services similar use case(s) as Devin.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Sat Mar 12, 2016 5:19 pm

Yesterday I wrote part of a shell script that downloads LC Server on a shared host, sets up a cgi-bin folder for it, unpacks it into that folder, and sets its permissions. I would be a relatively small matter to complete it by adding a download of an .htaccess file and sample .lc script to put into the web root to get things going, but then it occurred to me: to run it you'd need to first make sure your server has SSH enabled, and then be comfortable with securely transferring the script to your server, set its exec bit, and then run it from terminal.

So it would be a time-saver for folks already familiar with such things, but I wonder how many folks who've had difficulty setting up LC Server would find it easy to upload and run a shell script on their server?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

dsimpson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 15
Joined: Thu Dec 18, 2008 10:10 pm
Contact:

Re: POLL: LiveCode Server deployment

Post by dsimpson » Sat Mar 12, 2016 10:53 pm

asayd wrote:I guess I'm closest to B. I run LC Server on several physical and virtual servers that are wholly owned by my department at the university. That means I can configure them for all or just selected virtual hosts on each server. Typically I will modify the host config file for only those virtual hosts that want to use LC Server.

The main thing I use Server for is to write middleware--APIs for interacting with MySQL databases that serve as the backend data store for my desktop applications. So instead of the old school approach of establishing DB connections directly from my applications, I write task-specific .lc scripts that access the DB. This way I don't have to pass DB access credentials over the network. Credentials are stored, encrypted, on the server where the .lc scripts reside. When a script is called it reads and decrypts the credentials, makes the DB connection, executes the transaction, then closes the connection. Subjectively, I have found execution time to be very fast, at least as fast or faster than direct connections from the application.

BTW, my use of decryption means I need to use Server Commercial version.

Devin
This usage scenario would make for an interesting talk at the LiveCode Conference.
David Simpson
www.fmpromigrator.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Sun Mar 13, 2016 1:28 am

asayd wrote:BTW, my use of decryption means I need to use Server Commercial version.
Being able to embed credentials in protected stacks is certainly a nice convenience, but not absolutely necessary.

The most common middleware for DB access is PHP, which has no common means of protecting scripts. Instead, they either store credentials in a file outside the web root, or set values for them in the Apache config file - see the post on the latter in the middle of this page:
http://stackoverflow.com/questions/9798 ... rds-in-php

There's a lot to be said for encrypted LiveCode stacks, but users of LiveCode Community can accomplish anything users of other great languages enjoy also.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

asayd
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 95
Joined: Mon Apr 10, 2006 7:02 pm
Location: Provo, Utah, USA
Contact:

Re: POLL: LiveCode Server deployment

Post by asayd » Mon Mar 14, 2016 4:19 pm

FourthWorld wrote:
asayd wrote:BTW, my use of decryption means I need to use Server Commercial version.
Being able to embed credentials in protected stacks is certainly a nice convenience, but not absolutely necessary.

The most common middleware for DB access is PHP, which has no common means of protecting scripts. Instead, they either store credentials in a file outside the web root, or set values for them in the Apache config file - see the post on the latter in the middle of this page:
http://stackoverflow.com/questions/9798 ... rds-in-php

There's a lot to be said for encrypted LiveCode stacks, but users of LiveCode Community can accomplish anything users of other great languages enjoy also.
Thanks for the link, Richard. Actually, I store the credentials in text files, where I have written out text encrypted with the encrypt command in LC desktop. Then I read the encrypted text in on the server, using decrypt. It sounds like there may be other options. Maybe I should look into using shell calls to encrypt/decrypt.

Devin
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

asayd
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 95
Joined: Mon Apr 10, 2006 7:02 pm
Location: Provo, Utah, USA
Contact:

Re: POLL: LiveCode Server deployment

Post by asayd » Mon Mar 14, 2016 4:26 pm

dsimpson wrote: This usage scenario would make for an interesting talk at the LiveCode Conference.
That's an interesting idea, David. I'll think on that. I consider myself sort of a self-taught novice-to-interemediate when it comes to writing middleware. But that's one of the stories that we can tell with LC--how it enables you to do powerful things with minimal learning curve.

Devin
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

Post Reply

Return to “CGIs and the Server”