I wasn't able to tune into this 4DMethod user group presentation live but caught it later. First off, thanks to Brent Raymond for doing such a great job with 4DMethod. I don't know if everyone is taking advantage of this great resource. Given the various time zones we all live in, having presentations available for playback at any time is *massively* helpful. There are lots of good presentations up there so check it out.
Anyway, for anyone expecting to continue working with 4D down the versions, go watch this excellent presentation now! There's an embedded link to the presentation here at the moment: https://4dmethod.com/ The meeting starts with the usual helpful reviews of 4D news and business, NUG threads and pointers to KB of interest. There's a bit of a technical glitch in the middle and if you want to skip through that, move to between 36 and 37 minutes. (36:45 when I watched,) I haven't been in 4D fanboi mode on this list much lately, so excuse me while I gush a bit. You know how sometimes 4D makes you scratch your head and then other times it takes your breath away because it does something so elegantly? This is one of those "check it out, it's so elegant" times. So check it out! Many old-timers will recall that I've said "SET PROCESS VARIABLE is evil" more than once. Without belaboring my entirely reasonable and balanced position ;-), 15 R5/16.0 (ish) bring a new and fundamentally improved native interprocess/inter-window communication systems. Thomas' demos are clear and persuasive. The upcoming features aren't going to allow for every type/pattern of message queue that you might want, but they do allow for some very helpful and common ones. * Passing messages between windows in one process or across processes on one machine with CALL FORM (perhaps it should be named CALL WINDOW?). This makes complex UI code way simpler to implement and more efficient to run. * Passing messages between processes with CALL WORKER. * In both cases, 'messages' are a method call with whatever parameters you need. Thomas doesn't discuss it, but an obvious strategy is to pass JSON objects. Then again, you can pass simple parameters as well, which can be even easier to read and write. Your choice. * Thread-safe, pre-emptive, avoids globals and semaphores, very efficient polling, etc. Yeah, nicely done 4D. I've been writing message queues in 4D for a really long time...the first one was at 4D years ago to generate plug-in serial numbers. (There was a special plug-in to do it that was tied to a single machine...and there was no sort of RPC system in 4D Server at the time.) I figured out SET PROCESS VARIABLE & friends enough to see their downsides and never used them again. (I also never used subtables in productions after the first attempt, for that matter.) Instead, I use record-based queues (which I still like) and IPC communication with NTK (which I also still like.) The new commands looks extremely well thought out and deceptively easy to use. (Meaning, you could be forgiven for not even knowing how much complexity 4D is sheltering you from, and how well they're doing it.) If you've done any sort of queuing work yourself, you'll quickly appreciate that the new approach is one of those areas where 4D is hitting it out of the park. Like I said early, excuse my gushing...but this is an awesome set of features. Note that the demo is showing features in unreleased versions so things may change (improve). For example, it appears that the message queues die if 4D shuts down or crashes. This is absolutely fine for some uses and a deal-breaker for others. Perhaps CALL WORKER will gain an option to retain unprocessed messages? P.S. If anyone is interested in multi-platform queuing solutions, ping me. I'm diving into RabbitMQ these days and it's sweet. Welsh Harris turned me onto IronMQ and it also looks pretty great. It's more similar architecturally to AWS's SQS than RabbitMQ but any of these three are solid-looking choices for scalable, distributed systems. ********************************************************************** 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:4d_tech-unsubscr...@lists.4d.com **********************************************************************