Hi Miyako, Nice post. On Tue, Dec 5, 2017 at 5:01 PM, Keisuke Miyako via 4D_Tech < [email protected]> wrote:
> the place to look in documentation is in "Triggers" > http://doc.4d.com/4Dv16R4/4D/16-R4/Triggers.300-3317281.en.html OK. Not intuitive but I get the correlation. This is the first time anyone has directly tied the relation of memory spaces for triggers and client side processes. > quote: > • With 4D in local mode, the trigger works with the current selections, > current records, table read/write states, record locking operations, etc., > of the invoking process. > • With 4D Server, only the context of the database of the invoking client > process is preserved (locked records and transactional states). 4D Server > also (and only) guarantees that the current record of the table of the > trigger is correctly positioned. The other elements of the context (current > selections for example) are those of the trigger process > > the language is a bit indirect, like I say "avocado" and you say "black berry"? > but the read write state falls under "other elements". > I believe triggers pre-date multiple processes but I haven't looked back to check. Nonetheless I can see how the technical infrastructure of the triggers would lend to managing the processes. This also seems to imply that when a client process is created it's established on the server first and then in the client. Makes sense - I just hadn't thought about it before. > also a must-read: > http://doc.4d.com/4Dv16R4/4D/16-R4/4D-Server-Sets-and- > Named-Selections.300-3423889.en.html And there we have a great visual of the relationship between the client and server memory spaces. Personally I would include such a visual in a discussion about processes and the server with a main header of something like 'Process Memory Spaces' and under that discuss how the various 4D mechanisms exist and interact. Something to speed up this moment of 'Ah ha!' > a good use of the shared context is to create a set or named selection > without a prefix on the client and pass its name(s) to the EOS method. very > efficient. > Help me with this one. Because you're saying I create a set on the client side, let's use 'test' since that's what's on the chart. By the chart 'test' only exists on the client memory space. So if I pass the name of this set to an EOS method then the contents of that set propagate to twin on the server side? > I also like to put a line that says: > ASSERT(METHOD Get attribute(Current method path;Attribute executed on > server)) > That is useful for development in single user mode since there's no way to mimic the effect of running on the server. Do you know if Method Get Attribute is any faster/slower/it doesn't matter than testing the application type? -- Kirk Brooks San Francisco, CA ======================= *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

