Re: Looking for 3rd party SQL query tool
Thanks Christian, I'm actually looking for a Windows tool, not mac. Tony On 3/30/20, 10:59 AM, "4D_Tech on behalf of Christian Sakowski via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: Hi Tony, i guess you are seeking for a Mac-Tool? I am using SQLPro for MSSQL/mysql from there: https://www.macsqlclient.com -- Grüße/Regards, [heubach-media] | Christian Sakowski christian.sakow...@heubach-media.de Tel: +49/(0)40/41 455 455 > Am 30.03.2020 um 17:53 schrieb Tony Ringsmuth via 4D_Tech <4d_tech@lists.4d.com>: > > Can anyone recommend a good 3rd party SQL query tool, to connect to 4D via ODBC, and perform general SQL queries? > > > > I used to use “SqlDbx” free version, but the free version is 32 bit only. Their 64 bit version is a bit spendy. > > > > Thanks, > > -- > > Tony Ringsmuth > > Business Brothers Inc. > > 763-420-8686 > > ** > 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 > ** ** 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 ** ** 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 **
Looking for 3rd party SQL query tool
Can anyone recommend a good 3rd party SQL query tool, to connect to 4D via ODBC, and perform general SQL queries? I used to use “SqlDbx” free version, but the free version is 32 bit only. Their 64 bit version is a bit spendy. Thanks, -- Tony Ringsmuth Business Brothers Inc. 763-420-8686 ** 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 **
Re: Windows Server Machine TCP Overload?
Thanks Miyako, This link: https://serverfault.com/questions/648424/windows-server-2012-r2-runs-out-of-ephemeral-ports-though-it-shouldnt ... seems like it's leading me on the right path. I'm having our IT guys follow up on that. On 12/14/18, 8:26 PM, "4D_Tech on behalf of Keisuke Miyako via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: quick Google results, so don't quote me on this https://support.microsoft.com/en-us/help/832017/service-overview-and-network-port-requirements-for-windows other pages (old, window server 2008-ish) says the number socket ports is 65535-49152=16383 but the range can be expanded with "netsh" e.g netsh int ipv4 set dynamicport tcp start=1025 num=64511 https://support.microsoft.com/en-gb/help/929851/the-default-dynamic-port-range-for-tcp-ip-has-changed-in-windows-vista see also https://serverfault.com/questions/648424/windows-server-2012-r2-runs-out-of-ephemeral-ports-though-it-shouldnt This feels like some kind of TCP overload to me. ** 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 ** ** 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 **
Windows Server Machine TCP Overload?
(Sorry: I haven’t been on the nug for quite a while: but in real need of some ideas at the moment) I’m having what I think is Machine TCP overload. Here’s the situation: >4D V16.4 64-bit >Windows, server 2012r6, 48GB Ram, 11 fast processors, Fast SSD disks I have machines that host numerous 4D Servers. Some of them have several batch-workstations (4D clients) also connected into their own host databases :processing tasks for the server Today I moved a couple large 4Dserver onto a machine with several 4D server instances (4 big instances total, and 6 small instances): I think I had about 10 4D Servers, and about 6 4D Clients running on the box: About 300 users connected to the box. Lots of Outside requests coming to the bacth-work-station clients. I run a 4D Diagnostic Log (database parameter 79) on all databases: At some point during the day, 3 big databases all get an error 10038 within about a minute of eachother: [4D Server.WI32] ERROR - [10038] An operation was attempted on something that is not a socket. … and things head south from there: one DB crashes, and two more need a forced-restart. When I turn OFF my batch workstations, and restart 2 databases: things pretty much recover. I think at the root of it ~may~ be some kind of TCP saturation/congestion. However: I’m told that Server 2012r2 has massive tcp through-put capabilities. This feels like some kind of TCP overload to me. The machine has plenty of resources to be able to handle the load: the task manager was only showing about 20% busy. Has anyone else every had issues like this? Thanks, -- Tony Ringsmuth Business Brothers Inc. 763-420-8686 ** 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 **
Re: SQL CASE statement?
Thanks! I had looked, but missed that. On 1/23/18, 9:57 AM, "4D_Tech on behalf of Jeffrey Kain via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: Yes. http://doc.4d.com/4Dv15/4D/15/case-expression.300-2288083.en.html -- Jeffrey Kain jeffrey.k...@gmail.com > On Jan 23, 2018, at 10:44 AM, Tony Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> wrote: > > I’ve been asked if 4D SQL supports CASE statements. ** 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 ** ** 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 **
SQL CASE statement?
I’ve been asked if 4D SQL supports CASE statements. I don’t see it in the docs: but does anyone know definitively? Thanks, -- Tony Ringsmuth Business Brothers Inc. 763-420-8686 ** 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 **
Re: 4D v16.2 false record locks
David, In my opinion, Stability has improved A LOT since the R-release program. I was able to put my OEM base of clients on 16.0 HF2. There are new features I really look forward to: in some ways – they’re getting fewer & farther between: just because 4D has advanced. I think the idea of asking 4D to make a whole version dedicated to just bug fixes: no new features is a poor idea. If you have a bug that you really want fixes: you need to work with Tech Support. If you don’t: then it’s just wishful thinking. Tony On 10/3/17, 2:46 PM, "4D_Tech on behalf of David Adams via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: ...but seriously, what I'd like to see 4D do is an *entire release* that consists of *nothing* but fixing bugs - as many as they can find, as many as we can find and longstanding annoyances. No fancy new features. Just cleaning up crashes, usability bugs (I see lingering 2004 or V11 usability bugs in the Design environment every single day in V16) and other weird stuff. From what I've ever heard, this is what the bulk of developers *actually* want. ** 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 **
Re: 4D v16 issues
Drew, I’m happy to report that my users are on 16.2, and things are going quite well. I have users to the tune of about 500,000 man-hour/month using instances of the database that I work-on. Only thing I would shy-away from is the new network layer: I’m dealing with a case right now where if you have larger numbers of users (20+): things get slow. Tony On 9/22/17, 2:14 PM, "4D_Tech on behalf of Drew Waddell via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: We are considering upgrading to 4D v16 fairly soon but have been a little spooked by two conversations recently, '4D v16.2 false record locks' and 'Server Process "Frozen"-ish'. Have these issues been reported to 4D? Has there been any resolution or workaround? Thanks, Drew Waddell Development Team Lead Orchard Software Corporation ** 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 ** ** 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 **
Re: What happens if 4D attempts to use a Web Service with an expired cert?
Hey Cannon, This is using 4D's WEB SERVICE CALL command, not an HTTP Get or HTTP Request. Tony On 8/17/17, 2:04 PM, "4D_Tech on behalf of Cannon Smith via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: Hi Tony, Do you mean with HTTP Get or HTTP Request? I ran into this a few weeks ago because my own cert hadn’t updated like I thought it did. It turns out that the HTTP Get/HTTP Request commands will simply hang. Forever. I probably should have filed a bug, but at the time I was _way_ more concerned about getting the cert working correctly. P.S. That reminds me, the HTTP Get/HTTP Request commands were being run inside a worker process (not preemptive). I found that when I killed the process, subsequent calls to the process would not relaunch it. I forgot to look into that further—just remembered it now. Has anyone else seen that? (v16.1, Mac, 64-bit for both issues.) -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 <can...@synergyfarmsolutions.com> > On Aug 17, 2017, at 12:50 PM, Tony Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> wrote: > > Scenario: 4D Server (or client) attempts to act as a web service client to a Web service that’s running with an expired cert. > > Will 4D proceed and connect? > Or, will it stop, with errors feedback of some kind? > ** 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 ** ** 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 **
Can 4D Objects create memory leaks?
>v16 Is it possible to create memory leaks using 4D Objects? If so, how? (I’m wanting to make sure that I’m NOT creating leaks) TIA, -- Tony Ringsmuth Business Brothers Inc. 763-420-8686 ** 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 **
Re: Function to return the date/time of the next scheduled backup
Hey Chuck. I parse, and read, and write the contents of Backup.xml file all the time. However, the calculation as to when the next backup should be is somewhat complex: may take a few hours to code: if you want to be right: Consider scenarios like: Every Tuesday and Friday at 10PM And cases like: if the backup is over-due, it should run now. Regards, Tony On 7/12/17, 4:13 PM, "4D_Tech on behalf of Charles Miller via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: I have not but it would appear that you would first open the xml get last backup date and time The get backup frequency and perform a calculation I do not think backup save next date in the xml Hope this helps chuck On Wed, Jul 12, 2017 at 4:42 PM, Tony Ringsmuth via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Does anyone have code that correctly calculates, from the > /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup? > > If so, could you please share it? > > > > Thanks! > > -- > > Tony Ringsmuth > > Business Brothers Inc. > > 763-420-8686 > > ** > 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 > ** -- - Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064 Informed Solutions, Inc. Brookline, MA 02446 USA Registered 4D Developer Providers of 4D, Sybase & SQL Sever connectivity http://www.informed-solutions.com - This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. ** 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 ** ** 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 **
Function to return the date/time of the next scheduled backup
Does anyone have code that correctly calculates, from the /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup? If so, could you please share it? Thanks! -- Tony Ringsmuth Business Brothers Inc. 763-420-8686 ** 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 **
Emails sent from 4DIC showing garbage in Mac Outlook
Since upgrading a 4D system from v15 to v16, some automated emails that I send out of that 4D system are showing garbage characters in Mac Outlook - after the first couple of lines. Like this: First line of Body Second line of Body Th`���٥��́ѥ���51���Mх} �ѕ|���ܴ�ش�""�����G�@��7E Anyone else seeing this? TIA, ** 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 **
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
Hey Keith >Sorry Tony, I also dislike the idea of IP variables being copied into new > preemptive processes. It seems pretty un-popular with the community. I’m at peace with that. My big beef (as stated before) is that excluding entire methods, based on any content, and any sub-content just makes this a terrible implementation in my view. Think of it like this: There are some commands that we cannot call during the redraw of a record listing: like ALERT. Why didn’t 4D make it such that a record listing cannot call any 4D method that contains the command ALERT? They didn’t. I have ALERT is some methods that are called from record listings: but it’s behind conditions that never invoke the ALERT if I’m in the context of a record listing. Regards, Tony On 11/4/16, 7:54 AM, "4D_Tech on behalf of Keith White" <4d_tech-boun...@lists.4d.com on behalf of kwh...@synergist.co.uk> wrote: Hi Given the current restrictions, we're currently not in a position to contemplate Preemptive. Of course we'll be working on our code to move towards it. But what I just don't get is why 4D thinks that putting compiler _errors_ in for this feature instead of just warnings, is a great idea. 4D has made the compiler check and error on a lot of things where it _can_ check, but why bother stopping you from compiling when the compiler can't check everything anyway? Runtime errors will be generated if offending code happens to execute. These runtime checks are already in place for cases like dereferencing pointers to IP variables, surely. Also consider EXECUTE METHOD (a thread safe command, apparently) - the compiler obviously can't check what code this command might execute. The main issue we'll face with attempting to get our code to be thread safe will be IP Arrays. Our IP arrays are static (in that they are populated on server startup) and without them performance would be very badly degraded. I'm encouraged by the discussion here of a new type of semi-static array concept that could be populated at startup - as long as:- 1. Static arrays could be accessed (but not updated) from cooperative processes 2. Static arrays could be updated at times other than startup during development when running in interpreted mode (and hence there are no pre-emptive processes) Sorry Tony, I also dislike the idea of IP variables being copied into new preemptive processes. Best regards Keith White Synergist Express Ltd, UK. ** 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 ** ** 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 **
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
David, Tony wrote: > Currently, 4D is trying to get around range-checking type overhead within Preemptive > processes by doing their checking at compile time. David Adams wrote: Where did you hear this? I didn't see any mention of this in the docs you mentioned and don't see how what the compiler scans for replaces runtime range checks. This is my assumption. > Also, runtime checks aren't particularly slow and either you or 4D needs to do them. Yes, I agree. Tony On Wed, Nov 2, 2016 at 11:27 AM, Tony Ringsmuth <ton...@bbsp.com> wrote: > OK: I can see that my idea of Interprocess variables getting a separate > instance in Preemptive processes is not popular with several of you. > > Consider then, a middle ground: > Currently, 4D is trying to get around range-checking type overhead within > Preemptive processes by doing their checking at compile time. Problem here > is that WHOLE METHODS are then restricted based on any restricted content, > or sub-content. THIS IS WHAT REALY IRKS ME. > > Here’s PROPOSAL #2: > Restrict only the code-lines that contain restricted items, including > inter-process variables, instead of entire methods. > > So, your method could not contain: > If($IsPreemptive) > $GetSomeValue:=vMyValue > ELSE > $GetSomeValue:=<>MyIpVar > END IF > > Internally, 4D compiler would have to put cod around that line, similar to > range checking; but, unlike Range checking; as long as your code never > hits that line (within a preemptive process), execution is never slowed > down. If you do hit that line, 4D generates an error, and does NOT run the > offending line. > > The code should really not be any slower, however, it may be somewhat > larger, when compiled. > > Tony > > > ** > 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 > ** > ** 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 ** ** 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 **
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
Neil > If it works for preemptive then it should work in all cases. Two cases means > double maintenance, and double testing Currently, I have a lot of places that get cached values out of IP variables that I load on startup. I want my cooperative process to be able to continue to take advantage of that speed. However, my Preemptive processes, instead, would have to query and load every time. My example was very simplistic: so think this: IF($IsPreemptive) Query([person];[Person]id=$PersonID) $TheName:=[Person]Name ELSE $Find_i:=find in array(<>aPerson_ID;$PersonID) $TheName:=<>aPerson_Name{$Find_i} END IF This way, I don’t have to kill the speed of my Cooperative processes to benefit my Preemptive processes. Tony On 11/1/16, 7:31 PM, "4D_Tech on behalf of Neil Dennis" <4d_tech-boun...@lists.4d.com on behalf of npden...@greatext.com> wrote: > If($IsPreemptive) > $GetSomeValue:=vMyValue > ELSE > $GetSomeValue:=<>MyIpVar > END IF So if you have to visit the code to make it work both ways why not just simply use $GetSomeValue:=vMyValue If it works for preemptive then it should work in all cases. Two cases means double maintenance, and double testing… I’m missing the advantage of the extra code. Neil -- Neil Dennis 4D Developer since 1990 GreaText - Designing Software for the Way You Work 716 East 1850 N North Ogden, UT 84414 mailto:npden...@greatext.com http://www.greatext.com/ ** 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 ** ** 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 **
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
OK: I can see that my idea of Interprocess variables getting a separate instance in Preemptive processes is not popular with several of you. Consider then, a middle ground: Currently, 4D is trying to get around range-checking type overhead within Preemptive processes by doing their checking at compile time. Problem here is that WHOLE METHODS are then restricted based on any restricted content, or sub-content. THIS IS WHAT REALY IRKS ME. Here’s PROPOSAL #2: Restrict only the code-lines that contain restricted items, including inter-process variables, instead of entire methods. So, your method could not contain: If($IsPreemptive) $GetSomeValue:=vMyValue ELSE $GetSomeValue:=<>MyIpVar END IF Internally, 4D compiler would have to put cod around that line, similar to range checking; but, unlike Range checking; as long as your code never hits that line (within a preemptive process), execution is never slowed down. If you do hit that line, 4D generates an error, and does NOT run the offending line. The code should really not be any slower, however, it may be somewhat larger, when compiled. Tony ** 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 **
Re: Survey on 4D¹s strategy for implementing Preemptive Processing / worker processes
Like Add said: > Now it is your chance to make changes in your Trigger methods and remove/replace any found thread-unsafe code. Here’s your chance to go and re-program ALL of your triggers. Tony On 11/1/16, 4:29 PM, "4D_Tech on behalf of Add Komoncharoensiri" <4d_tech-boun...@lists.4d.com on behalf of akomoncharoens...@4d.com> wrote: Hi Tim, Using a pointer is not a problem. 4D does not restrict you from using a pointer with the command that calls Trigger. Additional explanation can be found here: ftp://ftp-public.4d.fr/Documents/Products_Documentation/LastVersions/Line_1 5R5/VIntl/4D_Upgrade_v15_R5.pdf page 45. When the compiler sees the command such as SAVE RECORD, it knows that a trigger method will need to be checked for the thread safety. If you call SAVE RECORD([Table_1]), it knows that it needs to check in the Trigger method for [Table_1]. If you call SAVE RECORD($ptrOnTable->), the compiler does not know the exact table that you are calling. Therefore, it will check the Trigger method for all tables for the thread safety. If any of the trigger methods contain a thread-unsafe command, the compiler will report the problem. Now it is your chance to make changes in your Trigger methods and remove/replace any found thread-unsafe code. Hope this clear up some confusion. Regards, Add On 11/1/16, 2:15 PM, "4D_Tech on behalf of Tim Nevels" <4d_tech-boun...@lists.4d.com on behalf of timnev...@mac.com> wrote: >On Nov 1, 2016, at 3:35 PM, Tony Ringsmuth wrote: > >> CURRENT RESTRICTIONS to using preemptive processes (up through the >>upcoming release of v16): >> 1: Any method that uses any restricted items cannot be called >>preemptively. Restricted items include: >> A: Interprocess variables >> B: Plugins >> C: Various 4D commands >> D: Any component method that is not Preemptive save >> 2: No method that calls any other method that has restricted items can >>be called preemptively >> 3: Any method that saves records via pointers to a table is restricted >>(If you have any Table Trigger in the whole database that has any >>restricted items (as listed in #1 or #2)) >> Example: SAVE RECORD($MyTable->) >> >> QUESTION #1 >> In light of the current restrictions, how likely are you to >>leverage the use of Preemptive Processing in the near future? > >NOT LIKELY because of table pointer usage. I was not aware of this >restriction. Sounds like a serious limitation. I was not aware of pointer >restrictions. > >Can you reference documentation talking about this? I¹d like to read more >about the restrictions on using pointers in preemptive code. > >I have trigger code like ³StandardTriggerCode( >->[Table1]UpdatedByUserName ; Š )² Are you saying that will not be >allowed and thus the StandardTriggerCode method cannot run preemptively? > > >> ** 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 ** ** 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 **
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
Tim, Here’s the section where you can read up on SAVE RECORD and pointers: http://livedoc.4d.com/4D-Language-Reference-16/Processes/Preemptive-4D-processes.300-3036340.en.html Read the section under triggers. > Are you saying that will not be allowed and thus the StandardTriggerCode > method cannot run preemptively? Yes, If you have ANY trigger in the whole database that references ANY restricted item (IP vars, Plugins, Various 4D commands or any method that does), then correct: StandardTriggerCode cannot run preemptively. (pretty horrible; isn’t it) Tony On 11/1/16, 4:15 PM, "4D_Tech on behalf of Tim Nevels" <4d_tech-boun...@lists.4d.com on behalf of timnev...@mac.com> wrote: On Nov 1, 2016, at 3:35 PM, Tony Ringsmuth wrote: > CURRENT RESTRICTIONS to using preemptive processes (up through the upcoming release of v16): > 1: Any method that uses any restricted items cannot be called preemptively. Restricted items include: > A: Interprocess variables > B: Plugins > C: Various 4D commands > D: Any component method that is not Preemptive save > 2: No method that calls any other method that has restricted items can be called preemptively > 3: Any method that saves records via pointers to a table is restricted (If you have any Table Trigger in the whole database that has any restricted items (as listed in #1 or #2)) > Example: SAVE RECORD($MyTable->) > > QUESTION #1 > In light of the current restrictions, how likely are you to leverage the use of Preemptive Processing in the near future? NOT LIKELY because of table pointer usage. I was not aware of this restriction. Sounds like a serious limitation. I was not aware of pointer restrictions. Can you reference documentation talking about this? I’d like to read more about the restrictions on using pointers in preemptive code. I have trigger code like “StandardTriggerCode( ->[Table1]UpdatedByUserName ; … )” Are you saying that will not be allowed and thus the StandardTriggerCode method cannot run preemptively? > NOT LIKELY / SOMEWHAT LIKELY / VERY LIKELY > > YOUR COMMENTS: > > > IF your answer to #1 is “NO” , then consider this alternate implementation. > > TONY’S PROPOSED ALTERNATE STRATEGY: > 1: Each Preemptive worker process should have it’s own complete instantiation of IP Variables; similar to it’s set of Process variables. The scope and lifespan of those IP variables would be limited to that worker process, and that worker process only. It would be up to the developer to populate those IP variables, or do with them as he wishes. > As a ~possible~ option to this: perhaps we could have an option parameter to indicate to 4D to copy all IP variables from the current process to the new worker process > > 2: IP variables would then become a non-restricted item, and can be freely used in Preemptive processes. So your idea is the make IP variables behave differently in preemptive processes. They look and appear to be IP variables but in fact they are not. They are really process variables, but they have an IP variable name. I don’t like that at all. I think we need a better solution than this. This is really an ugly “hack” that will make reading 4D code difficult to understand. Is this an IP variable that only my worker process can change, or this is an IP variable that all other processes can also access and change. And since a method can run as “indifferent” meaning it can run as either either “normal” or as “preemptive” you would need to actually have 2 different versions of the method: compiled like now for “normal” execution and another copy compiled that does all this weird stuff to make IP variable still work. I don’t like this either. I can understand the strong desire to reuse existing code and make as few changes as possible to get it to run preemptively. You have existing code that is filled with IP variables. Now you want to make it run without rewriting it to not use IP variables. I have an idea. Have a compatibility setting to allow iP variables in preemptive processes. If you turn this on then 4D will do all kinds of low level magic when it compiles. If a method it is running preemptively it does all kinds of locking and semaphore stuff needed to access IP variables. It will slow down your preemptive code but at least you can still run with IP variables. Another big problem is deadlock conditions with multiple workers/processes trying to access and update the same IP variable. > 3: 4D should NOT prohibit the use of methods in Preemptive processes based on any content therein; however, at runtime, if a method actually executes a prohibited comm
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
Jody, Regarding #3: Pointers in SAVE RECORD… This ½ of my biggest frustration: The other half is that if a method contains any restricted item, then the whole method cannot be used. These are what kill it for me. This “All or nothing” of a method (and any sub-dependency) is the killer. It eliminates range-checking speed loss, but makes the re-coding effort really really bad. I would be OK if we simply could not execute any lines of code that reference an IP variable. But that, again, would require 4D to do more range-checking type stuff. So, my suggestion becomes: Just make a separate instance of IP Vars. Then we don’t lose any speed on runtime-checking, AND, we have FAR FAR less re-coding to do. Regards, Tony On 11/1/16, 3:34 PM, "4D_Tech on behalf of G-Mail" <4d_tech-boun...@lists.4d.com on behalf of jody.be...@gmail.com> wrote: Tony: > QUESTION #1 VERY LIKELY (We will) With the understanding of some frustration we would have, and understanding of what may be their reasons, we would use them because of the advantages of them being preemptive. The item I do not like is item #3. How can I code without pointers ;-) Thus far, I have not spent much time on how we will change our coding to handle multiple methods in a worker process accessing an object that we would normally give an interprocess scope. I know we could use process variables for the objects to achieve what we need. I just hate ‘polluting’ the rest of the processes with these process variables needed for the Worker process. At the same time, I understand their need to not have to deal with IP variables being accessed from other non-worker processes. We have not run into the need of a plugin for a worker process, but I could see where it could be nice to have. I do understand that at this point they may want to just not permit them as an easy solution at this time. I can see your point you make about writing a method If(Preemptive)…. Else Do This. It makes maintaining our code easier. Of course this is just where we are at with our code and clients. > On 11/01/2016, at 1:03 PM, Tony Ringsmuth <ton...@bbsp.com> wrote: > > Greetings > > I’m on a quest to persuade 4D to adopt a more useful implementation of preemptive processing than they are currently adopting. > Please answer questions #1 and #2 below if you can. > > CURRENT RESTRICTIONS to using preemptive processes (up through the upcoming release of v16): > 1: Any method that uses any restricted items cannot be called preemptively. Restricted items include: > A: Interprocess variables > B: Plugins > C: Various 4D commands > D: Any component method that is not Preemptive save > 2: No method that calls any other method that has restricted items can be called preemptively > 3: Any method that saves records via pointers to a table is restricted (If you have any Table Trigger in the whole database that has any restricted items (as listed in #1 or #2)) > Example: SAVE RECORD($MyTable->) > > QUESTION #1 > In light of the current restrictions, how likely are you to leverage the use of Preemptive Processing in the near future? > NOT LIKELY / SOMEWHAT LIKELY / VERY LIKELY > > YOUR COMMENTS: > > > IF your answer to #1 is “NO” , then consider this alternate implementation. > > TONY’S PROPOSED ALTERNATE STRATEGY: > 1: Each Preemptive worker process should have it’s own complete instantiation of IP Variables; similar to it’s set of Process variables. The scope and lifespan of those IP variables would be limited to that worker process, and that worker process only. It would be up to the developer to populate those IP variables, or do with them as he wishes. > As a ~possible~ option to this: perhaps we could have an option parameter to indicate to 4D to copy all IP variables from the current process to the new worker process > > 2: IP variables would then become a non-restricted item, and can be freely used in Preemptive processes. > > 3: 4D should NOT prohibit the use of methods in Preemptive processes based on any content therein; however, at runtime, if a method actually executes a prohibited command or pluggin: 4D would generate an error. > So, you could code like: > IF($InPreemptive_b) > `Do something safe for Preemptive > ELSE > `Use some command that is NOT Preemptive compliant > END IF > > QUESTION #2 > If this strategy was implemented, how likely would you be to leverage the use of Preemptive Processing in your applications? > > > I appreciate your fee
Re: Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
Dennis, You didn’t answer question #1. >Dennis said: Before getting too cavalier on requesting a change in the >implementation... make sure you understand why the restrictions are in place. Tony’s response: yes: I understand the reason for the restriction; and I agree, the speed loss for preemptive processes trying to share interprocess variables would be terrible. That’s why I’m suggesting that 4D just give every Preemptive Process it’s own set: that way, there’s NO SPEED LOSS. >Dennis said: 1 - Then why have inter process variables... just use process variables, to copy them would require semaphores thus cutting down the performance... I want workers to be faster not slower for my convenience. Tony’s response: In the current implementation, I can’t use an entire method, just because that method references one IP variable, or a sub-method, or a plugin. In my proposed method, I just code around (within my method) the lines of code that use IP variables or plugins. >... I want workers to be faster not slower for my convenience Tony’s response: I also want them faster. Creating an isolated instance of IP variables will not cost any speed whatsoever (except for the initial time to instantiate them: similar to the time to instantiate process vars). > Dennis said: 2 - What is the purpose of an interposes variable with > access to only one process... isn't that just a process variable? Tony’s response: Basically, yes: it becomes a process variable. But then we can choose HOW or whether to use it, and can write a simple condition around it; rather than having to create an entirely new code base, free of any dependency that contains an IP var. > Dennis said: 3 - I like the checks at compile time to keep > multi-threaded code faster. Great. So, in what ways have you leveraged it already? Regards, Tony On 11/1/16, 3:05 PM, "4D_Tech on behalf of Dennis, Neil" <4d_tech-boun...@lists.4d.com on behalf of neil.den...@umb.com> wrote: Before getting too cavalier on requesting a change in the implementation... make sure you understand why the restrictions are in place. In most places the implementation would be too slow to offset the benefit (e.g. putting semaphores around inter-process variables), in some cases to protect integrity (e.g. most plugins are not thread safe), lastly some cases are impossible for any application (e.g. UI) Anyway, to your survey... I would be much, much more likely to use them if they were quick and more efficient vs. slower and easier to implement. Tony's proposed strategy... 1 - Then why have inter process variables... just use process variables, to copy them would require semaphores thus cutting down the performance... I want workers to be faster not slower for my convenience. 2 - What is the purpose of an interposes variable with access to only one process... isn't that just a process variable? 3 - I like the checks at compile time to keep multi-threaded code faster. In short I do understand the restrictions and agree with them. I hope they don't ever sacrifice performance just to make things a bit easier to code. If I want easy I can just use a regular process, if I want quick and scalable I will put in a little more effort and use a worker. Neil --- Privacy Disclaimer: This message contains confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this email. Please delete this email from your system and notify the sender immediately by replying to this email. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. The Alternative Investments division of UMB Fund Services provides a full range of services to hedge funds, funds of funds and private equity funds. Any tax advice in this communication is not intended to be used, and cannot be used, by a client or any other person or entity for the purpose of (a) avoiding penalties that may be imposed on any taxpayer or (b) promoting, marketing, or recommending to another party any matter addressed herein. ** 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 ** ** 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:
Survey on 4D’s strategy for implementing Preemptive Processing / worker processes
Greetings I’m on a quest to persuade 4D to adopt a more useful implementation of preemptive processing than they are currently adopting. Please answer questions #1 and #2 below if you can. CURRENT RESTRICTIONS to using preemptive processes (up through the upcoming release of v16): 1: Any method that uses any restricted items cannot be called preemptively. Restricted items include: A: Interprocess variables B: Plugins C: Various 4D commands D: Any component method that is not Preemptive save 2: No method that calls any other method that has restricted items can be called preemptively 3: Any method that saves records via pointers to a table is restricted (If you have any Table Trigger in the whole database that has any restricted items (as listed in #1 or #2)) Example: SAVE RECORD($MyTable->) QUESTION #1 In light of the current restrictions, how likely are you to leverage the use of Preemptive Processing in the near future? NOT LIKELY / SOMEWHAT LIKELY / VERY LIKELY YOUR COMMENTS: IF your answer to #1 is “NO” , then consider this alternate implementation. TONY’S PROPOSED ALTERNATE STRATEGY: 1: Each Preemptive worker process should have it’s own complete instantiation of IP Variables; similar to it’s set of Process variables. The scope and lifespan of those IP variables would be limited to that worker process, and that worker process only. It would be up to the developer to populate those IP variables, or do with them as he wishes. As a ~possible~ option to this: perhaps we could have an option parameter to indicate to 4D to copy all IP variables from the current process to the new worker process 2: IP variables would then become a non-restricted item, and can be freely used in Preemptive processes. 3: 4D should NOT prohibit the use of methods in Preemptive processes based on any content therein; however, at runtime, if a method actually executes a prohibited command or pluggin: 4D would generate an error. So, you could code like: IF($InPreemptive_b) `Do something safe for Preemptive ELSE `Use some command that is NOT Preemptive compliant END IF QUESTION #2 If this strategy was implemented, how likely would you be to leverage the use of Preemptive Processing in your applications? I appreciate your feedback in this Thanks! Tony Ringsmuth ** 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 **
[Job opportunity]
This is NOT necessarily an Employment, but a good-sized project for a client I have an approximately 1000 hour task for a client that I need to farm out: building a custom inventory system for a non-profit. The pay will be somewhat on the low side, as this is a non-profit. If anyone’s interested in discussing, please contact me privately at (TonyRing bbsp.com) Thanks, -- Tony Ringsmuth Business Brothers Inc. 763-420-8686 ** 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 **