4D lets you take full advantage of multi-core computers with preemptive processes. In a previous blog post, we’ve provided you with a list of enhanced commands that can be used in preemptive processes, enabling faster global execution time and more connected users. And in response to your feedback, we increased the list with even more commands.
In code kitchens, I usually spend some time with the database settings, especially with the Compatibility settings. Often certain settings don’t follow best practices and during discussions with the application developer, I hear “oh, I never changed these” or “I’m not sure about the impact, so better not touch them”.
Since they could drastically impact the performance or behavior of your applications, we’ve begun a series of blog posts to discuss some of these “secret” settings.
A preemptive process is powerful as it allows your application to take full advantage of multi-core computers; consequently, its results in a faster global execution time and more connected users. A 4D process may be preemptive or not according to compilation options and the use of the language, as explained in this post.
In order to benefit from this mode as much as possible we are pleased to announce that more than twenty existing commands have been enhanced and can now be used inside preemptive processes.
Our own VP of Engineering, Laurent Esnault, explains exchanging information between multiple processes AND between processes and forms during his Break Out Session: Preemptive Multi-threading at 4D Summit 2016. Thanks to preemptive multi-threading, you can have more parallel processes, and thus add more and more users, for either desktop or web applications.
If you missed Laurent’s session at 4D Summit 2016, watch this 15-min video and enjoy some personal training by the master of preemptive multi-threading!
Laurent Esnault, VP of Engineering, explains the difference between cooperative and preemptive processes during his Break Out Session about Preemptive Multi-threading at 4D Summit 2016. Thanks to Preemptive Multi-threading, you can have more parallel processes, and thus add more and more users, either for desktop or for web applications.
If you missed Laurent’s session at 4D Summit 2016, watch this video and enjoy some personal training by the master of preemptive multi-threading!
Cache management is actually a key element of the database management, Laurent Ribardière presents at 4D Summit Portland 2016 the new cache manager he implemented in the 4D v16 64-bit version.
Before watching the technical presentation with details about the implementation, we recommend to start with these two blog posts, describing the feature benefit itself:
4D v16 introduced a new fully optimized cache manager for the 64-bit product line. 4D v16 R2 is giving power to our advanced 4D developers to take control by themselves!
The cache manager internal algorithm is based on a priority concept associated to each object type to store in the cache memory. By default, the cache manager algorithm assigns a higher priority value for an index than for records. And recently used objects (records or indexes) have a higher priority to remain in the cache than objects that have not been used in the last two days, etc…
The 4D v16 version has definitely been designed for better performance and scalability. In addition to major features like preemptive multi-threading, 4D v16 64-bit is embedding a brand new cache manager for a optimized handling of objects in cache memory avoiding any fragmentation issues.
The new cache manager improves the usage of very large cache for modern computers (with 64 or even 128 GB of Cache) allowing to take advantage of low RAM prices to have even large databases fully in memory. It also improves the situation of small cache size with very large data files, by decreasing the amount of unloading memory with increased support of priorities for data objects to be hold or released from cache.
Since 4D v11, the database server and SQL server both use preemptive multi-threading. Starting with 4D v13, the Web Server in Static mode also uses preemptive. Now with v15 R5, the 4D language can also be run in preemptive processes.
With 4D v16, you can improve your database scalability using the new 4D Write Pro commands in preemptive processes.
If you are doing routines for creating or converting documents programmatically – e.g. invoices … you can now do it with preemptive workers as most 4D Write Pro commands are now thread safe!
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy