cppcms-users Mailing List for CppCMS C++ Web Framework (Page 40)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
| 2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
| 2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
| 2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
| 2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
| 2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
| 2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
| 2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
| 2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
| 2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Marcel H. <ke...@co...> - 2014-02-21 08:46:27
|
On 21.02.2014 07:58, eric middelkoop wrote: > Hi Marcel, > > Yes I checked. Javascript is enabled in Firefox. Do you have any idea > what is going wrong here? Are you sure your application is running und reachable? Did you try the command I sent you? > wget localhost:8080/ticker -qO - | cat If that works the page should also work: http://localhost:8080/the_ticker.html if not. Try to update your cppcms version and after that I don't have any clue :D Greetings |
|
From: eric m. <mid...@gm...> - 2014-02-21 06:58:44
|
Hi Marcel, Yes I checked. Javascript is enabled in Firefox. Do you have any idea what is going wrong here? Greetings, Eric On Thu, Feb 20, 2014 at 11:29 PM, Marcel Hellwig <ke...@co...> wrote: > > ###4.7.3 > > should be good enough ;) > > > ###The other one that does compile but reacts like described underneath > > I got from here > > ### > https://svn.code.sf.net/p/cppcms/code/framework/trunk/contrib/server_side/sse/ > > that's the right one :) > > > ###Ok I understand this. But the page does contain the following: > > <p>Price:<span id="price"></span></p> so I had expect it to show > > something. If that's not doing it, how can I translate that stream into > > a field that is updated and displayed on every change? > Sorry, only used the stream itself. You're right. There is a frontend, > namely the the_ticker.html which reacts like it should. In my browser > (also firefox) the price is changing. Did you enabled javascript?! > > The thing you need is the javascript code in 'the_ticker.html' which > opens a stream and put its content into the span field. > > If you have any further questions, feel free to mail them. > > Greetings > Marcel > > -- Groetjes, Eric http://www.lightandmagicphotography.nl http://www.lightandmagicphotography.com |
|
From: Marcel H. <ke...@co...> - 2014-02-20 22:29:27
|
> ###4.7.3 should be good enough ;) > ###The other one that does compile but reacts like described underneath > I got from here > ###https://svn.code.sf.net/p/cppcms/code/framework/trunk/contrib/server_side/sse/ that's the right one :) > ###Ok I understand this. But the page does contain the following: > <p>Price:<span id="price"></span></p> so I had expect it to show > something. If that's not doing it, how can I translate that stream into > a field that is updated and displayed on every change? Sorry, only used the stream itself. You're right. There is a frontend, namely the the_ticker.html which reacts like it should. In my browser (also firefox) the price is changing. Did you enabled javascript?! The thing you need is the javascript code in 'the_ticker.html' which opens a stream and put its content into the span field. If you have any further questions, feel free to mail them. Greetings Marcel |
|
From: eric m. <mid...@gm...> - 2014-02-20 18:25:18
|
Hi Marcel, Thank you for your reaction. I have well over 25 years experience with programming in c, c++, c# and Ruby, but have virtually no experience with web-development. I do understand the concepts but am struggling to get a working comet-example to use. See my comments underneath at the ### marks. Hope you can help me out here. Kind regards, Eric On Thu, Feb 20, 2014 at 1:12 PM, Marcel Hellwig <ke...@co...> wrote: > > > On 20.02.2014 05:12, eric middelkoop wrote: > > Hello, > > > > I am looking for a way to update parts of a webpage via events from the > > server. > > > > I downloaded the Ticker example from the blog but as I try to compile it > > (os = Ubuntu) I'm getting the following errors: > which version of gcc do you using? > ###4.7.3 > g++ -std=c++0x -O2 -Wall -g ticker.cpp -o ticker -lcppcms -lbooster > > ticker.cpp: In member function 'void > > ticker::async_send(booster::shared_ptr<cppcms::http::context>)': > > ticker.cpp:83:39: error: capture of non-variable 'ticker::counter_' > > ticker.cpp:97:9: note: 'int ticker::counter_' declared here > fun fact: ticker.cpp has only 76 lines :) > Which version of the ticker are you using? The latest from svn trunk? > ###The first one that gives the compiler error I got from here: http://cppcms.com/files/ticker/ ###The other one that does compile but reacts like described underneath I got from here ### https://svn.code.sf.net/p/cppcms/code/framework/trunk/contrib/server_side/sse/ > > > I also downloaded the Sse Ticker example from contrib and that does > > compile but when I run it and access the page from firefox > > (127.0.0.1:8080/ticker <http://127.0.0.1:8080/ticker>), I get a 404 Not > > Found and a popup with the following information: > hmm. I think you mess up things. 404 really means nothing, but firefox > has a file which will be presented to you. > > > > ------------------------------------------------------- > > ticker > > which is: text/event-stream > > from: http://127.0.0.1:8080 > > > > What should firefox do with this file? > > - Open with Browse > > - Save File > > -------------------------------------------------------- > > > > It doesn't display the tickers on the webpage. > Yep, that's right, but that's what the ticker does. It does not have a > page to display, but emits events the whole time to a stream. To view > the content you can use this: > > > wget localhost:8080/ticker -qO - | cat > ###Ok I understand this. But the page does contain the following: <p>Price:<span id="price"></span></p> so I had expect it to show something. If that's not doing it, how can I translate that stream into a field that is updated and displayed on every change? > > > > > I have a camera that is shooting photographs and want a webpage to > > reflect what the camera is doing. So every time it shoots a photograph > > the webserver should send the filename and sequencenumber of that > > photograph to the webpage and the user must be able to inform the camera > > to stop taking pictures via pressing a button. > You need a webpage that does some magic javascript and a backend. That > shouldn't be that hard. > > So HTTP requests to > > control the camera and asynchronous status-updates to be displayed on > > the webpage. > > > > I hope someone can help me out by either getting one of the ticker > > examples working or providing another working example. > > As I said. Everything works in the way that it should be. Maybe the chat > example is more for you :) > > > > Many thanks! > > > > Eric > > > > > Greetings > Marcel > > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Groetjes, Eric http://www.lightandmagicphotography.nl http://www.lightandmagicphotography.com |
|
From: Marcel H. <ke...@co...> - 2014-02-20 12:12:15
|
On 20.02.2014 05:12, eric middelkoop wrote: > Hello, > > I am looking for a way to update parts of a webpage via events from the > server. > > I downloaded the Ticker example from the blog but as I try to compile it > (os = Ubuntu) I'm getting the following errors: which version of gcc do you using? > g++ -std=c++0x -O2 -Wall -g ticker.cpp -o ticker -lcppcms -lbooster > ticker.cpp: In member function ‘void > ticker::async_send(booster::shared_ptr<cppcms::http::context>)’: > ticker.cpp:83:39: error: capture of non-variable ‘ticker::counter_’ > ticker.cpp:97:9: note: ‘int ticker::counter_’ declared here fun fact: ticker.cpp has only 76 lines :) Which version of the ticker are you using? The latest from svn trunk? > > I also downloaded the Sse Ticker example from contrib and that does > compile but when I run it and access the page from firefox > (127.0.0.1:8080/ticker <http://127.0.0.1:8080/ticker>), I get a 404 Not > Found and a popup with the following information: hmm. I think you mess up things. 404 really means nothing, but firefox has a file which will be presented to you. > > ------------------------------------------------------- > ticker > which is: text/event-stream > from: http://127.0.0.1:8080 > > What should firefox do with this file? > - Open with Browse > - Save File > -------------------------------------------------------- > > It doesn't display the tickers on the webpage. Yep, that's right, but that's what the ticker does. It does not have a page to display, but emits events the whole time to a stream. To view the content you can use this: > wget localhost:8080/ticker -qO - | cat > > I have a camera that is shooting photographs and want a webpage to > reflect what the camera is doing. So every time it shoots a photograph > the webserver should send the filename and sequencenumber of that > photograph to the webpage and the user must be able to inform the camera > to stop taking pictures via pressing a button. You need a webpage that does some magic javascript and a backend. That shouldn't be that hard. > So HTTP requests to > control the camera and asynchronous status-updates to be displayed on > the webpage. > > I hope someone can help me out by either getting one of the ticker > examples working or providing another working example. As I said. Everything works in the way that it should be. Maybe the chat example is more for you :) > > Many thanks! > > Eric > > Greetings Marcel |
|
From: eric m. <mid...@gm...> - 2014-02-20 04:12:29
|
Hello, I am looking for a way to update parts of a webpage via events from the server. I downloaded the Ticker example from the blog but as I try to compile it (os = Ubuntu) I'm getting the following errors: g++ -std=c++0x -O2 -Wall -g ticker.cpp -o ticker -lcppcms -lbooster ticker.cpp: In member function 'void ticker::async_send(booster::shared_ptr<cppcms::http::context>)': ticker.cpp:83:39: error: capture of non-variable 'ticker::counter_' ticker.cpp:97:9: note: 'int ticker::counter_' declared here I also downloaded the Sse Ticker example from contrib and that does compile but when I run it and access the page from firefox (127.0.0.1:8080/ticker), I get a 404 Not Found and a popup with the following information: ------------------------------------------------------- ticker which is: text/event-stream from: http://127.0.0.1:8080 What should firefox do with this file? - Open with Browse - Save File -------------------------------------------------------- It doesn't display the tickers on the webpage. I have a camera that is shooting photographs and want a webpage to reflect what the camera is doing. So every time it shoots a photograph the webserver should send the filename and sequencenumber of that photograph to the webpage and the user must be able to inform the camera to stop taking pictures via pressing a button. So HTTP requests to control the camera and asynchronous status-updates to be displayed on the webpage. I hope someone can help me out by either getting one of the ticker examples working or providing another working example. Many thanks! Eric <http://www.lightandmagicphotography.com> |
|
From: Jean-Frédéric G. <jfg...@gm...> - 2014-02-13 16:27:35
|
Thanks a lot for creating CppCms, it is a wonderful framework. I made a simple project, with a synchronous application pool (like hello_world), and I was hoping I could create a DB connection inside each application object and keep it cached for reusing. Now, I am using the configuration service.applications_pool_size to set my pool size, but it seems this configuration is only for the number the maximum number of app object to cache, it does not limit the maximum number of objects created at any time. For instance, I have set the service.applications_pool_size to 24, and if I run a load test and increase the number of concurrent requests, I am able to go over 24 app objects. In fact I don't really see a limit easily, it would go over 200 app objects living at any time (in my case this translates to 200 DB connections), as long as I am hitting the service with over 200 concurrent requests. Even if I play with the worker_thread config it does not seem to limit in any way the max number of app objects. Once I stop my load test, I will see the number of app objects/db connections go back to the service.applications_pool_size I have configured. Is there any way to really limit the app pool size so that it will only go up to a maximum setting configured? Under heavy load, once this limit is reached, it should queue the requests and dispatch them at the next available application object. Also, I am using nginx with my cppcms app configured as fastcgi. I tried to see if I could limit the concurrent requests in nginx to queue them but could not find how or if this is possible. Overall, I find that being able to control the maximum number of app objects is important, in order to properly manage the memory and CPU resources used under heavy load. Also, please let me know if I'm missing something, I am just starting with cppcms but I find great potential. Thanks, Jeff |
|
From: Kostya S. <ksa...@gm...> - 2014-02-04 12:08:37
|
Thanks a lot for response. I've updated gcc and now the issue is fixed. 2014-02-04 Artyom Beilis <art...@ya...>: > Hi, > > It is really strange > > Can you give the FULL output of the build? > Also there are ready to go deb packages for ubuntu > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > -------------------------------------------- > On Tue, 2/4/14, Kostya Samarin <ksa...@gm...> wrote: > > Subject: [Cppcms-users] Build error "Building CXX object > CMakeFiles/tc_skin.dir/tc_skin.cpp.o" > To: cpp...@li... > Date: Tuesday, February 4, 2014, 12:41 PM > > Hello. > > Could somebody help me with this: > I'm trying to build cppcmc 1.0.4 > according to build instructions I do > "cmake .." result is success > > "make" output is following > .... > [ 65%] Built target session_interface_test > [ 66%] Built target skin3 > [ 66%] Built target status_test > [ 67%] Built target storage_test > [ 67%] Building CXX object > CMakeFiles/tc_skin.dir/tc_skin.cpp.o > > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl: In member function > 'virtual void > tc_skin::foreach_tmpl::auto_test()': > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:9: error: > 'automatic_type_identification_is_not_supported_by_this_compiler' > was not declared in this scope > > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:51: error: > expected ';' before 'x_ptr' > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:119: error: > 'x_ptr' was not declared in this scope > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:126: error: > 'x_ptr_end' was not declared in this scope > > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:28: error: > 'x' was not declared in this scope > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:9: error: > 'automatic_type_identification_is_not_supported_by_this_compiler' > was not declared in this scope > > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:52: error: > expected ';' before 'x_ptr' > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:122: error: > 'x_ptr' was not declared in this scope > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:129: error: > 'x_ptr_end' was not declared in this scope > > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:28: error: > 'x' was not declared in this scope > make[2]: *** [CMakeFiles/tc_skin.dir/tc_skin.cpp.o] Error 1 > make[1]: *** [CMakeFiles/tc_skin.dir/all] Error 2 > make: *** [all] Error 2 > > > gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) > > Do I miss something? > > -- > > Thanks, Kostya. > > > -----Inline Attachment Follows----- > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common > Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > -----Inline Attachment Follows----- > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Thanks, Kostya. |
|
From: Kostya S. <ksa...@gm...> - 2014-02-04 12:04:52
|
Thanks a lot. The issue is fixed/ 2014-02-04 Marcel Hellwig <ke...@co...>: > > /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:9: error: > > 'automatic_type_identification_is_not_supported_by_this_compiler' was > > not declared in this scopeorge.net > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > your compiler does not support decltype or similar. > > > gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) > > you should update your gcc version!!! > > > > > > > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Thanks, Kostya. |
|
From: Artyom B. <art...@ya...> - 2014-02-04 11:58:57
|
Hi, It is really strange Can you give the FULL output of the build? Also there are ready to go deb packages for ubuntu Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Tue, 2/4/14, Kostya Samarin <ksa...@gm...> wrote: Subject: [Cppcms-users] Build error "Building CXX object CMakeFiles/tc_skin.dir/tc_skin.cpp.o" To: cpp...@li... Date: Tuesday, February 4, 2014, 12:41 PM Hello. Could somebody help me with this: I'm trying to build cppcmc 1.0.4 according to build instructions I do "cmake .." result is success "make" output is following .... [ 65%] Built target session_interface_test [ 66%] Built target skin3 [ 66%] Built target status_test [ 67%] Built target storage_test [ 67%] Building CXX object CMakeFiles/tc_skin.dir/tc_skin.cpp.o /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl: In member function ‘virtual void tc_skin::foreach_tmpl::auto_test()’: /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:9: error: ‘automatic_type_identification_is_not_supported_by_this_compiler’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:51: error: expected ‘;’ before ‘x_ptr’ /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:119: error: ‘x_ptr’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:126: error: ‘x_ptr_end’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:28: error: ‘x’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:9: error: ‘automatic_type_identification_is_not_supported_by_this_compiler’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:52: error: expected ‘;’ before ‘x_ptr’ /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:122: error: ‘x_ptr’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:129: error: ‘x_ptr_end’ was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:28: error: ‘x’ was not declared in this scope make[2]: *** [CMakeFiles/tc_skin.dir/tc_skin.cpp.o] Error 1 make[1]: *** [CMakeFiles/tc_skin.dir/all] Error 2 make: *** [all] Error 2 gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Do I miss something? -- Thanks, Kostya. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Marcel H. <ke...@co...> - 2014-02-04 11:02:32
|
> /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:9: error: > ‘automatic_type_identification_is_not_supported_by_this_compiler’ was > not declared in this scopeorge.net > https://lists.sourceforge.net/lists/listinfo/cppcms-users > your compiler does not support decltype or similar. > gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) you should update your gcc version!!! |
|
From: Kostya S. <ksa...@gm...> - 2014-02-04 10:41:57
|
Hello. Could somebody help me with this: I'm trying to build cppcmc 1.0.4 according to build instructions I do "cmake .." result is success "make" output is following .... [ 65%] Built target session_interface_test [ 66%] Built target skin3 [ 66%] Built target status_test [ 67%] Built target storage_test [ 67%] Building CXX object CMakeFiles/tc_skin.dir/tc_skin.cpp.o /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl: In member function 'virtual void tc_skin::foreach_tmpl::auto_test()': /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:9: error: 'automatic_type_identification_is_not_supported_by_this_compiler' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:51: error: expected ';' before 'x_ptr' /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:119: error: 'x_ptr' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:126: error: 'x_ptr_end' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:34:28: error: 'x' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:9: error: 'automatic_type_identification_is_not_supported_by_this_compiler' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:52: error: expected ';' before 'x_ptr' /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:122: error: 'x_ptr' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:129: error: 'x_ptr_end' was not declared in this scope /home/ks/cppcms-1.0.4/tests/tc_skin.tmpl:35:28: error: 'x' was not declared in this scope make[2]: *** [CMakeFiles/tc_skin.dir/tc_skin.cpp.o] Error 1 make[1]: *** [CMakeFiles/tc_skin.dir/all] Error 2 make: *** [all] Error 2 gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Do I miss something? -- Thanks, Kostya. |
|
From: Ross R. <ros...@gm...> - 2014-01-29 21:01:15
|
I'd like to bolt on libopenssl to the front of cppcms. Can anyone give me pointers on where in the cppcms code base I should install this shim? - Ross |
|
From: Christian G. <chr...@gm...> - 2014-01-14 07:55:03
|
Hi Artyom, 2014/1/10 Artyom Beilis <art...@ya...>: > Active... > That is nice to hear. > Yes, you don't see commits but it does not mean by any means that the project is > stalled. > > However most of my work is concentrated currently on the CppCMS > based project for a customer - some very complex CppCMS based system > with absolutely outstanding loads running in production already for quite a significant > period of time. I'm planning to publish some info about it in the blog. > I think that this is a quite good idea to write something about real-life projects using CppCMS. Also it communicates that there is something going on with CppCMS and that the project is still alive. > What happens that most of my effort is concentrated on actually "Using" CppCMS > for a _paying_ customer - which obviously has higher priorities. > I totally understand this... somehow it must be possible to pay the bills :) > Now I need to get back to beta version of CppCMS 1.2.0 soon - can't tell exactly > how much time but I'm going to spend some of my time on the progress of > the system. > > I really want to get multiple event loops support to 1.2.0 before the release. > That is fine, but I think the most common problem in the open source world is put too many new (badly tested) features into a release. It is always a bad practice to post-prone a new release because feature X is still on the TODO and feature Y is only done 80%. Release early, release often! > Hopefully it answers the question. > Yes it does... thanks a lot! greets -- Christian Gmeiner, MSc |
|
From: Artyom B. <art...@ya...> - 2014-01-10 21:27:57
|
Active... Yes, you don't see commits but it does not mean by any means that the project is stalled. However most of my work is concentrated currently on the CppCMS based project for a customer - some very complex CppCMS based system with absolutely outstanding loads running in production already for quite a significant period of time. I'm planning to publish some info about it in the blog. What happens that most of my effort is concentrated on actually "Using" CppCMS for a _paying_ customer - which obviously has higher priorities. Now I need to get back to beta version of CppCMS 1.2.0 soon - can't tell exactly how much time but I'm going to spend some of my time on the progress of the system. I really want to get multiple event loops support to 1.2.0 before the release. Hopefully it answers the question. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Fri, 1/10/14, Christian Gmeiner <chr...@gm...> wrote: Subject: [Cppcms-users] Whats the current state of development To: cpp...@li... Date: Friday, January 10, 2014, 3:27 PM Hi all... it looks like it got quite silent around the development of cppcms. Are there any news, release plans etc? greets -- Christian Gmeiner, MSc ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Christian G. <chr...@gm...> - 2014-01-10 13:28:23
|
Hi all... it looks like it got quite silent around the development of cppcms. Are there any news, release plans etc? greets -- Christian Gmeiner, MSc |
|
From: Ross R. <ros...@gm...> - 2014-01-04 00:55:51
|
I'm going through the documentation on this page: http://cppcms.com/wikipp/en/page/cppcms_1x Can I suggest that next topic and previous topic links be added to the documentation like you see in the bottom right on this library's documentation? http://cpp-netlib.org/0.10.1/whats_new.html If next/prev were added, it would make it much easier to go through all the documentation. - Ross |
|
From: CN <cn...@fa...> - 2013-12-20 09:45:15
|
Here are the shell file and cppcms configuration file that can work with
the testing program.
Regards,
CN
----------------------------
#!/bin/sh
if [ -f /tmp/strange.pid ]
then
kill `cat /tmp/strange.pid`
fi
rm -rf /tmp/strange.pid /tmp/strange.sock
./a.out -c config.js
chmod go+w /tmp/strange.sock
----------------------------
{
"service" : {
"api" : "fastcgi",
"socket" : "/tmp/strange.sock"
},
"daemon":{
"enable":true,
//"enable":false,
"lock":"/tmp/strange.pid"
},
"logging" : {
"level" : "debug",
"stderr" : false,
"file" : {
"name" : "/tmp/strange.log",
"append" : true
}
}
}
--
http://www.fastmail.fm - A fast, anti-spam email service.
|
|
From: CN <cn...@fa...> - 2013-12-20 09:26:08
|
The compilable code can also be found at http://pastie.org/8565179 Please switch "daemon" on and off in config.js and run tests: "daemon":{ "enable":true, //"enable":false, } and comment/uncomment the following to sets of statements to see different results: set (1): booster::intrusive_ptr<async_app> async_app_=new async_app(s); s.applications_pool().mount(async_app_,cppcms::mount_point("^/async_app/(.+)",1)); set (2): s.applications_pool().mount(new async_app(s),cppcms::mount_point("^/async_app/(.+)",1)); Regards, CN -- http://www.fastmail.fm - IMAP accessible web-mail |
|
From: CN <cn...@fa...> - 2013-12-20 09:02:06
|
I seem to be hitting the problem as pointed out here: http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them The strange effects happen to asynchronous application and the program is configured to be daemonized. config.js: "daemon":{ "enable":true } According to log, threads launched by asynchronous applications seem to simply disappear when the program is being daemonized. Further, the following two sets of code yield different behaviors. You may comment out either one and run this program to see the different log: Code set (a) cppcms::service s(argc,argv); booster::intrusive_ptr<async_app> async_app_=new async_app(s); s.applications_pool().mount(async_app_,cppcms::mount_point("^/async_app/(.+)",1)); s.run(); Code set (b) cppcms::service s(argc,argv); s.applications_pool().mount(new async_app(s),cppcms::mount_point("^/async_app/(.+)",1)); s.run(); Note: I use boost::thread instead of booster::thread (which does not support interrupt()), and call boost::thread::interrupt(); boost::thread_pointer::join(); in destructor in order to ensure all threads gracefully exit after the program is killed with signal SIGTERM. Comments will be appreciated! Regards, CN //============================== #include <iostream> #include <cstring> #include <cppcms/service.h> #include <cppcms/applications_pool.h> #include <cppcms/mount_point.h> #include <cppcms/rpc_json.h> #include <boost/thread/thread.hpp> #include <booster/log.h> #include <signal.h> //sigaction, signal() //------------------------------ static bool got_signal=false; void signal_handler(int signal_number) { std::cerr << "signal caught. signal number=" << signal_number << std::endl; got_signal=true; } //------------------------------ class class_poll { public: ~class_poll(){ BOOSTER_DEBUG("class_poll destructor"); } void poll(){ //boost::this_thread::disable_interruption di; while(true){ BOOSTER_DEBUG("before sleep"); try{ //See comments in main()! boost::this_thread::sleep(boost::posix_time::seconds(3)); //inturruption point //sleep(3); } catch(boost::thread_interrupted const& ){ BOOSTER_DEBUG("boost::thread_interrupted is caught"); break; } BOOSTER_DEBUG("after sleep"); } } }; //------------------------------ class async_app : public cppcms::rpc::json_rpc_server { private: boost::shared_ptr<boost::thread> poll_thread_pointer; public: async_app(cppcms::service &s) : cppcms::rpc::json_rpc_server(s){ boost::shared_ptr<class_poll> p(new class_poll()); poll_thread_pointer.reset(new boost::thread(boost::bind(&class_poll::poll,p))); } ~async_app(){ BOOSTER_DEBUG("async_app destructor"); try{ poll_thread_pointer->interrupt(); poll_thread_pointer->join(); } catch(...){} } }; //------------------------------ int main(int argc,char ** argv) { struct sigaction actions; memset(&actions,0,sizeof(actions)); sigemptyset(&actions.sa_mask); actions.sa_flags=0; actions.sa_handler=signal_handler; int sig_result; if((sig_result=sigaction(SIGINT,&actions,NULL)) != 0){ std::cerr << "sigaction(SIGINT) failed: " << sig_result << std::endl; std::terminate(); } if((sig_result=sigaction(SIGTERM,&actions,NULL)) != 0){ std::cerr << "sigaction(SIGTERM) failed: " << sig_result << std::endl; std::terminate(); } if((sig_result=sigaction(SIGHUP,&actions,NULL)) != 0){ std::cerr << "sigaction(SIGHUP) failed: " << sig_result << std::endl; std::terminate(); } try{ cppcms::service s(argc,argv); //(1)The following two statements work with both C sleep() and boost::this_thread::sleep() running in another thread if NOT daemonized. //(2)The following two statements does NOT work with C sleep() or boost::this_thread::sleep() running in another thread if daemonized. booster::intrusive_ptr<async_app> async_app_=new async_app(s); s.applications_pool().mount(async_app_,cppcms::mount_point("^/async_app/(.+)",1)); //(3)Next statement works with C sleep() running in another thread irrespective of being daemonized or not. //(4)Next statement does NOT work with boost::thread::sleep() regardless of being daemonized or not. //s.applications_pool().mount(new async_app(s),cppcms::mount_point("^/async_app/(.+)",1)); s.run(); //Next statement never gets executed when killed! Why? std::cerr <<"after cppcms::service::run()"; } catch(std::exception const &e) { std::cerr<<e.what()<<std::endl; } return 0; } //============================== -- http://www.fastmail.fm - Accessible with your email software or over the web |
|
From: Lee E. <le...@el...> - 2013-12-10 19:35:16
|
you can use pointers if you typedef them in a header file before. with regard to most std::* types, they usually manage their memory internally and are not a peoblem passing by value, string behaves like that. בתאריך 10 בדצמ 2013 04:18, מאת "augustin" <aug...@ov...>: > Hello, > > cppcms_tmpl_cc does not allow us to use pointers within templates: the > template regex does not validate. > > For example, if I use something like this: > > <%= content.getPerson(r.id)->usFirst %> > > I get the compile error: > Error: Syntax error in command Inline Variable ... > > Is it considered good practice to load all strings into the > cppcms::base_content struct and not to rely on pointers to object that are > stored permanently into memory (stored in memory over many http requests > thanks to fast_cgi)? > As far as I can tell, it's the only practice available. > > thanks, > > augustin. > > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: CN <cn...@fa...> - 2013-12-10 07:02:15
|
This program mounts both synchronous and asynchronous applications. Both
applications use cppdb::session. If the asynchronous application's
constructor includes connection pool (@pool_size=10) in cppdb::session
constructor's parameter, this program silently terminates immediately
after browser sends requests.
The deepest spot of the source I can trace trying to locate the problem
is exec() at line 465 in ~/booster/lib/aio/src/io_service.cpp:
try {
exec();
}
catch(...) {
data_mutex_.lock();
throw;
}
I guess exec() must have thrown an uncaught exception and leads to
program termination.
What I have no clue is why singleton cppdb::session can make the system
unstable. If "@pool_size=10" is not included in cppdb::session's
constructor parameter, then the program seems to run properly.
This weird behavior happens only to asynchronous applications.
Any enlightenment will be much appreciated!
---This file should be able to compile and run:---
#include <cppcms/service.h>
#include <cppcms/rpc_json.h>
#include <cppdb/frontend.h>
#include <cppcms/applications_pool.h>
#include <cppcms/mount_point.h>
#include <cppcms/url_dispatcher.h>
#include <cppcms/url_mapper.h>
#include <cppcms/http_context.h>
#include <cppcms/session_interface.h>
#include <cppcms/service.h>
#include <cppcms/http_request.h>
#include <cppcms/http_response.h>
#include <fstream>
class sync : public cppcms::application
{
public:
sync(cppcms::service &s) : cppcms::application(s){
cppdb::session
sess("postgresql:@pool_size=10;dbname=mydb;user=myname;password=mypassword");
sess << "SET TIME ZONE 'UTC'" << cppdb::exec;
dispatcher().assign(".*",&sync::show,this);
}
private:
void show(){
std::ifstream myfile("/tmp/t.html");
if(myfile.is_open()){
std::string line;
while(std::getline(myfile,line))
response().out() << line;
myfile.close();
}
}
};
class as : public cppcms::rpc::json_rpc_server
{
public:
as(cppcms::service &s) : cppcms::rpc::json_rpc_server(s){
//Next statement causes the program to terminate
silently immediately after reqested:
cppdb::session
sess("postgresql:@pool_size=10;dbname=mydb;user=myname;password=mypassword");
//Next statement does not cause problem:
//cppdb::session
sess("postgresql:dbname=mydb;user=myname;password=mypassword");
}
};
int main(int argc,char ** argv)
{
cppcms::service s(argc,argv);
s.applications_pool().mount(cppcms::applications_factory<sync>(),cppcms::mount_point("^/(?!as)(.*)",1));
s.applications_pool().mount(new
as(s),cppcms::mount_point("^/as/(.+)",1));
s.run();
return 0;
}
---file "/tmp/t.html":---
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Title</title>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<script type="text/javascript" src="json2.js"></script>
<script type="text/javascript" src="jsonrpc.js"></script>
<script type="text/javascript">
rpc=new JsonRPC('/as',['any'],[]);
rpc.any.on_result=function(r){ alert('ok'); }
rpc.any.on_error=function(e){ alert('oops'); }
</script>
</head>
<body>
my test.
</body>
</html>
---end of files---
Regards,
CN
--
http://www.fastmail.fm - The professional email service
|
|
From: sergey l. <ccp...@gm...> - 2013-12-10 03:24:29
|
Hello friends! There are some references about locale in stream in documentation. http://cppcms.com/cppcms_ref/latest/classcppcms_1_1application.html#a3a1342b4834c8cdb79c2619dff010319 Render a template template_name of a skin skin using content content to an output stream out. Note: You are responsible to imbue suitable locale to the stream. On Tue, Dec 10, 2013 at 5:54 AM, augustin <aug...@ov...>wrote: > On Monday, December 09, 2013 02:24:42 PM Artyom Beilis wrote: > > The problem with this clode > > > > std::ostringstream buf; > > app()->render(std::string("my_skin"), std::string("book_page"), buf, c); > > cp->rContent = buf.str(); > > > > is that buf does not have a locale object associated with it. > > > > You need to add following line > > > > buf.imbue(app()->context().locale()); > > > > i.e. > > > > std::ostringstream buf; > > buf.imbue(app()->context().locale()); > > app()->render(std::string("my_skin"), std::string("book_page"), buf, c); > > cp->rContent = buf.str(); > > > > The response().out() - the default output already has a locale embedded > in > > it. when you create a generic std::ostream you need to imbue application > > specific locale (even if it is default system locale) to make various > > localization related tools to work. > > That's it! > Thanks a lot. > > Do you think it would be useful for me to add something about this in the > wiki? > If you wish, I can create a page in an appropriate place to document such > newbie gotchas. > > > augustin. > > > > > . > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: augustin <aug...@ov...> - 2013-12-10 02:17:55
|
Hello, cppcms_tmpl_cc does not allow us to use pointers within templates: the template regex does not validate. For example, if I use something like this: <%= content.getPerson(r.id)->usFirst %> I get the compile error: Error: Syntax error in command Inline Variable ... Is it considered good practice to load all strings into the cppcms::base_content struct and not to rely on pointers to object that are stored permanently into memory (stored in memory over many http requests thanks to fast_cgi)? As far as I can tell, it's the only practice available. thanks, augustin. |
|
From: CN <cn...@fa...> - 2013-12-10 02:14:42
|
Hmm... Below simple example shows that statements following run() never
get executed once the program is killed:
#include <iostream>
#include <cstring>
#include <cppcms/service.h>
#include <cppcms/thread_pool.h>
int main(int argc,char ** argv)
{
cppcms::thread_pool pool(3);
//pool.post(...); //Launch long running threads.
cppcms::service s(argc,argv);
s.run();
//Program counter never reaches here.
std::cerr<<"after run()"<<std::endl;
pool.stop(); //Wait until all threads complete.
return 0;
}
Can incorrect configuration content in config.js cause programs to
malfunction?
Best regards,
CN
On Tue, Dec 10, 2013, at 12:08 AM, Artyom Beilis wrote:
> By default, when the SIGTERM is sent to the application, the
> cppcms::run() exits and you can perform any cleanup you need.
>
> No need to do anything special.
>
> The situation described in wiki is for reloading (i.e. restarting the
> service rather than exiting the full program)
>
> Artyom Beilis
--
http://www.fastmail.fm - Access all of your messages and folders
wherever you are
|