9 Replies Latest reply on Mar 9, 2016 6:28 AM by wimdecorte

    Server side plugin

    vincedubeau

      I loaded the BaseElements plugin on my development server (one included with paid membership here). It shows as available in the Admin console and is checked. I am using FMS 14 and FM Advanced 14.

       

      I am not able to see the functions in my desktop FM. Is there something I am missing?

       

      Thanks

        • 1. Re: Server side plugin
          Vincent_L

          Yes, what you did is just install the plugin on the server, so server side scripts (schedules), can use the plug-in.

          you've to also install the plug-in on your clients (though you can automate that install, but I never bothered to do it).

           

          To install on client, put it in the extension folder of the filemaker application

          • 2. Re: Server side plugin
            vincedubeau

            I had a feeling that might be it but everything I found on the web was rather vague. I was hoping that the clients could access the plugin from the server so it wouldn't have to be loaded on each one.

            • 3. Re: Server side plugin
              Vincent_L

              Yes, you can definitely do that,  but it's not that simple, it's much more simple since 12, but in your solution you have script this auto-download. and yes you have to set a settings on fms to do this the name should be auto update or something (and I think you've to put the plug-in in a different folder on the server that you did, but not so sure)

               

              here's for you a ready made solution maybe it will help you

              http://www.modularfilemaker.org/module/pluginmanager/

              • 4. Re: Server side plugin
                monkeybreadsoftware

                You can use the Install Plug-In File script step: Install Plug-In File

                 

                With MBS Plugin we include an example. The tricky part is to write a script which can run without plugin installed to detect the missing plugin. And when the plugin is there to do the version number comparison correctly to decide if an update is needed.

                • 5. Re: Server side plugin
                  wimdecorte

                  vincedubeau wrote:

                   

                  I was hoping that the clients could access the plugin from the server so it wouldn't have to be loaded on each one.

                   

                  To answer this question explicitly: no that is not possible.  Each workstation needs to have its own copy of the plugin.

                  But that is very easy to take care off by using the "install plugin file" script step that you'll find referenced in the links in this thread.  The plugin itself does not need to be on the server for this to work.

                  The plugin needs to be on the server for any server-side schedules or PSoS calls or WebDirect/CWP scripts to use.

                   

                  Used to be, you could create a folder structure on FMS with the plugins and their versions in folders and the clients could download it from the server.  That's no longer in use.  Now  you simply embed the plugins in a container field and use the "install plugin file" script step.  Much easier to maintain.

                  • 6. Re: Server side plugin
                    beverly

                    Possibly folks want to know how this works with FMGo - is that also using PSoS?

                    beverly

                    • 7. Re: Server side plugin
                      wimdecorte

                      Good point.  FM Go can not use plugins natively so if there is a routine that absolutely must use a plugin then PSoS is the only way to do it.

                       

                      Obviously that only works for solutions that are hosted on FMS, and the FMS machine needs to be able to handle the load.

                      • 8. Re: Server side plugin
                        taylorsharpe

                        As Wim and Beverly said, Perform Script on Server (PSoS) is the best way to go because you don't have to worry about the client having the plugin or not.  This of course assumes you have a FileMaker server <grin>. 

                         

                        That aside, PSoS takes some getting used to.  When you run it, it is basically logging you back in as a new user.  So you need to make sure any PSoS scripts don't get stuck in your startup script.  Make sure your startup script bails out either by info in the script parameter or else just by being run on the server.  You can do an if statement to test for the server such as if PatternCount ( Get ( ApplicationVersion ) ; "Server" ) = 1, then exit the script. 

                         

                        Next you have to remember that the context of where you are is not going to be where your PSoS is.  So if you are in a particularly layout and a given found set, when you make a call to PSoS, you have to tell that script to go to whatever layout you are on, find the found set you want, sort, etc.  Sometimes that is a pain.  It would be nice if you could do something like the Snap Shot link to say return me to this context, but alas, we don't have that now. 

                         

                        Where PSoS works really well is with ExecuteSQL statements because they do not require context or for you to even be in a particular layout.  Often I will want a big search or summary done with PSoS because it is much faster there and I just have it have it run the ExecuteSQL.  You return the Results with the Exit Script ( $Result ) and then in the client application, you catch the returned result with a Get ( ScriptResult ). 

                         

                        If any of this doesn't make sense, let us know and I'm sure we can all help you write PSoS scripts.  But it does take a little getting used to how it works. 

                        • 9. Re: Server side plugin
                          wimdecorte

                          Taylor Sharpe wrote:

                           

                          As Wim and Beverly said, Perform Script on Server (PSoS) is the best way to go because you don't have to worry about the client having the plugin or not.  This of course assumes you have a FileMaker server <grin>.

                           

                           

                          Yep.  Just to make a point of it; it is very easy for a developer to be testing as to sole user against their dev server to say "wow; this PSoS thing rocks and is fast and is easy"

                           

                          PSoS does rock but assuming that it will just work in production can be very wrong:

                          - the server needs to be up to the task; this is a scenario where more cores/processors will help you.  If the server is not up to the task then adding PSoS may degrade performance for everyone

                          - there is a setting on FMS that limits the # of concurrent PSoS sessions.  In our development we need to anticipate that and trap for the error of exceeding it and handling it (do we tell the user it does not work, is there data in a half-way state now? do we loop and retry?  do we shift to handling it on the client?  Is that even possible - like the case of FM Go)