A New Server in 4D v20: WebSocket Server – Thomas Maul

Wednesday, May 10, 2023, 12:00 noon, CDT (UTC−5:00

Special Topic:
A New Server in 4D v20: WebSocket Server – Speed Up Your Web Clients – Thomas Maul

As it was recently announced, the next LTS release of 4D will offer a very powerful new feature… “4D v20 now includes a built-in WebSocket server, allowing developers to build real-time web applications that can handle large volumes of data and provide a seamless user experience.”

WebSocket is a computer communications protocol that provides full-duplex communication channels (bidirectional flow of data simultaneously) over a single TCP connection. Different from an HTTP server, which only responds to requests, a WebSocket server can not only answer but also push data to a client. Examples of where web WebSockets are used today that you might already be familiar with include chat applications and live dashboards that show current chart or device information, such as temperature of a machine or throughput in a factory.

WebSocket communication could be used alone as the only protocol, such as in IoT devices, but most often it is used together with a Web Server in a browser. The Web Server handles the HTML data and JavaScript code while the WebSocket Server updates the data, providing a faster and more interactive user experience.

Thomas Maul, the Director of Strategy for the 4D product line, will first show how WebSockets work compared to standard HTML pages with some simple minimal examples. Then Thomas will focus on a framework named WebSocket_GUI, which is a set of 4 classes allowing you to quickly create a web-based user interface to be run on devices such as phones and tablets. WebSocket_GUI is designed to control status (such as enable/disable automatic mail processing, show job status, etc) for a whole company and to be shared with several simultaneous users. All user views are updated in real time! The interface is designed for global status, not for user specific data such as addresses, customers, invoices.

The classes offered in WebSocket_GUI are a port of another repository that was originally designed to run on microprocessors used in IoT devices, such as Raspberry Pis. Thomas liked the concept, so he adapted it for 4D and will show it off as our 4DMethod demo!

To learn more about WebSockets see https://en.wikipedia.org/wiki/WebSocket.

This meeting is being hosted live with real-time discussion on Zoom.  Click here to join…

To follow along with the meeting slideshow, access it here when it is available…
Slides for May 10, 2023 meeting
Example Code

Have comments or questions after the meeting?  Either post them here or to discuss.4d.com.

If you cannot attend the live Zoom meeting, no worries!  A recording will be posted to the 4DMethod Youtube channel after the meeting ends.

View chat log from the meeting

This entry was posted in Meetings and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.