4D Blog

Home Product Use ORDA to boost performance in Client/Server mode

Use ORDA to boost performance in Client/Server mode

June 5, 2019

Product

Using ORDA to access large tables (especially those with relations) in Client/Server mode has been greatly enhanced. With 4D v17 R5, you’ll see 2-3xs improved LAN performance and up to 30xs faster WAN performance. And best of all – there’s no need to change anything in your code, it’s all automatic. Interesting, isn’t it? Well, let’s delve into the details.

Typically when loading a record in a client application, all of the record’s fields are transferred from the server. Even ones that you don’t need. Therefore performance depends on your application design, your database structure, and the network capabilities … especially when using large tables with multiple or large fields. For example on a slow WAN, using just a few fields in selection-based list boxes (of tables with dozens of fields having many relations/fields and large text/pictures), your application will soon be out of service.

ORDA requests previously used the same field loading principle … until now! With v17 R5, the server analyzes the attributes you need in each dataclass and identifies the related attributes so that only the requested data is transferred between the server and the client.

CASE STUDY

To illustrate these improvements, let’s use a simple database:

The Book table has 1,000 records. Its summary field contains anywhere from 100 to 2,000 characters and its thumbnail field contains around 10KB images. In the related Author table, the biography field contains 10,000 characters in each record.

Using this database, we created two selection-based list boxes: one using an ORDA entity selection and the other using a classic selection. In each list box, we’ve chosen to display the book’s title with its author in order to activate relations. We’ve also added an action to automatically scroll the list box so no human action can disturb the results: 

The measurements in the table below show the TCP frames that were transmitted between the server and the client (including all acknowledgment response) of the example in the video. The client’s network connection is Wi-Fi type “802.11ac” (250Mbps download, 100Mbps upload , with 1ms delay):

Mode Frames Overall size (bytes) Duration (ms)
Classic 4,070 473,924 5,747
ORDA 46 6,744 692

As you can see, using ORDA means only a few frames are transferred! And duration? The slower the network, the bigger the difference between ORDA and the classic approach.

A new concept: OPTIMIZATION context

This allows you to record what the system has learned, then reuse it later. To do this, you just need to create an option object containing a “context” attribute and then specify the desired value before setting the object as parameter:

If (Form.currentContext=Null)
    Form.currentContext:=New object("context";"contextListboxBookAndAuthor")
End if
Form.books:=ds.Book.all(Form.currentContext)

This option object can now be used with the Create entity selection command and the following member methods: dataClass.query(), entitySelection.query(), dataClass.fromCollection(), and dataClass.all().

N.B: In the measurements table, we haven’t activated the context feature to be as accurate as possible.

To conclude:

ORDA simplifies your developments:

  • It speeds up the transfer of information – with no code changes.
  • You don’t need to move large fields from a table and store them in a 1-1 related table to prevent impacts on Client/Server mode.
  • When you want to access the server outside the LAN, you can now connect the client directly … without using remote desktop technologies.

 

Discuss

Tags Client/Server, Listbox, ORDA, Programming, v17 R5, v18

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

Avatar
Damien Fuzeau
- Product Owner - Damien Fuzeau joined the 4D Product team in February 2019. As a Product Owner, he is responsible for writing user stories and translating them into functional specifications. His role also involves ensuring that the delivered feature implementations meet customer needs. Damien holds a degree in Software Engineering from the University of Nantes. He spent over 23 years at his previous company, first as a developer (discovering 4D in 1997), and later as Engineering Manager and Software Architect. The company was an OEM partner of 4D and deployed enterprise software based on 4D for thousands of users across hundreds of servers. Damien is therefore well-versed in 4D development and deployment in multilingual environments.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

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