Jump to content
Sign in to follow this  
LaRetta

Server-Side Scripting ?

Recommended Posts

This excites me terribly (and I know we've wanted it) but I'm having trouble visualizing how performance might be affected. I've ingrained in my mind that an FM Server should NOT run any other tasks because it would slow performance and Users would be affected. Now we are told that FMS can run its own scripts? It concerns me.

Example: Can this truly replace a client robot (which runs a process every 5 minutes)? If I use server to run a script every 5 minutes and if the script is complex won't that hinder performance which the Users will notice? If so, can FMS fire a script on another server which could handle the processing instead?

I am unable to test this with several users to see how it would impact a 200-user network. I have trouble understanding the concept in general. Can others help me grasp how to properly take advantage of this new feature? I'd sure appreciate it!

ALSO: What would be the script perspective? I mean, if we included a path, such as Get ( DesktopPath), would it look to the server desktop? I'm befuddled.

LaRetta

Edited by Guest
Added ALSO

Share this post


Link to post
Share on other sites

LaRetta -- as I understand it only "web compatible" steps can run, which means that most of the really useful ones (such as sending mail, doing exports, etc) won't work. I'm a little confused by this too, so would appreciate any feedback others can give about whether we can finally replace our robot machines.

My main issues are :)

1. Email: Can FMSA9 on Mac OS X use server-side scripts to use any of the pop or smtp plugins? Last I checked SMTPit didn't work with FMSA8 and Mac OS X.

2. PDFs :P can FMSA9 on Mac OS X use SSS to print PDFs to a web-server folder?

thx!

Share this post


Link to post
Share on other sites

1. Email: Can FMSA9 on Mac OS X use server-side scripts to use any of the pop or smtp plugins? Last I checked SMTPit didn't work with FMSA8 and Mac OS X.

-- Highly Doubt It. You may however want to have a look at developing yourself a small php script to retrieve data from your DB using FM PHP API and send emails based on that data using PHP.

Might also want to try fmwebschool.com for this if you're unsure about the API or your knowledge of PHP).

2. PDFs :) can FMSA9 on Mac OS X use SSS to print PDFs to a web-server folder?

-- Highly Doubt It given the whitepaper on FMI's website that suggests that FM Pro (vs FM Server) be used to generate reports *wow* (not really).

As FMI states, the primary purpose of this is to perform rudimentary tasks like moving data around etc.

You can actually get a fair bit done with it [sSS], but the idea is that the script runs without ever requiring any user interaction. To be honest they haven't really added anything besides what was already there (you could execute scripts through the XML interface for a while).

Edit: My second response was based on the assumption that SSS means Server Side Scripts?

Edited by Guest

Share this post


Link to post
Share on other sites

You can actually get a fair bit done with it, but the idea is that the script runs without ever requiring any user interaction.

The problem with SMTPit (last I asked) running on FM Server was specific to Mac OS X and seemed more like a bug than a design constraint. Maybe the SMTPit people could answer this (assuming they lurk here?)

Edit: My second response was based on the assumption that SSS means Server Scheduled Scripts (i.e. the new Script Schedule utility in FMS9?)

Yeah, i just made that up -- SSS = Server Side Scripts (or Server Scheduled Scripts) Hopefully it doesn't conflict with an existing acronym... :)

Share this post


Link to post
Share on other sites

Update: CNS plugins discussion list website is down, so I emailed them about this issue. I'll post their reply.

Share this post


Link to post
Share on other sites

as I understand it only "web compatible" steps can run, which means that most of the really useful ones (such as sending mail, doing exports, etc) won't work. I'm a little confused by this too, so would appreciate any feedback others can give about whether we can finally replace our robot machines.

According to a post that I read from Geoff Coffey...

"It seems as though that when a server side script is run using the new scheduled scripts feature in FileMaker Server, it runs the same pseudo client that runs an IWP session or a CWP instance. In other words, a tiny little faceless FileMaker client running on the server essentially "opens" the file and the script runs. When it does this, it runs any script that is set to run when the file opens. He believes that the same holds true when you run a script via the XML, XSLT, or PHP interfaces. It will run any opening scripts that you have set to that file."

