BaseElements Plugin on FileMaker Server

BaseElements Plugin is compatible with FileMaker server, with some caveats :

 

Server Compatible Functions

There is no distinguishing inside the plugin as to which environment you're running under, either Pro, WebDirect, FMS or Go.  So the plugin treats them all the same.

Which means you can, in theory call any function in any environment.  However you need to be aware that some functions don't make sense, and therefore shouldn't be called from some environments.

For example, the dialog functions aren't of any use in Server Side schedules, as no-one will see them.  Therefore the behaviour is this situation is not documented or tested.  The same applies to WebDirect, where the plugin runs on the server, and the UI is at the client.  The plugin can't render dialogs within the client's web browser.

Another example is the FMS Admin functions.  Obviously they'll fail when run in Pro as there is no server.  But they also don't work on FMS Cloud where there is no command line option, and therefore no ability to run these.

 

BaseElements Plugin and Single threads

The BaseElements plugin is not currently coded as "thread safe".  An instance of the plugin has a single store of temporary storage that it's using during and in between operations ( things like storing the SMTP settings, before the SMTP send, or the HTTP headers before a call ).

Because of this, if you're running two instances of the plugin on a single machine, they can interfere with each other and step on each other's toes in terms of threads and operations, and therefore cause issues.  Again, running in this way is not documented or tested, and is not recommended.

If you're calling scripts via PSOS or Schedules that use the BE plugin, we recommend that you do this in a way that limits the scripting to one process at a time.  So either you a system to flag when other processes are active and pauses until the flag is cleared.  Or you run a single process via schedule, that repeats and waits for a queue of "event" records to process.  Each one can be different actions to run, but they run in sequence as they come in.

Either of these methods work to keep the plugin to a single instance, and therefore reduce the dependency issues that may come up and so prevent crashes or other issues.

 

Can BaseElements plugin be thread safe

It is possible to at least attempt to retro fit a thread safe model to the BE plugin.  It's not something we have in the todo, and would likely cost above $5000 in development time.  This could be something that we either sponsor or crowdfund in the future.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.