|
|
Home » Developing U++ » U++ Developers corner » Web framework....
|
|
Re: Web framework.... [message #34506 is a reply to message #34497] |
Sat, 26 November 2011 12:22 |
|
mirek wrote on Fri, 25 November 2011 21:37 | - preferred multithreaded apps (single process, many threads to serve connections) - advantage is to store some common cached data; alternative is preforked processes
|
May I ask you why you prefer MT over preforked processes? At work we use custom preforked server with shared memory. It proved very stable, since a problem (fatal error, lock-up etc.) in single child doesn't take down entire server. Also it is possible to limit each child to certain number of requests or set it some time of life, after which it is killed. This can be helpful in case of leaking apps (we don't use U++, so leaks happen from time to time ).
Of course I see that MT makes other things simple. So maybe having both options available is the right way to go...
Best regards,
Honza
|
|
|
Re: Web framework.... [message #34508 is a reply to message #34506] |
Sat, 26 November 2011 14:24 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
dolik.rce wrote on Sat, 26 November 2011 06:22 |
mirek wrote on Fri, 25 November 2011 21:37 | - preferred multithreaded apps (single process, many threads to serve connections) - advantage is to store some common cached data; alternative is preforked processes
|
May I ask you why you prefer MT over preforked processes? At work we use custom preforked server with shared memory.
|
I am well aware about prefork advantages and in fact, we do the same.
However, right now I have some doubts about using shared memory for common data.
E.g. it looks like we are going to have 'jit' compiled html templates into 'functional nodes' (as shown in another thread). I am afraid that it might be a bit hard to use shared memory for caching this. Basically, I believe that single heap makes these things much simpler.
Quote: |
Of course I see that MT makes other things simple. So maybe having both options available is the right way to go...
|
Sure, for web app developer, this will not matter too much. It will be possible to switch to MT or to preforked with ease, but with preforked, things will be duplicated in memory.
Mirek
|
|
|
|
|
|
Re: Web framework.... [message #34748 is a reply to message #34497] |
Fri, 09 December 2011 16:49 |
lectus
Messages: 329 Registered: September 2006 Location: Brazil
|
Senior Member |
|
|
Here's a good idea:
* HTML 5 GUI designer in the layout editor.
* Use U++ classes to handle the back end.
* Connect both through HTML 5 WebSocket and U++ Sockets.
Basically the framework should make it easy to connect these sockets and this should not be visible to the programmer (wrapped in classes).
So, we can implement MVC for the web:
Model: U++ handling Sqlite, MSSQL, Oracle, MySql,etc
View: HTML5 UI designer on the IDE.
Controller: C++ code using U++ NTL and all classes.
Example of HTML 5 WebSocket:
socket= new WebSocket('ws://www.example.com:8000/somesocket');
socket.onopen= function() {
socket.send('hello');
};
socket.onmessage= function(s) {
alert('got reply '+s);
};
This way U++ can run on servers while HTML UI front ends will be available for Desktops, Notebooks, Netbooks, Tablets and Smartphones.
[Updated on: Fri, 09 December 2011 16:53] Report message to a moderator
|
|
|
Re: Web framework.... [message #34749 is a reply to message #34748] |
Fri, 09 December 2011 17:04 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
lectus wrote on Fri, 09 December 2011 10:49 | Here's a good idea:
* HTML 5 GUI designer in the layout editor.
* Use U++ classes to handle the back end.
* Connect both through HTML 5 WebSocket and U++ Sockets.
Basically the framework should make it easy to connect these sockets and this should not be visible to the programmer (wrapped in classes).
So, we can implement MVC for the web:
Model: U++ handling Sqlite, MSSQL, Oracle, MySql,etc
View: HTML5 UI designer on the IDE.
Controller: C++ code using U++ NTL and all classes.
Example of HTML 5 WebSocket:
socket= new WebSocket('ws://www.example.com:8000/somesocket');
socket.onopen= function() {
socket.send('hello');
};
socket.onmessage= function(s) {
alert('got reply '+s);
};
This way U++ can run on servers while HTML UI front ends will be available for Desktops, Notebooks, Netbooks, Tablets and Smartphones.
|
Like Wt?
Well, that is planned like one possible high-level paradigm. However, the core functionality will be much more down to the earth.
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 00:20:41 CET 2024
Total time taken to generate the page: 0.01505 seconds
|
|
|