Share this post


Link to post
Share on other sites

Yeh I'm 100% with what Geoff said... he sounds so smart (probably cause he is lol).

FM really haven't tried much, but like I said, it has it's uses and its based around a reasonable assumption: The non-compatible steps actually require interaction with the user - not much use on a server sitting there by itself.

Share this post


Link to post
Share on other sites

Would this work? Use a server-side-script to use the "Open URL" script step. The URL would either be a "file:///" URL which executes a shell script, or if that doesn't work, then use Open URL to open a http:// url that opens a PHP script locally, and the PHP script does all sorts of fun stuff.

Share this post


Link to post
Share on other sites

.. what for?

Share this post


Link to post
Share on other sites

FM Server schedules can already run os-level scripts.

I think the problem is any script that might require interaction with the file system: FM Server doesn't necessarily have those privileges especially when no users are logged-in to the system.

Share this post


Link to post
Share on other sites

LaRetta:

I agree 100%. If your server is under heavy load (and if you have 200 users, it probably is) I would never schedule scripts on it.

I haven't tried it, but I see no reason why you couldn't do this though:

1: Create a new file.

2: Add scripts to it that use data (and even run scripts) from other files.

3: Put this file on a *different* filemaker server.

4: Schedule scripts in this file.

Again, I haven't tried it. It's possible it won't work. But if it does, you can offload your server scheduled scripts to a separate filemaker server, which could be devoted to the cause. If you have a site license, you are entitled to install as many filemaker servers as you want, so this can be very economical.

