cppcms-users Mailing List for CppCMS C++ Web Framework (Page 90)
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
|
From: william l. <we...@gm...> - 2012-04-19 02:54:23
|
Hi Klaus, According to roadmap, it is planned to address in 1.3.0 or later :) http://cppcms.com/wikipp/en/page/cppcms_1x_tasks#Improve.Support.of.RESTful.services Artyom can correct me if I'm wrong. thanks, William L. On Wed, Apr 18, 2012 at 10:58 PM, Klaus Wenger <kjw...@ya...> wrote: > thank you guys for the useful thread! > > are there any plans on providing a rest_ws scaffold somewhat similar to > rpc_json? any quick example to show the best practice? > > stay cool! > > k > > On 04/17/2012 07:28 AM, william lee wrote: > > Thanks Artyom, it is clear to me now. > > > > Best Regards, > > William L. > > > > On Tue, Apr 17, 2012 at 6:14 PM, Artyom Beilis > > <art...@ya... > > <mailto:art...@ya...>> wrote: > > > > >Hi, > > > > >If I want to use CppCMS framework provide web services like SOAP > > or RESTFul etc, > > >Shall I need to use cppcms::http::request::raw_post_data() and > > parse the XML by myself? > > > > > > > Yes, raw_post_data() created exactly for this purpose and for example > > JSON-RPC API uses it. > > > > > > > > > > > > >CppCMS has built-in support for JSON-RPC, and any recommendation > > for handle other web services? :) > > > > > > > JSON-RPC is provided as most lightweight and efficient services, > > that can be easily integrated with client (both Browser and > > other client that generates JSON-RPC requests) > > > > > > (Note that JSON is much more lightweight format then XML...) > > > > If you want to create other services you may want to use your > favorite > > > > XML library (tinyxml, libxml2 etc) and you may generate responses > > as XML using both CppCMS templates language or generate XML using > > your favorite XML library. > > > > Also note that for RESTFul services the url-dispatching/mapping > services > > fit very well as it allows to handle proper hierarchy easily. > > > > Artyom > > > > > ------------------------------------------------------------------------------ > > Better than sec? Nothing is better than sec when it comes to > > monitoring Big Data applications. Try Boundary one-second > > resolution app monitoring today. Free. > > http://p.sf.net/sfu/Boundary-dev2dev > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > <mailto:Cpp...@li...> > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > > > ------------------------------------------------------------------------------ > > Better than sec? Nothing is better than sec when it comes to > > monitoring Big Data applications. Try Boundary one-second > > resolution app monitoring today. Free. > > http://p.sf.net/sfu/Boundary-dev2dev > > > > > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ele...@ex...> - 2012-04-19 02:07:05
|
Hi, I was wondering if there's a facility to parse a string into date_time. Strings such as YYYY-MM-DD or YY-MM-DD or YYYY-DD-MM or DD/MM/YYYY and so on Thanks! Petr |
From: Klaus W. <kjw...@ya...> - 2012-04-18 15:05:16
|
thank you guys for the useful thread! are there any plans on providing a rest_ws scaffold somewhat similar to rpc_json? any quick example to show the best practice? stay cool! k On 04/17/2012 07:28 AM, william lee wrote: > Thanks Artyom, it is clear to me now. > > Best Regards, > William L. > > On Tue, Apr 17, 2012 at 6:14 PM, Artyom Beilis > <art...@ya... > <mailto:art...@ya...>> wrote: > > >Hi, > > >If I want to use CppCMS framework provide web services like SOAP > or RESTFul etc, > >Shall I need to use cppcms::http::request::raw_post_data() and > parse the XML by myself? > > > > Yes, raw_post_data() created exactly for this purpose and for example > JSON-RPC API uses it. > > > > > > > >CppCMS has built-in support for JSON-RPC, and any recommendation > for handle other web services? :) > > > > JSON-RPC is provided as most lightweight and efficient services, > that can be easily integrated with client (both Browser and > other client that generates JSON-RPC requests) > > > (Note that JSON is much more lightweight format then XML...) > > If you want to create other services you may want to use your favorite > > XML library (tinyxml, libxml2 etc) and you may generate responses > as XML using both CppCMS templates language or generate XML using > your favorite XML library. > > Also note that for RESTFul services the url-dispatching/mapping services > fit very well as it allows to handle proper hierarchy easily. > > Artyom > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > <mailto:Cpp...@li...> > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > |
From: william l. <we...@gm...> - 2012-04-17 11:28:17
|
Thanks Artyom, it is clear to me now. Best Regards, William L. On Tue, Apr 17, 2012 at 6:14 PM, Artyom Beilis <art...@ya...> wrote: > >Hi, > > >If I want to use CppCMS framework provide web services like SOAP or > RESTFul etc, > >Shall I need to use cppcms::http::request::raw_post_data() and parse the > XML by myself? > > > > Yes, raw_post_data() created exactly for this purpose and for example > JSON-RPC API uses it. > > > > > > > >CppCMS has built-in support for JSON-RPC, and any recommendation for > handle other web services? :) > > > > JSON-RPC is provided as most lightweight and efficient services, > that can be easily integrated with client (both Browser and > other client that generates JSON-RPC requests) > > > (Note that JSON is much more lightweight format then XML...) > > If you want to create other services you may want to use your favorite > > XML library (tinyxml, libxml2 etc) and you may generate responses > as XML using both CppCMS templates language or generate XML using > your favorite XML library. > > Also note that for RESTFul services the url-dispatching/mapping services > fit very well as it allows to handle proper hierarchy easily. > > Artyom > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-04-17 10:14:24
|
>Hi, >If I want to use CppCMS framework provide web services like SOAP or RESTFul etc, >Shall I need to use cppcms::http::request::raw_post_data() and parse the XML by myself? > Yes, raw_post_data() created exactly for this purpose and for example JSON-RPC API uses it. > > >CppCMS has built-in support for JSON-RPC, and any recommendation for handle other web services? :) > JSON-RPC is provided as most lightweight and efficient services, that can be easily integrated with client (both Browser and other client that generates JSON-RPC requests) (Note that JSON is much more lightweight format then XML...) If you want to create other services you may want to use your favorite XML library (tinyxml, libxml2 etc) and you may generate responses as XML using both CppCMS templates language or generate XML using your favorite XML library. Also note that for RESTFul services the url-dispatching/mapping services fit very well as it allows to handle proper hierarchy easily. Artyom |
From: william l. <we...@gm...> - 2012-04-17 10:01:09
|
Hi, If I want to use CppCMS framework provide web services like SOAP or RESTFul etc, Shall I need to use cppcms::http::request::raw_post_data() and parse the XML by myself? CppCMS has built-in support for JSON-RPC, and any recommendation for handle other web services? :) Thanks! William L. |
From: doug l. <bi...@gm...> - 2012-04-12 14:06:20
|
That's excellent, thanks again, very much. On 12 April 2012 13:27, <ele...@ex...> wrote: > No, you must set it your self. So when you have range(5,10), you set your > error_message to something like "Minimum 5, Maximum 10". If you want to > automate it, you have to write it your self. That should be pretty easy > though > > > Ah, brilliant, cheers! > > So are those ever set automagically by constraints set on widgets (like > > range()), or does the developer set those? > > & thanks very much for your help. > > > > On 12 April 2012 12:32, <ele...@ex...> wrote: > > > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-04-12 13:31:58
|
----- Original Message ----- > From: Julian Pietron <ju...@wh...> >> What version of CppCMS do you use? I assume latest. > > To be honest, I think that this problem occurred in 0.99.6. I didn't > test any later versions yet. Are there changes that impact file I/O in > later releases? I'm not sure if there were but many things had changed since. > > My idea just was, that sometime during upload the write to the NAND > stalls and the corresponding write call blocks so long, that a timeout > or such is hit inside the libcppcms. The file upload process happens withing the event loop, libcppcms does not have any timeouts on FastCGI connections as it assumes that the web server handles all needed (there are timeouts on HTTP but this is not the case). > Another probability would be, that > something in the communication between cherokee and libcppcms fails. > How does transferring requests from cherokee to libcppcms work exactly? When a chunk of data received by libcppcms from FastCGI connection it is parsed and written to the file. > Think of an incoming HTTP POST request with a huge file appended. > Cherokee sends this request to libcppcms, and it would start to store > the file to the designated temporary location. What does happen, if > writing to NAND is very slow? It should just slow down the process. There are no particular timers on this. > Would libcppcms still accept bytes of the > request from cherokee or would it fetch new bytes only if the already > received bytes have been written to NAND Yes, the files are written directly (no AIO or stuff like that is used. >(the consequence could be, that > the network buffer queue inside of the kernel grows until cherokee has > to wait with writing because no new packages can be sent, and this might > hit a timeout there or lead to a buffer exhaustion that makes cherokee > close the connection)? It may be that the cherokee does it. >If libcppcms instead buffers internally if more > bytes are incoming than can be written to NAND, are there any size > limits to these buffers? > The biggest FastCGI chunk of data is 64KB, and it is the maximal buffer size that would be used (of course at the beginning libcppcms tries to put as much as it can in memory and afterwards it writes to file) The limits are defined there: http://cppcms.com/wikipp/en/page/cppcms_1x_config#security.file_in_memory_limit > Best regards, > Julian I'd recommend you to use strace tool to see what exactly fails and check the logs. It allows you to see system calls. If not, try to look into the line: file_->write_data().write(boundary_.c_str(),position_); in private/multipart_parser.h File to see if anything goes wrong here. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: <ele...@ex...> - 2012-04-12 12:27:28
|
No, you must set it your self. So when you have range(5,10), you set your error_message to something like "Minimum 5, Maximum 10". If you want to automate it, you have to write it your self. That should be pretty easy though > Ah, brilliant, cheers! > So are those ever set automagically by constraints set on widgets (like > range()), or does the developer set those? > & thanks very much for your help. > > On 12 April 2012 12:32, <ele...@ex...> wrote: > |
From: doug l. <bi...@gm...> - 2012-04-12 11:56:40
|
Ah, brilliant, cheers! So are those ever set automagically by constraints set on widgets (like range()), or does the developer set those? & thanks very much for your help. On 12 April 2012 12:32, <ele...@ex...> wrote: > Checkout > > > http://cppcms.com/cppcms_ref/latest/classcppcms_1_1widgets_1_1base__widget.html#af18b8ac8a1bf73da6818a3d5449e5987 > > > Hi -- I was just wondering if there's a mechanism for reporting detailed > > form validation failure reasons back to the user? > > I've been digging around in the tutorials and API docs & haven't found > > one. > > The tutorial on forms shows how to set up validation on a form, but that > > form just redisplays if the validation fails. > > In RoR, validation also adds errors to a collection whenever a validation > > constraint fails. > > Is there something like this in cppcms, or is this something the > framework > > user should implement themself? > > If so, is there a recommended way of reporting validation errors back to > > the user? > > Thanks, > > Doug. > > > ------------------------------------------------------------------------------ > > Better than sec? Nothing is better than sec when it comes to > > monitoring Big Data applications. Try Boundary one-second > > resolution app monitoring today. Free. > > > http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ele...@ex...> - 2012-04-12 11:32:12
|
Checkout http://cppcms.com/cppcms_ref/latest/classcppcms_1_1widgets_1_1base__widget.html#af18b8ac8a1bf73da6818a3d5449e5987 > Hi -- I was just wondering if there's a mechanism for reporting detailed > form validation failure reasons back to the user? > I've been digging around in the tutorials and API docs & haven't found > one. > The tutorial on forms shows how to set up validation on a form, but that > form just redisplays if the validation fails. > In RoR, validation also adds errors to a collection whenever a validation > constraint fails. > Is there something like this in cppcms, or is this something the framework > user should implement themself? > If so, is there a recommended way of reporting validation errors back to > the user? > Thanks, > Doug. > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: doug l. <bi...@gm...> - 2012-04-11 22:02:23
|
Hi -- I was just wondering if there's a mechanism for reporting detailed form validation failure reasons back to the user? I've been digging around in the tutorials and API docs & haven't found one. The tutorial on forms shows how to set up validation on a form, but that form just redisplays if the validation fails. In RoR, validation also adds errors to a collection whenever a validation constraint fails. Is there something like this in cppcms, or is this something the framework user should implement themself? If so, is there a recommended way of reporting validation errors back to the user? Thanks, Doug. |
From: Julian P. <ju...@wh...> - 2012-04-11 20:30:55
|
Am 11.04.2012 19:54, schrieb Artyom Beilis: >> I recently experienced some problems when uploading (large) files (>=30 >> MB) with cherokee to a cppcms based backend application: After a part of >> the upload has completed, a 500 Internal Server error is issued to the >> browser and the connection (and upload) is terminated. These problems >> only occur on an embedded board with a Cortex A8-ARM processor and a >> very slow NAND memory (where the file shall be stored to). For file >> corruption prevention, the file system (ext3) on this NAND is mounted in >> sync mode so that no data is buffered in RAM but anything is written >> directly to NAND. Even if async mode is used instead, the error occurs >> after some more time (probably if the kernel's I/O buffer is full). >> cherokee delivers the upload to the backend application via FastCGI. >> My question is: Is there anything within the FastCGI/upload handling in >> cppcms that may cause such a behaviour, if e.g. the backend application >> needs to long to handle the request (because the file has to be stored >> to NAND before the request is handled), or is it all the fault of the >> webserver? > What version of CppCMS do you use? I assume latest. To be honest, I think that this problem occurred in 0.99.6. I didn't test any later versions yet. Are there changes that impact file I/O in later releases? > Also make sure the the files are uploaded to correct location > so you have enough space. > > The location is correct and there is plenty of space available (>2-3x of the amount needed). My idea just was, that sometime during upload the write to the NAND stalls and the corresponding write call blocks so long, that a timeout or such is hit inside the libcppcms. Another probability would be, that something in the communication between cherokee and libcppcms fails. How does transferring requests from cherokee to libcppcms work exactly? Think of an incoming HTTP POST request with a huge file appended. Cherokee sends this request to libcppcms, and it would start to store the file to the designated temporary location. What does happen, if writing to NAND is very slow? Would libcppcms still accept bytes of the request from cherokee or would it fetch new bytes only if the already received bytes have been written to NAND (the consequence could be, that the network buffer queue inside of the kernel grows until cherokee has to wait with writing because no new packages can be sent, and this might hit a timeout there or lead to a buffer exhaustion that makes cherokee close the connection)? If libcppcms instead buffers internally if more bytes are incoming than can be written to NAND, are there any size limits to these buffers? Best regards, Julian |
From: Artyom B. <art...@ya...> - 2012-04-11 17:54:33
|
> > I recently experienced some problems when uploading (large) files (>=30 > MB) with cherokee to a cppcms based backend application: After a part of > the upload has completed, a 500 Internal Server error is issued to the > browser and the connection (and upload) is terminated. These problems > only occur on an embedded board with a Cortex A8-ARM processor and a > very slow NAND memory (where the file shall be stored to). For file > corruption prevention, the file system (ext3) on this NAND is mounted in > sync mode so that no data is buffered in RAM but anything is written > directly to NAND. Even if async mode is used instead, the error occurs > after some more time (probably if the kernel's I/O buffer is full). > cherokee delivers the upload to the backend application via FastCGI. > My question is: Is there anything within the FastCGI/upload handling in > cppcms that may cause such a behaviour, if e.g. the backend application > needs to long to handle the request (because the file has to be stored > to NAND before the request is handled), or is it all the fault of the > webserver? What version of CppCMS do you use? I assume latest. I'd recommend you to run cppcms process with strace and see what exactly happens when you write to file, i.e. what system call fails: you get the error from the file system (i.e. write(2) failes) or the connection is closed by the cherokee. Also I'd recommend to see if there is anything in the log. Generally there is no timeouts on FastCGI so I don't see were the problem can come from. Also make sure the the files are uploaded to correct location so you have enough space. http://cppcms.com/wikipp/en/page/cppcms_1x_config#security.uploads_path > As a sidenote I may add that we successfully use the very same backend > application on several other systems with different architectures, but > faster storage devices and even on the very same board using SD cards > instead of onboard NAND. > As far as I know, the cherokee webserver passes uploaded files directly > to FastCGI applications (while other webservers like lighttpd or nginx > buffer the whole or at least part of the upload file before they deliver > it to the FastCGI application). > > Thanks for your help, > Julian Best Regards, Artyom Beilis |
From: Artyom B. <art...@ya...> - 2012-04-11 17:46:58
|
> >I'm trying to run it: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib cppblog >Failed: No configuration defined Because you need to run LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib cppblog -C config.js Artyom |
From: Artyom B. <art...@ya...> - 2012-04-11 17:46:04
|
> > What Ive done is I've created a apps::Master* pointer in the JSON_Service > class and in the constructor initialization list I called ctr_(new > apps::Master(srv)) and then in the constructor it self I do > > attach(ctr_); As long as it lives with the JSON service it is ok. > > The question - > It it ok to use a raw pointer - does calling attach() transfer the > responsibility of deleting the pointer to cppcms::application or should I > use something like intrusive_ptr and then call attach(ctr_.get())? > No, attach transfers the ownership to the parent and have to pass a raw pointer. Note, intrusive ptr for application keeps one reference counter for entire hierarchy > Cheers, > Petr > Artyom |
From: Julian P. <ju...@wh...> - 2012-04-11 14:19:02
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hallo, I recently experienced some problems when uploading (large) files (>=30 MB) with cherokee to a cppcms based backend application: After a part of the upload has completed, a 500 Internal Server error is issued to the browser and the connection (and upload) is terminated. These problems only occur on an embedded board with a Cortex A8-ARM processor and a very slow NAND memory (where the file shall be stored to). For file corruption prevention, the file system (ext3) on this NAND is mounted in sync mode so that no data is buffered in RAM but anything is written directly to NAND. Even if async mode is used instead, the error occurs after some more time (probably if the kernel's I/O buffer is full). cherokee delivers the upload to the backend application via FastCGI. My question is: Is there anything within the FastCGI/upload handling in cppcms that may cause such a behaviour, if e.g. the backend application needs to long to handle the request (because the file has to be stored to NAND before the request is handled), or is it all the fault of the webserver? As a sidenote I may add that we successfully use the very same backend application on several other systems with different architectures, but faster storage devices and even on the very same board using SD cards instead of onboard NAND. As far as I know, the cherokee webserver passes uploaded files directly to FastCGI applications (while other webservers like lighttpd or nginx buffer the whole or at least part of the upload file before they deliver it to the FastCGI application). Thanks for your help, Julian -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPhY8dAAoJENidYKvYQHlQRuUP/20Ydttxaqk2rwCydAQKZZIz DiqAzr0qL9FaJCHkUswOCYXhnp5upbB6qpBcjfYFE0Rtr81skGhLvP8b2EhyyU7X bQ9wtvm/gYaigWhULtLs7XNDxQGVLWv3CEUD83h2gGqNFt1zGc/Er+R0ogjlFIFk jbe94IXAzOpYRepIwKOifxdU+QOZCrcrvRZhRMiFnA+XxGBfQsZTHrIYCxCYAAIY BBmcxrOMzyHhoVoZQNQDPPwqqbtpnUkxmWT2lHB5BBMvauokHSkRnvu73zxPonH3 WUj+6X4Jtc3CT9N2cbvzAnXqXUnFx5VWnIJ+aQuKUxqjStPE94DKdjxiJ4PHivQP 5f30ebdOxZa9SUHS+5liD+yIiojCYslyLpjciCCio4TFWxDoJdbPDns59Q/v5zQO yyEh8+jKZq214HuiVaFW/jHOLPcOilsmS9ywsvz6FCXOhj4wHQH/Io7exoaa26i7 9Cr3SMsITyT3a0DnPfZZq9YsKy2K7Y0w6xp3MHP82gahOdaDMaiDAEXOaY/xT07v 8a17GQFRVsHFGLeILD16zE35YTH4tK5gJCZbL2lL9/8mbITcv8zNDzguP8vxXnuq dQ/u33gU/Wqpc/pKgCkkTugMHCBRIhwshl+KWILoTuCuhBOyX9gHEOPWvAghNwkn AoksBVwbHj5QWMwSEJsa =yEBf -----END PGP SIGNATURE----- |
From: <ele...@ex...> - 2012-04-10 23:57:04
|
I see, thank you. What Ive done is I've created a apps::Master* pointer in the JSON_Service class and in the constructor initialization list I called ctr_(new apps::Master(srv)) and then in the constructor it self I do attach(ctr_); The question - It it ok to use a raw pointer - does calling attach() transfer the responsibility of deleting the pointer to cppcms::application or should I use something like intrusive_ptr and then call attach(ctr_.get())? Cheers, Petr |
From: <ele...@ex...> - 2012-04-10 23:55:12
|
I see, thank you. What Ive done is I've created a apps::Master* pointer in the JSON_Service class and in the constructor initialization list I called ctr_(new apps::Master(srv)) and then in the constructor it self I do attach(ctr_); The question - It it ok to use a raw pointer - does calling attach() transfer the responsibility of deleting the pointer to cppcms::application or should I use something like intrusive_ptr and then call attach(ctr_.get())? Cheers, Petr |
From: <ele...@ex...> - 2012-04-10 23:44:25
|
I see, thank you. What Ive done is I've created a apps::Master* pointer in the JSON_Service class and in the constructor initialization list I called ctr_(new apps::Master(srv)) and then in the constructor it self I do attach(ctr_); The question - It it ok to use a raw pointer - does calling attach() transfer the responsibility of deleting the pointer to cppcms::application or should I use something like intrusive_ptr and then call attach(ctr_.get())? Cheers, Petr |
From: Denys V. <va...@bi...> - 2012-04-10 21:06:27
|
Hi guys, I'm trying to setup cppblog on my machine. Originally I'm a c++ developer, but my experience in web technologies is not great. I'll be thankful if you could guide me in this installation. I've successfully build and installed required packages. I'm trying to use cppblog with nginx. my*nginx.conf* server { listen 80; ## listen for ipv4 listen [::]:80 default ipv6only=on; ## listen for ipv6 server_name 192.168.1.103; access_log /var/log/nginx/localhost.access.log; location / { root /var/www; index index.html index.htm; } location /doc { root /usr/share; autoindex on; allow 127.0.0.1; deny all; } location /images { root /usr/share; autoindex on; } location ~ ^/cppblog.*$ { # Socket to communicate fastcgi_pass unix:/tmp/cppblog-fcgi-socket; # Setup value of PATH_INFO variable fastcgi_split_path_info ^(/cppblog)((?:/.*))?$; fastcgi_param PATH_INFO $fastcgi_path_info; # # You can either use "include fastcgi_params;" # or set the variables below manually # # All supported CGI variables fastcgi_param SCRIPT_NAME /cppblog; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # end of server variables } } my changes to */usr/local/share/cppblog/config.js* blog.host = "192.168.1.103" blog.connection_string = "mysql:database=blog;user=den;password=asd;@pool_size=10" blog.session.client.hmac_key = "mykey" all other keys from your sample I'm trying to run it: *LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib cppblog* /*Failed: No configuration defined*/ 0xb74dc2c4: booster::stack_trace::trace(void**, int) + 0x24 in /usr/lib/libbooster.so.0 0x808966b: booster::backtrace::backtrace(unsigned int) + 0x5f in cppblog 0x80897c2: booster::runtime_error::runtime_error(std::string const&) + 0x30 in cppblog 0xb7601cda: cppcms::service::load_settings(int, char**) + 0xd7a in /usr/lib/libcppcms.so.1 0xb7603e99: cppcms::service::service(int, char**) + 0x69 in /usr/lib/libcppcms.so.1 0x80a5659: main + 0x2d in cppblog 0xb6f34c96: __libc_start_main + 0xe6 in /lib/libc.so.6 0x80839a1: ??? + 0x80839a1 in cppblog P.S. Also I've successfully created mysql DB using your scripts... -- Best regards, -- Denys Valchuk Skype: dvalchuk cell: +380664059110 |
From: Artyom B. <art...@ya...> - 2012-04-10 10:45:54
|
> apps::Master ctr(service()); > > >The problem is I can't access the session. If I try something like >ctr.session() the JSON service freezes. You can't access the session of unconnected application, you can't create applications "on-the fly" they are not designed for it. In order to access the session via JSON_Service::session() API that See this thread: http://thread.gmane.org/gmane.comp.lib.cppcms.user/978 Artyom |
From: <ele...@ex...> - 2012-04-10 09:21:58
|
I've got a JSON-RPC service that needs to load a content class because it stores a list of different aircraft. void JSON_Service::build_aircraft_list(int location) data::Master content; apps::Master ctr(service()); ctr.init(); //setup sql ctr.prepare(content); ctr.clear(); // teardown sql } The problem is I can't access the session. If I try something like ctr.session() the JSON service freezes. It seems to work if I call session() directly from build_aircraft_list, but I need to access the session() from inside prepare(). Why can't the apps::Master controller access session? Thank you Petr |
From: doug l. <bi...@gm...> - 2012-04-08 12:38:08
|
Hi -- there were a couple of things that needed changing -- I've updated the wiki with a couple of asides about doing it on OSX with GCC 4.7, but it may want it's own section -- let me know if you'd rather it had, and I can do that in the next day or so. & thanks again for all of your help. Doug. On 7 April 2012 17:18, Artyom Beilis <art...@ya...> wrote: > Have you tried -Wl,--export-dynamic compiler option, it should work > > If not take a look on the options passed to the compiler by the CMake > (because it works in the unit tests, so it should work) > > Once it works... Update the wiki with correct flag: > > > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates#Dynamic.loading > > > > do I just need to man up & use a 'real' operating system? ;) > > Mac OS X is fully supported. I run tests on it using Darwin 8 VM (~Mac OS > X 10.4) > and everything should work with 10.5 and above. I don't have Mac OS X but > AFAIK > everything should work well. > > > If you have issues report them. > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > >________________________________ > > From: doug livesey <bi...@gm...> > >To: cpp...@li... > >Sent: Saturday, April 7, 2012 6:25 PM > >Subject: [Cppcms-users] Issue with using -rdynamic with GCC on OS X > > > > > >Cheers, > > Doug. > > >------------------------------------------------------------------------------ > >For Developers, A Lot Can Happen In A Second. > >Boundary is the first to Know...and Tell You. > >Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >http://p.sf.net/sfu/Boundary-d2dvs2 > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-04-07 16:52:31
|
> 99% tests passed, 1 tests failed out of 93 > Total Test time (real) = 245.05 sec > The following tests FAILED: > 23 - http_timeouts_test_write (Failed) > Errors while running CTest > make: *** [test] Error 8 > > >I'm guessing that this is for a similar reason, and is a require needed in a test file? >Anyway, I'm guessing I can be happy with that, and am proceeding with the install. >Cheers, > Doug. > This tests fails sometimes on Mac OS X. Unfortunately I can't find the problem but most likely it is an issue in Unit test or in timing rather then in the code itself. At least on Darwin 8 and in most of cases the test passes. I would not worry about it too much. Artyom |