Home » Community » PR, media coverage, articles and documentation » Book idea: U++ Web development (Idea for a new book releasing end 2026 of building ultrafast web servers in U++)
Book idea: U++ Web development [message #61938] |
Sun, 08 March 2026 11:35  |
frederik.dumarey
Messages: 37 Registered: December 2021 Location: Belgium
|
Member |
|
|
| Interested ?[ 5 votes ] |
| 1. |
Yes for sure! |
5 / 100% |
| 2. |
Yes, why not ? |
0 / 0% |
| 3. |
No, not interested |
0 / 0% |
| 4. |
No, why should you do that ? |
0 / 0% |
Hello,
I have an idea to write a new book about using U++ as a webserver (a native ultrafast one ). I want to address all the possibilities of existing frameworks like ASP.NET, js.node, PHP, ... but then using U++, and compiled to one executable; bypassing all those heavy frameworks who are most of the time also interpreted.
What would be the scope of the book in terms of web technologies:
- static HTML, CSS, JS
- RestAPI
- WebSockets
- Ajax
- Cookies
- Sessions
- Database connectivity
- Authentication, RBAC
- Security: Rate limiters, CSRF, logging, password hashing, XSS protection, SQL injection, Input validation, ...
In terms of U++ libraries I would like to mention two fully worked out options:
- one using the Skylark library (mono threaded, easy)
- one using the Core libraries for a multithreaded design
In terms of distribution of the webserver:
- single executable execution on a classic OS
- containerized version using dockerfile & compose
- multiple instances of an executable behind a nginx load balancer
If there is enough interest, I would love to start writing
Since I'm not a fulltime C++ developer, I will need some help in my trajectory using the forum or discord channel
Curious about your reactions,
PS: I really believe in U++ being a great framework to build superfast native web servers, and not that more difficult to use than the "easy" ones like ASPX, node.js, PHP, ...
Have a nice day,
Frederik.
Regards,
Frederik Dumarey
Belgium
|
|
|
|
| Re: Book idea: U++ Web development [message #61992 is a reply to message #61938] |
Sun, 17 May 2026 15:45   |
frederik.dumarey
Messages: 37 Registered: December 2021 Location: Belgium
|
Member |
|
|
Hey all,
Just a small update: I started writing a new book titled "High performance Web Servers in modern C++ using the U++ Framework".
This time I want to aim at people interested in C++ web servers, and show them the powerful U++ Framework. It will be easier to find on Amazon, and better to find more people that will become interested in the U++ Framework đ.
Some progress indicators: at this moment I have written 89 pages, and I hope the book to be ready by the end of the year.
I will start asking some help from now on by you guys...
Until next time!
Frederik.
Regards,
Frederik Dumarey
Belgium
|
|
|
|
|
|
| Re: Book idea: U++ Web development [message #61994 is a reply to message #61938] |
Mon, 18 May 2026 17:13   |
BetoValle
Messages: 210 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi,
I definitely think such a book would fill an important gap in the U++ ecosystem, especially for developers building real production web applications.
One suggestion from my own experience running a Skylark SaaS in production on a Debian VPS for the last years: please dedicate strong attention to multithreading, object lifetime, RAII and thread-safe database access patterns.
Coming from Delphi and Java, one of the hardest parts for me was understanding how shared SQL sessions and global objects behave in a native multithreaded environment. After redesigning my database handling to be request/thread-local and ensuring proper destruction scope, the server became dramatically more stable.
I would strongly suggest a dedicated production-oriented chapter focused on REAL-WORLD PROBLEMS that developers actually face after deployment, for example:
* Common production mistakes
* Why native web servers crash
* Threading pitfalls
* Shared state problems
* Global object misuse
* Database session lifetime
* Request isolation
* Race conditions
* Debugging random crashes
* Memory ownership and destruction timing
This kind of knowledge is extremely valuable because many crashes are not caused by the framework itself, but by subtle concurrency and lifetime mistakes that are very difficult for newcomers to diagnose.
Most modern web frameworks hide these details, but native C++ web development exposes them directly, and understanding them is essential for building stable long-running servers.
I also think chapters about:
* production deployment
* watchdogs / health checks
* nginx reverse proxy
* logging
* scaling strategies
* containerization
would be extremely valuable.
Another very interesting perspective could be:
"From Delphi/Java/PHP to U++ web development"
because many developers interested in U++ are not necessarily traditional C++ experts.
I truly believe U++/Skylark deserves more visibility as a lightweight native web platform.
Thanks!
|
|
|
|
| Re: Book idea: U++ Web development [message #61995 is a reply to message #61994] |
Mon, 18 May 2026 17:18   |
BetoValle
Messages: 210 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
A practical real-world example that could be extremely valuable in the book is explaining why shared/global SQL session objects can become dangerous in multithreaded native web servers.
In my own Skylark production experience, I initially treated the database session almost like a global/shared resource:
```cpp
struct ConDB {
MySqlSession session;
};
struct dbAss {
ConDB db;
};
String dbAss::consultaDuplicados(String cpo, Value vini)
{
Sql sql(db.session);
sql.Execute(st);
}
```
Under concurrent web requests, this eventually caused instability and random crashes after days or weeks of uptime.
What finally solved the problem was redesigning the architecture so each request creates its own local database context and the object destruction becomes deterministic and thread-safe:
```cpp
if (v["oper"].ToString().IsEqual("checaCodigoDuplicado"))
{
dbAss db;
return db.baseCads(v, &dbAss::checaCodigoDuplicado);
} // db destructor executed here
```
This became a major stability improvement because:
* each request/thread gets its own isolated DB state
* no shared SQL session exists between concurrent requests
* destruction timing becomes predictable (RAII)
* resource cleanup becomes automatic
* thread interference is dramatically reduced
After this redesign, combined with a watchdog strategy, the server stopped crashing and has now been running stably for many months.
I think examples like this are incredibly valuable for developers coming from Java, PHP or Delphi backgrounds, where frameworks often hide object lifetime and threading complexity.
In native C++ web development, understanding:
* ownership
* lifetime
* stack scope
* RAII
* thread isolation
* shared state dangers
is essential for production stability.
|
|
|
|
| Re: Book idea: U++ Web development [message #61996 is a reply to message #61995] |
Mon, 18 May 2026 17:26   |
BetoValle
Messages: 210 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
VocĂȘ pode colocar isso de forma muito inteligente e tĂ©cnica, sem transformar em âguerra de frameworksâ. O ponto forte aqui nĂŁo Ă© simplesmente throughput bruto â porque os payloads parecem diferentes (`Avg Bytes` muito diferente) â mas sim:
* estabilidade;
* zero errors;
* latĂȘncia menor;
* consistĂȘncia;
* servidor nativo;
* baixo consumo;
* simplicidade de deploy.
E principalmente:
* depois da correção thread-safe, o Skylark suportou carga sustentada sem falhas.
Isso Ă© o mais importante.
I also performed some comparative stress testing using JMeter remotely against the same VPS environment.
Java/Tomcat test:
* 300 threads
* 2 minutes duration
Results:
```text id="tb8j8z"
Samples: 216,749
Average: 155 ms
Min: 8 ms
Max: 31,605 ms
Std Dev: 423.60
Errors: 0.781%
Throughput: 1790 req/sec
```
U++ / Skylark native server test:
* 300 threads
* 5 minutes duration
Results:
```text id="pkm30h"
Samples: 222,208
Average: 132 ms
Min: 6 ms
Max: 7,318 ms
Std Dev: 359.62
Errors: 0.000%
Throughput: 736 req/sec
```
Of course, these numbers should not be interpreted as a simplistic "framework A vs framework B" comparison, because payload size and implementation details were different.
However, some very important practical observations became clear:
* Skylark maintained lower average latency
* maximum latency spikes were dramatically lower
* zero errors occurred during the test
* the native executable remained stable for a long sustained period
* memory/resource consumption stayed very small
* deployment complexity was minimal compared to a traditional Java stack
The most important point for me was not peak throughput itself, but production stability after redesigning the application to avoid shared/global SQL session state.
After implementing request-local database handling and deterministic object destruction (RAII), the native server became extremely reliable.
I think practical benchmark discussions like this would add enormous value to the book, especially when combined with explanations about:
* threading models
* shared state
* request isolation
* object lifetime
* production architecture decisions
because these are the areas where native web servers behave very differently from managed runtimes like Java or .NET.
|
|
|
|
|
|
Goto Forum:
Current Time: Thu May 21 21:40:12 GMT+2 2026
Total time taken to generate the page: 0.00671 seconds
|