The question is: Why? As far as I can tell, server scripts only have one advantage over a robot: they run in a threaded environment. In other words, you can have *several* scripts running on the same machine at the same time. This could be really nice if you have complex scripts that are time sensitive (I'm thinking of EDI integrations, email bases automation and so forth here).

On the down side, server scripts are limited to web-compatible steps, which throws out import/export, among other things. Also, a server script can only be run as often as once per minute. I have robots that run scripts every second for good reason, so that's a pretty big limit.

I'm rambling here, but anyway, the jury's still out in my book. I'm intrigued by threaded scripts. But only if I can run them on a second server, and even then I'm worried about the limitations.

Geoff

PS: I am using it already in one place. I have a script that restores sample data on a public demo web site. The server isn't busy, and the script is simple and needs to run every few minutes. This is probably exactly the sort of situation this feature was meant for. My 2 cents anyway.

Share this post


Link to post
Share on other sites

I'm a bit behind. :crazy2: But I should have this solution to the point of testing by next week. It is good to know I'm not nuts (at least on THIS issue, ha ha). And I'll respond again if/when I have interesting results to report.

I really appreciate you all helping me on it! I didn't want you to think I'm ignoring any input ... if I ever don't respond right away, it's because I'm giving it serious considerations or testing. :smile2:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By Justin Close
      I was doing a bit of work for a client who is running FM9 clients, connecting to a file hosted on an FM11 server.  I don't have FM9, so was doing development on FM11.  I thought I had checked out that everything was compatible, but I somehow generated a calculation that doesn't evaluate on 9, but does on 11.  The components of the calculations and custom functions used all appear to be innocuous...  I  am hoping someone here knows what I tripped up on.
      Here's the field calculation, and the 2 custom function definitions that it uses.  The entire point of this calculation is to take a mish-mash text field that they have and make it sort nicely.  For this bit I added, I'm just concerning myself with sorting some suffix numbers that occur between parentheses, e.g. 12345(A-1).
       
      Field calculation definition: Let ( [ _fileNum = Files::File Number ; //Position of 1st open/close parens, and then extract the text between them: _sParen = Position ( _fileNum ; "(" ; 1 ; 1 ) + 1; _eParen = Position ( _fileNum ; ")" ; 1 ; 1 ) ; _suffix = Middle ( _fileNum ; _sParen ; _eParen - _sParen) ; //Count the leading digits before any non-digit character, e.g. an alpha, or dash or space, etc. _count = CountPrefixDigits ( _suffix ; 0 ) ; //Remove extraneous characters (dash, space): _suffix = Substitute ( _suffix; ["-";""]; [" " ; ""] ) ; //Pad out the string to min 5 characters (helps 75-A sort next to 75): _suffix = _suffix & Left ( "!!!!!" ; 5 - Length (_suffix) ); //Reverse the character sequence (so the Code() call works out better): _suffix = ReverseString ( _suffix ) ]; _count & Code ( _suffix ) //prepend the digit count, but don't encode that count, just the rest of it ) -------------------- 'CountPrefixDigits ( aString ; aCounter )' custom function: If ( IsEmpty ( GetAsNumber ( Left ( aString ; 1 ) ) ) ; aCounter ; CountPrefixDigits ( Right ( aString ; Length ( aString) - 1 ) ; aCounter + 1 ) ) -------------------- 'ReverseString (aString)' custom function: If ( Length ( aString ) > 0 ; ReverseString ( Right ( aString ; Length ( aString ) - 1 ) ) & Left ( aString ; 1 ) ; Left ( aString ; 1 ) )  
      Thanks,
      Justin
       
    • By Tumma K
      Hello, All!

      I am an aspiring developer for Filemaker. The company I work with is stuck in the past working off of Filemaker Pro 4.1

      I was given the task of bringing us up to Filemaker Pro/Server 13. So far my conversion prototypes are successful but we recently had a layout issue that can only be fixed in versions 3-6 (as the file is an .fp3) I work off of a macbook while our network is all Windows 7. In order for me to repair the layouts without tampering our active database, I decided the best option is to repair a copy of our solutions off the network. Unfortunately, when I go to download the trial version of Filemaker Pro 6 off of the respected website, the file is corrupt! I've tried multiple times, with different extraction apps and in different directories.

      My question is;

      Does anyone know a place where I could obtain version 6 (or better yet, 4.0) for an OSX computer? I've looked everywhere!
       
      Thank you for your time,
      Tumma K.
    • By MacSig
      Hello everyone.
      How can I set the calculated value of field C to the number of records having field A equal to the value inserted to field A and field B equal to the value inserted to field B?
       
      For instance with the following situation
       
      record 1  =>  A = "house", B = "pay" 
      record 2  =>  A = "house", B = "win" 
      record 3  =>  A = "car", B = "pay" 
      record 4  =>  A = "house", B = "pay" 
       
      when I create a new record having  A = "house", B = "pay"  C should automatically be 2 (since record 1 and 4 have the same A, B.
       
      Thanks
    • By MrEddByrnes
      I'm hoping my question can have a happy ending. In the mid-90's, I purchased Filemaker 3. When Filemaker 5.5 Pro was released, I bought the update CD, which requires the user to either have FM 3 installed or to have the installation CD for FM 3. I've used it all these years, most recently with Windows XP Pro, and it has worked just fine. The databases I began with were long ago converted to FM Pro 5.5 databases.
       
      I'm still using FM Pro 5.5 on a laptop with WinXP Pro, but in 2013, I purchased a PC with Windows 8. I haven't been able to install FM 3 on it, therefore can't install FM Pro 5.5. I am retired and rarely use Filemaker, but I have a few Filemaker databases I'd like to add to my Win 8 machine. I don't feel it's worth upgrading FM for the sake of using a couple of databases.
       
      Has anyone else run into this situation and/or have a (possible) solution? Is there perhaps any other software that can read FM 5.5 databases? Thanks in advance for your help.
       
    • By bmill
      I am using a custom filemaker solution for medical office billing written with fp5 running on a mac with snow leopard. In addition, I have a patient management db (which I wrote) that is linked through pt. ID number to the billing program allowing transfer of some demographic information (name, DOB, etc).
       
      Other than being limited by hardware restrictions, the billing program serves our needs for now and upgrading to fp12 will take some time (and money).  In the meantime, I am upgrading my pt. management program to fp13 and would like to move new patient demographic information from the billing program ( fp5 running on snow leopard through Parallels) and the new pt management program ( fp13 running on OS X 10.9) on the same mac.   
       
      Ideally, demographic information would be entered once into fp5 and then a scipt would make the data available for fp13.
       
      Any ideas on how to make this work?
×

Important Information

By using this site, you agree to our Terms of Use.