Barracuda Embedded Web Server

The Barracuda Embedded Web Server (BWS) is a small embedded web server C library that comes pre-integrated with SharkSSL. The embedded web server engine is optimized for compact, deeply embedded devices.

Barracuda Embedded Web Server

Barracuda Embedded Web Server Features & Advantages

Optimized for Small, Deeply Embedded Devices

The Barracuda Embedded Web Server C library can be embedded in small, remote-monitoring and control-management devices, such as sensor network arrays. The Barracuda Embedded Web Server includes C Server Pages for development of small, dynamic web applications.

Compact and Secure

The Barracuda Embedded Web Server offers authentication for completely secure remote device management.

Proven, Stable Technology

The Barracuda Embedded Web Server has been ported and tested with many popular embedded operating systems, including INTEGRITY and µ-velOSity (Green Hills Software), VxWorks (Wind River), Azure RTOS, QNX (QNX Software Systems), Embedded Linux, Windows CE, embOS (SEGGER), SMX (Micro Digital), and MQX (Freescale). It can easily be ported to other operating systems as needed.

Full Support for Key Standards and Protocols

The Barracuda Embedded Web Server and its plug-ins support the following standards and RFCs:

RFC 1321RFC 1864
RFC 1867RFC 1928
RFC 1929RFC 2109
RFC 2246RFC 2396
RFC 2518RFC 2616
RFC 2617RFC 3076
RFC 3268RFC 3629
RFC 3986RFC 4346
RFC 4492RFC 4918

Developing Server-based Applications

Despite its name, the Barracuda Embedded Web Server can act as an embeddable application server that is specifically designed to function as a framework for running server-based applications.

Developing server-based applications using the Barracuda Embedded Web Server is typically done in C/C++ or by using C Server Pages. C Server Pages allows inserting C or C++ code into HTML template files using special tags. The technology is similar to other server-side technologies such as JSP, PHP, ASP, etc. The Barracuda Embedded Web Server software development kit (SDK) provides several host tools that compile and link CSP files. The tools function similarly to a compiler or cross-compiler and convert the C Server Pages files to either C or C++ code and to data files. A special linker combines all the data files into one file, which is then embedded in your application. The produced C/C++ code is compiled using your standard C/C++ (cross) compiler, and the code is then linked with your application.

The Barracuda Embedded Web Server has robust support for standard HTTP(S) protocols, including AJAX and REST. However, to cater to popular demand, a reference example for using WebSockets for real-time communication is available on GitHub (details below). If you require a more traditional web server example, please do not hesitate to contact Real Time Logic for assistance.

The Barracuda Embedded Web Server is ideal for devices that cannot use the Barracuda Application Server because of limited memory. The Barracuda Embedded Web Server is roughly 200Kbytes and requires roughly 60Kbytes of RAM. We recommend using the Barracuda Application Server and the integrated Lua Server Pages plug-in unless you are working with extremely limited memory. See C Server Pages for details.

GitHub Reference Example

The ready-to-run and RTOS-enabled reference example shows how to use the Barracuda Embedded Web Server’s WebSocket server. The Barracuda Embedded Web Server source code library is included in the Barracuda App Server's GitHub repository. See the source code download page for the GitHub link. Websockets are popular for embedded web servers because they provide two-way communication between the client (e.g., a web browser) and the server in real time. This allows for dynamic, interactive, and fast communication between the two, making it an ideal solution for embedded web servers. In comparison, traditional HTTP communication is one-way, meaning that the client can send a request to the server, but the server can only respond; it cannot initiate communication. This can be limiting in certain applications where real-time updates and interactive communication are required. Websockets provide a full-duplex communication channel, meaning that both the client and the server can send data to each other simultaneously, leading to a more interactive and responsive experience for the end user. This is why WebSockets are particularly well-suited for embedded web servers, where real-time updates and fast communication is often required.

Wait, before you download the C source code, consider this:

We are honored that you are considering the Barracuda Embedded Web Server. We've learned a thing or two with over two decades of experience in embedded systems and web server technology. While the Barracuda Embedded Web Server stands out among the many available C code options, we understand that designing web and IoT products in C/C++ is time-consuming and error-prone, often leading to mistakes and security issues.

Our customers who use the Barracuda App Server and Lua for web and networking tasks find their development process much smoother and get their products to market faster. You might wonder, "Do I really have to learn Lua?" Consider this: learning a new high-level language is straightforward, but mastering a new C/C++ framework/API can be a time-sink due to the complexities of C code and network programming. Dynamic web applications are not particularly compatible with a static language such as C. However, with Lua, the time you invest in learning pays off quickly as it significantly speeds up your development process with its much easier-to-use APIs and dynamic nature. Imagine being able to write cleaner, more maintainable code faster, reducing overall complexity and freeing up time to focus on what matters: creating innovative applications. Isn't that a good thing?

RTOS Application Server Example

If you have 15 minutes and have time to test the Barracuda App Server on an embedded device, try the ready-to-run ESP32 port, known as Xedge32. All you need is an inexpensive ESP32 development board, widely available online.

The following video shows how simple it is to install Xedge32, configure WiFi, and start writing device management apps using Lua. With the Xedge32 IDE, you can develop web applications, manage hardware, and easily connect to IoT cloud service providers. Xedge32 transforms your embedded monolithic device into a high-level operating system, allowing you to run multiple Lua applications simultaneously.