Storage is the best option for interprocess communications if you want to use 
preemptive processes. I have not done any real benchmarking but I have not 
noticed that anything seems slow. By setting up return values on a per-process 
basis you can avoid locking contention on storage. 

For example, I have a wrapper for CALL FORM which allows a return value. I'm 
using this to provide services to non-GUI (possibly preemptive) processes that 
need to call form related features. One place I'm using this is to call a 
Javascript auto-layout library (http://ijzerenhein.github.io/autolayout.js) to 
generate a form layout from a constraint specification. This approach allows me 
to load the layout library in one (hidden) process and use it from any other 
process. The call looks like this:


//Internal method to execute the auto layout request in the web/javascript 
process.

  //$0 - Object with layout specification.
  //$1 - Collection of VFL specification strings.
  //$2 - View with.
  //$3 - View height.
  //$4 - (flag) Layout window, provided by this method only.


C_OBJECT($0;$oResult)
C_COLLECTION($1;$cSpec)
C_LONGINT($2;$width;$3;$height)
C_LONGINT($4;$window)

$cSpec:=$1
$width:=$2
$height:=$3

If (Count parameters<4)
        $window:=FD_Layout_window 
        PM_CALL_IN_FORM_WINDOW (Current method 
name;->$oResult;0;->$cSpec;->$width;->$height;->$window)
Else 
        WA EXECUTE JAVASCRIPT 
FUNCTION(fd_waLayout;"autoLayoutD5";$oResult;$cSpec;$width;$height)
End if 

$0:=$oResult


John DeSoi, Ph.D.



> On Aug 25, 2018, at 4:44 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> But lets explore other possibilities. What could “Storage” be use for in 
> other cases? Is it a good use of “Storage”?

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to