|Is there a "formal" design pattern to DataSnap?|
Usually let us feel about:
- Very slow!
But, I tried 50000 clients concurrent calling EchoString process into myself DataSnap Service.
All process is normal end. It's fine!
My REST DataSnap is strong!
So...Why always have "unstable" infomation appear in many website.
Oh! Because "HTTP persistent connection"!
About "HTTP persistent connection", In wiki is:
HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. The newer HTTP/2 protocol uses the same idea and takes it further to allow multiple concurrent requests/responses to be multiplexed over a single connection.
|Multiple connections V.S. Persistent connection|
Although "HTTP persistent connection" have advantages about "Reduced latency in subsequent requests (no handshaking)".
But, The advantages is "disadvantages": Connection count is little in REST DataSnap Service!
Because each client is hold in service, this is hard pressure!
If client lose connection from service when network unstable, and then affect memory usage continuously grows, final crash.
More than "HTTP persistent connection" same "More Energy consumption" in mobile device!
The App connection closed when into sleep mode from mobile device.
When re-open, we will get: wrong window.
|A error info is like it.|
we can used "Heartbeat packet mode" is fine solution.
Heartbeat packet mode:
Send a message from each sec to service, it like heartbeat behavior, so named it.
But it's energy consumption more!
DataSnap framework features is flexibility!
Have a "formal design" in DataSnap framework?
Any can solve problem are all great formal design!
When you think "DataSnap is bad", please think differently, what is Correct Design?
Maybe you will discover the new continent!
中文版本：實作 REST DataSnap，你用對方法了嗎？
|看似好棒棒的 DataSnap 框架，這裡頭的眉眉角角還真是不少。|
官方所給的 REST DataSnap DMEO，一直被詬病的有兩點：