cppcms-users Mailing List for CppCMS C++ Web Framework (Page 91)
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: Artyom B. <art...@ya...> - 2012-04-07 16:18:45
|
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 > > > |
From: doug l. <bi...@gm...> - 2012-04-07 15:26:00
|
Hi -- I doubt that there's anything anyone on this list could do about this, but just for the record, dynamically linking views (in the manner outlined in the tutorials) doesn't seem to be possible using GCC on OS X. The best reason for this that I can find (with my imperfect C++/GCC knowledge & google-fu) is this: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37454 Are there any workarounds that might allow me to dynamically link skins in another manner, or do I just need to man up & use a 'real' operating system? ;) Cheers, Doug. |
From: doug l. <bi...@gm...> - 2012-04-07 11:17:26
|
Hi -- adding "#include <sys.time.h>" to the includes in private/send_timeout.h did indeed fix this. I've just run the tests, and one failed -- the timeout write one: 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. On 6 April 2012 22:13, Artyom Beilis <art...@ya...> wrote: > > > > >________________________________ > > From: doug livesey <bi...@gm...> > >To: Artyom Beilis <art...@ya...>; > cpp...@li... > >Sent: Friday, April 6, 2012 6:36 PM > >Subject: Re: [Cppcms-users] Linking trouble when trying to build on OSX > (Snow Leopard) > > > > > >Hi -- that fixed that problem, thanks very much. > >Unfortunately, I now get this error a little further along in the build > process: > > > > > > [snip] > >/Users/douglivesey/src/cppcms-1.0.1/src/send_timeout.cpp:26:17: error: > aggregate 'cppcms::impl::set_send_timeout(booster::aio::stream_socket&, > int, booster::system::error_code&)::timeval tv' has incomplete type and > cannot be defined > > [snip] > > > > > >Am I perhaps missing a dependency? I thought I'd installed everything. > >Anyway, thanks very much for your advice, and Happy Passover to you, too! > :) > > > I hadn't tested CppCMS with gcc-4.7 yet, I assume there is a missing header > time.h, add it and see if it helps. > > Artyom > > > > ------------------------------------------------------------------------------ > 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: william l. <we...@gm...> - 2012-04-07 09:47:51
|
Thank you Artyom for your time. Cheers & Happy coding! Best Regards, William L. On Sat, Apr 7, 2012 at 4:00 PM, Artyom Beilis <art...@ya...> wrote: > Absolutely right. > > Small additional notes: > > > I believe some situation, ppl use multiple > > processes with only one > thread, is because > > implementation is not thread safe, yet multiple > processes still fast. > > It is rather to make the application more crash resistant, such > that if one process fails only several connections are gone. > > Also having multiple processes allows to have several event > loops simultaneously and this may be helpful on multi-core > systems in some load cases. > > > When run in multiple worker processes mode on single machine, > > we > need to use session.server.storage:"files", since "memory" > > only works > for single process and "network" will need to > > use cppcms_scale. > > > > > The best way to scale sessions is to use client side storage, > as it is 100% linearly scalable as does not involve central > server (it has its own downsides) > > In any way, memory session storage is good mostly for > development as if process shuts down all the sessions > data is lost, so for server side storage files is > > generally better option and you can even use NFS > to store session data across multiple cppcms > instances. > > You can also use database for session storage (see contrib) > section in the source code. In such case, if for example > you use PostgreSQL or MySQL server for session storage > you do not need to use cppcms_scale and it is already > centralized. > > ---- > > Also I forget to add "external" session storage to > configuration file description, such that you can > use external session storage objects loaded from > shared objects / dlls . > > > I'll update the wiki later. > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > >________________________________ > > From: william lee <we...@gm...> > >To: Artyom Beilis <art...@ya...>; > cpp...@li... > >Sent: Saturday, April 7, 2012 6:29 AM > >Subject: Re: [Cppcms-users] Multiprocesses and cppcms_scale > > > > > >Hi > Artyom, > >Thank you for your kindly explanations. > >It looks like I missed a lot of points from CppCMS Config wiki page. > > > > > >Here are my conclusions, please correct me if I'm wrong. > >1. cppcms_scale > >After I start cppcms_scale by following cppcms_tcp_scale's doc, then > config CppCMS instances to use cache.tcp.ips & session.server.ips, pointing > to cppcms_scale machine, they should be able to scale up the distribution. > >cppcms_scale is asynchronous application, so only one process is enough, > with possible multi-threads to gain more performance on multiple core(cpu) > machines. > >If one cppcms_scale server is not enough, we can have several, but the > cache.tcp.ips & session.server.ips should be identical to all CppCMS > instances configuration, including the list order of cppcms_scale machine > IPs, > >I assume CppCMS instance will use this IP list with order, to hash the > session bucket? > > > > > >2. Multiple Processes > >CppCMS support multiple processes with multiple threads, MS Windows only > multiple threads. :) > >When running on a single machine, multiple worker processes can use > shared memory to store the cache, no need cppcms_scale to be involved. > This can be done via cache.backend:"process_shared" configuration. This is > also non-Windows. > > > > > >I believe some situation, ppl use multiple processes with only one > thread, is because implementation is not thread safe, yet multiple > processes still fast. > > > > > >When run in multiple worker processes mode on single machine, we need to > use session.server.storage:"files", since "memory" only works for single > process and "network" will need to use cppcms_scale. > > > > > >And also, we can use "network" for multiple worker processes mode and > running on several machines, so they will all point to cppcms_scale servers > for consistent cache & session. > > > > > >Thanks! > >William L. > > > > > > > > > >On Sat, Apr 7, 2012 at 5:34 AM, Artyom Beilis <art...@ya...> > wrote: > > > > > >> > >> > >>> > >>>1. cppcms_scale > >>> Here in this page, it mentioned "cppcms_scale" > >>> http://cppcms.com/wikipp/en/page/cppcms_1x_high_performance > >>> and I found the built binary cppcms_scale.exe as well. > >>> It is supposed to provide triggered cache, and cross process session > support? I can't any wiki page talking about its usage. > >>> I found here is something about "cppcms_tcp_scale" > >>> http://cppcms.com/wikipp/en/page/ref_utils > >>> Are they the same thing? It would be great if can have a > page/sample talking more about how to scale up. Thanks. > >>> > >> > >>Yes, > >> > >>cppcms_scale allows to shared both cache and sessions over the network > similarly to memcached. > >> > >>See: > >> > >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#cache.tcp > >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#session.server.storage > >> > >> > >>This way multiple cppcms services can share the cache and sessions over > the network. > >> > >> > >> > >>> > >>>2. Multi-Processes > >>>Here in this page, http://cppcms.com/wikipp/en/page/tut_concept it > mentioned CppCMS can have a pool of threads or processes. > >>>But here when configure with web servers, > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Configuring.Other.Web.Servers > >>>document mentioned "be sure it starts only a single process". Otherwise > the cache & session will be messed up, due to not cross process. > >>>Is this the problem cppcms_scale targeted to solve ? > >> > >>Yes and no. Generally running CppCMS as a single service instance is > good as it allows > >>to handle cache withing the same process. Sometimes web server is not > >> > >>aware of the fact that the FastCGI server is multi-threaded and would > start > >>multiple instances and this is wrong. > >> > >> > >>And yes cppcms_scale can solve it but generally it is better not to use > cppcms_scale > >>as long as you running the application on a single server. > >> > >> > >> > >>> If true, how can we configure CppCMS > >> > >>> with modern web servers, to run as multiple > >>> processes and multiple threads, in fastcgi env? > >>> > >>> > >> > >>CppCMS handles both thread and process pool > >> > >> > >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.worker_threads > >> > >>This allows the process to share for example the cache using shared > >>memory and not IPC. However if you scale to multiple network > >>nodes you do need cppcms_scale for cache. > >> > >> > >>Small note: under Windows CppCMS supports only multiple threads pool and > can't > >>fork multiple processes (as Windows does not have fork() system call) > >> > >>So if you do want to run multiple CppCMS processes under Windows > >>you need to start them independently and use cppcms_scale to > >>solve cache consistency issues > >> > >> > >> > >>>Thanks for the great work! I'd like to use CppCMS in my > production environment soon. > >>> > >>> > >>>Cheers, > >>>William L. > >> > >>Regards, > >> > >>I'd be glad to hear about it. > >>Artyom > >> > > >>------------------------------------------------------------------------------ > >>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 > > > > > > > > > ------------------------------------------------------------------------------ > 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 08:00:10
|
Absolutely right. Small additional notes: > I believe some situation, ppl use multiple > processes with only one thread, is because > implementation is not thread safe, yet multiple processes still fast. It is rather to make the application more crash resistant, such that if one process fails only several connections are gone. Also having multiple processes allows to have several event loops simultaneously and this may be helpful on multi-core systems in some load cases. > When run in multiple worker processes mode on single machine, > we need to use session.server.storage:"files", since "memory" > only works for single process and "network" will need to > use cppcms_scale. > The best way to scale sessions is to use client side storage, as it is 100% linearly scalable as does not involve central server (it has its own downsides) In any way, memory session storage is good mostly for development as if process shuts down all the sessions data is lost, so for server side storage files is generally better option and you can even use NFS to store session data across multiple cppcms instances. You can also use database for session storage (see contrib) section in the source code. In such case, if for example you use PostgreSQL or MySQL server for session storage you do not need to use cppcms_scale and it is already centralized. ---- Also I forget to add "external" session storage to configuration file description, such that you can use external session storage objects loaded from shared objects / dlls . I'll update the wiki later. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: william lee <we...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, April 7, 2012 6:29 AM >Subject: Re: [Cppcms-users] Multiprocesses and cppcms_scale > > >Hi Artyom, >Thank you for your kindly explanations. >It looks like I missed a lot of points from CppCMS Config wiki page. > > >Here are my conclusions, please correct me if I'm wrong. >1. cppcms_scale >After I start cppcms_scale by following cppcms_tcp_scale's doc, then config CppCMS instances to use cache.tcp.ips & session.server.ips, pointing to cppcms_scale machine, they should be able to scale up the distribution. >cppcms_scale is asynchronous application, so only one process is enough, with possible multi-threads to gain more performance on multiple core(cpu) machines. >If one cppcms_scale server is not enough, we can have several, but the cache.tcp.ips & session.server.ips should be identical to all CppCMS instances configuration, including the list order of cppcms_scale machine IPs, >I assume CppCMS instance will use this IP list with order, to hash the session bucket? > > >2. Multiple Processes >CppCMS support multiple processes with multiple threads, MS Windows only multiple threads. :) >When running on a single machine, multiple worker processes can use shared memory to store the cache, no need cppcms_scale to be involved. This can be done via cache.backend:"process_shared" configuration. This is also non-Windows. > > >I believe some situation, ppl use multiple processes with only one thread, is because implementation is not thread safe, yet multiple processes still fast. > > >When run in multiple worker processes mode on single machine, we need to use session.server.storage:"files", since "memory" only works for single process and "network" will need to use cppcms_scale. > > >And also, we can use "network" for multiple worker processes mode and running on several machines, so they will all point to cppcms_scale servers for consistent cache & session. > > >Thanks! >William L. > > > > >On Sat, Apr 7, 2012 at 5:34 AM, Artyom Beilis <art...@ya...> wrote: > > >> >> >>> >>>1. cppcms_scale >>> Here in this page, it mentioned "cppcms_scale" >>> http://cppcms.com/wikipp/en/page/cppcms_1x_high_performance >>> and I found the built binary cppcms_scale.exe as well. >>> It is supposed to provide triggered cache, and cross process session support? I can't any wiki page talking about its usage. >>> I found here is something about "cppcms_tcp_scale" >>> http://cppcms.com/wikipp/en/page/ref_utils >>> Are they the same thing? It would be great if can have a page/sample talking more about how to scale up. Thanks. >>> >> >>Yes, >> >>cppcms_scale allows to shared both cache and sessions over the network similarly to memcached. >> >>See: >> >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#cache.tcp >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#session.server.storage >> >> >>This way multiple cppcms services can share the cache and sessions over the network. >> >> >> >>> >>>2. Multi-Processes >>>Here in this page, http://cppcms.com/wikipp/en/page/tut_concept it mentioned CppCMS can have a pool of threads or processes. >>>But here when configure with web servers, http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Configuring.Other.Web.Servers >>>document mentioned "be sure it starts only a single process". Otherwise the cache & session will be messed up, due to not cross process. >>>Is this the problem cppcms_scale targeted to solve ? >> >>Yes and no. Generally running CppCMS as a single service instance is good as it allows >>to handle cache withing the same process. Sometimes web server is not >> >>aware of the fact that the FastCGI server is multi-threaded and would start >>multiple instances and this is wrong. >> >> >>And yes cppcms_scale can solve it but generally it is better not to use cppcms_scale >>as long as you running the application on a single server. >> >> >> >>> If true, how can we configure CppCMS >> >>> with modern web servers, to run as multiple >>> processes and multiple threads, in fastcgi env? >>> >>> >> >>CppCMS handles both thread and process pool >> >> >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.worker_threads >> >>This allows the process to share for example the cache using shared >>memory and not IPC. However if you scale to multiple network >>nodes you do need cppcms_scale for cache. >> >> >>Small note: under Windows CppCMS supports only multiple threads pool and can't >>fork multiple processes (as Windows does not have fork() system call) >> >>So if you do want to run multiple CppCMS processes under Windows >>you need to start them independently and use cppcms_scale to >>solve cache consistency issues >> >> >> >>>Thanks for the great work! I'd like to use CppCMS in my production environment soon. >>> >>> >>>Cheers, >>>William L. >> >>Regards, >> >>I'd be glad to hear about it. >>Artyom >> >>------------------------------------------------------------------------------ >>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: william l. <we...@gm...> - 2012-04-07 03:30:00
|
Hi Artyom, Thank you for your kindly explanations. It looks like I missed a lot of points from CppCMS Config wiki page. Here are my conclusions, please correct me if I'm wrong. 1. cppcms_scale After I start cppcms_scale by following cppcms_tcp_scale's doc, then config CppCMS instances to use cache.tcp.ips & session.server.ips, pointing to cppcms_scale machine, they should be able to scale up the distribution. cppcms_scale is asynchronous application, so only one process is enough, with possible multi-threads to gain more performance on multiple core(cpu) machines. If one cppcms_scale server is not enough, we can have several, but the cache.tcp.ips & session.server.ips should be identical to all CppCMS instances configuration, including the list order of cppcms_scale machine IPs, I assume CppCMS instance will use this IP list with order, to hash the session bucket? 2. Multiple Processes CppCMS support multiple processes with multiple threads, MS Windows only multiple threads. :) When running on a single machine, multiple worker processes can use shared memory to store the cache, no need cppcms_scale to be involved. This can be done via cache.backend:"process_shared" configuration. This is also non-Windows. I believe some situation, ppl use multiple processes with only one thread, is because implementation is not thread safe, yet multiple processes still fast. When run in multiple worker processes mode on single machine, we need to use session.server.storage:"files", since "memory" only works for single process and "network" will need to use cppcms_scale. And also, we can use "network" for multiple worker processes mode and running on several machines, so they will all point to cppcms_scale servers for consistent cache & session. Thanks! William L. On Sat, Apr 7, 2012 at 5:34 AM, Artyom Beilis <art...@ya...> wrote: > > > > > > >1. cppcms_scale > > Here in this page, it mentioned "cppcms_scale" > > http://cppcms.com/wikipp/en/page/cppcms_1x_high_performance > > and I found the built binary cppcms_scale.exe as well. > > It is supposed to provide triggered cache, and cross process session > support? I can't any wiki page talking about its usage. > > I found here is something about "cppcms_tcp_scale" > > http://cppcms.com/wikipp/en/page/ref_utils > > Are they the same thing? It would be great if can have a > page/sample talking more about how to scale up. Thanks. > > > > Yes, > > cppcms_scale allows to shared both cache and sessions over the network > similarly to memcached. > > See: > > http://cppcms.com/wikipp/en/page/cppcms_1x_config#cache.tcp > http://cppcms.com/wikipp/en/page/cppcms_1x_config#session.server.storage > > > This way multiple cppcms services can share the cache and sessions over > the network. > > > > > >2. Multi-Processes > >Here in this page, http://cppcms.com/wikipp/en/page/tut_concept it > mentioned CppCMS can have a pool of threads or processes. > >But here when configure with web servers, > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Configuring.Other.Web.Servers > >document mentioned "be sure it starts only a single process". Otherwise > the cache & session will be messed up, due to not cross process. > >Is this the problem cppcms_scale targeted to solve ? > > Yes and no. Generally running CppCMS as a single service instance is good > as it allows > to handle cache withing the same process. Sometimes web server is not > > aware of the fact that the FastCGI server is multi-threaded and would start > multiple instances and this is wrong. > > > And yes cppcms_scale can solve it but generally it is better not to use > cppcms_scale > as long as you running the application on a single server. > > > > If true, how can we configure CppCMS > > > with modern web servers, to run as multiple > > processes and multiple threads, in fastcgi env? > > > > > > CppCMS handles both thread and process pool > > > http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.worker_threads > > This allows the process to share for example the cache using shared > memory and not IPC. However if you scale to multiple network > nodes you do need cppcms_scale for cache. > > > Small note: under Windows CppCMS supports only multiple threads pool and > can't > fork multiple processes (as Windows does not have fork() system call) > > So if you do want to run multiple CppCMS processes under Windows > you need to start them independently and use cppcms_scale to > solve cache consistency issues > > > >Thanks for the great work! I'd like to use CppCMS in my > production environment soon. > > > > > >Cheers, > >William L. > > Regards, > > I'd be glad to hear about it. > Artyom > > > ------------------------------------------------------------------------------ > 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-06 21:35:00
|
> >1. cppcms_scale > Here in this page, it mentioned "cppcms_scale" > http://cppcms.com/wikipp/en/page/cppcms_1x_high_performance > and I found the built binary cppcms_scale.exe as well. > It is supposed to provide triggered cache, and cross process session support? I can't any wiki page talking about its usage. > I found here is something about "cppcms_tcp_scale" > http://cppcms.com/wikipp/en/page/ref_utils > Are they the same thing? It would be great if can have a page/sample talking more about how to scale up. Thanks. > Yes, cppcms_scale allows to shared both cache and sessions over the network similarly to memcached. See: http://cppcms.com/wikipp/en/page/cppcms_1x_config#cache.tcp http://cppcms.com/wikipp/en/page/cppcms_1x_config#session.server.storage This way multiple cppcms services can share the cache and sessions over the network. > >2. Multi-Processes >Here in this page, http://cppcms.com/wikipp/en/page/tut_concept it mentioned CppCMS can have a pool of threads or processes. >But here when configure with web servers, http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Configuring.Other.Web.Servers >document mentioned "be sure it starts only a single process". Otherwise the cache & session will be messed up, due to not cross process. >Is this the problem cppcms_scale targeted to solve ? Yes and no. Generally running CppCMS as a single service instance is good as it allows to handle cache withing the same process. Sometimes web server is not aware of the fact that the FastCGI server is multi-threaded and would start multiple instances and this is wrong. And yes cppcms_scale can solve it but generally it is better not to use cppcms_scale as long as you running the application on a single server. > If true, how can we configure CppCMS > with modern web servers, to run as multiple > processes and multiple threads, in fastcgi env? > > CppCMS handles both thread and process pool http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.worker_threads This allows the process to share for example the cache using shared memory and not IPC. However if you scale to multiple network nodes you do need cppcms_scale for cache. Small note: under Windows CppCMS supports only multiple threads pool and can't fork multiple processes (as Windows does not have fork() system call) So if you do want to run multiple CppCMS processes under Windows you need to start them independently and use cppcms_scale to solve cache consistency issues >Thanks for the great work! I'd like to use CppCMS in my production environment soon. > > >Cheers, >William L. Regards, I'd be glad to hear about it. Artyom |
From: Artyom B. <art...@ya...> - 2012-04-06 21:13:44
|
>________________________________ > From: doug livesey <bi...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Friday, April 6, 2012 6:36 PM >Subject: Re: [Cppcms-users] Linking trouble when trying to build on OSX (Snow Leopard) > > >Hi -- that fixed that problem, thanks very much. >Unfortunately, I now get this error a little further along in the build process: > > > [snip] >/Users/douglivesey/src/cppcms-1.0.1/src/send_timeout.cpp:26:17: error: aggregate 'cppcms::impl::set_send_timeout(booster::aio::stream_socket&, int, booster::system::error_code&)::timeval tv' has incomplete type and cannot be defined > [snip] > > >Am I perhaps missing a dependency? I thought I'd installed everything. >Anyway, thanks very much for your advice, and Happy Passover to you, too! :) I hadn't tested CppCMS with gcc-4.7 yet, I assume there is a missing header time.h, add it and see if it helps. Artyom |
From: doug l. <bi...@gm...> - 2012-04-06 15:36:39
|
Hi -- that fixed that problem, thanks very much. Unfortunately, I now get this error a little further along in the build process: ... [ 32%] Building CXX object CMakeFiles/cppcms.dir/src/send_timeout.cpp.o /Users/douglivesey/src/cppcms-1.0.1/src/send_timeout.cpp: In function 'void cppcms::impl::set_send_timeout(booster::aio::stream_socket&, int, booster::system::error_code&)': /Users/douglivesey/src/cppcms-1.0.1/src/send_timeout.cpp:26:17: error: aggregate 'cppcms::impl::set_send_timeout(booster::aio::stream_socket&, int, booster::system::error_code&)::timeval tv' has incomplete type and cannot be defined In file included from /Users/douglivesey/src/cppcms-1.0.1/private/send_timeout.h:11:0, from /Users/douglivesey/src/cppcms-1.0.1/src/send_timeout.cpp:18: /Users/douglivesey/src/cppcms-1.0.1/booster/booster/system_error.h: At global scope: /Users/douglivesey/src/cppcms-1.0.1/booster/booster/system_error.h:73:31: warning: 'booster::system::posix_category' defined but not used [-Wunused-variable] make[2]: *** [CMakeFiles/cppcms.dir/src/send_timeout.cpp.o] Error 1 make[1]: *** [CMakeFiles/cppcms.dir/all] Error 2 make: *** [all] Error 2 Am I perhaps missing a dependency? I thought I'd installed everything. Anyway, thanks very much for your advice, and Happy Passover to you, too! :) Doug. |
From: william l. <we...@gm...> - 2012-04-06 14:45:14
|
Hi, I'm reading the wiki pages, and played some examples. I have two questions, actually, maybe talking about same thing. 1. cppcms_scale Here in this page, it mentioned "cppcms_scale" http://cppcms.com/wikipp/en/page/cppcms_1x_high_performance and I found the built binary cppcms_scale.exe as well. It is supposed to provide triggered cache, and cross process session support? I can't any wiki page talking about its usage. I found here is something about "cppcms_tcp_scale" http://cppcms.com/wikipp/en/page/ref_utils Are they the same thing? It would be great if can have a page/sample talking more about how to scale up. Thanks. 2. Multi-Processes Here in this page, http://cppcms.com/wikipp/en/page/tut_concept it mentioned CppCMS can have a pool of threads or processes. But here when configure with web servers, http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Configuring.Other.Web.Servers document mentioned "be sure it starts only a single process". Otherwise the cache & session will be messed up, due to not cross process. Is this the problem cppcms_scale targeted to solve ? If true, how can we configure CppCMS with modern web servers, to run as multiple processes and multiple threads, in fastcgi env? Thanks for the great work! I'd like to use CppCMS in my production environment soon. Cheers, William L. |
From: Artyom B. <art...@ya...> - 2012-04-06 14:39:16
|
Hello, This is known issue on Mac OS X. You have two versions of libiconv installed - one from latest OS and other from GNU. You have two libiconv.dylib and/or two iconv.h Try to find the correct one and using CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH cmake parameter provide the path to the correct location of the library/header, or make sure only one is installed. Happy Passover, 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: Friday, April 6, 2012 2:07 PM >Subject: [Cppcms-users] Linking trouble when trying to build on OSX (Snow Leopard) > > >Hi -- I'm trying to build cppcms, but am getting this error when I run make: https://gist.github.com/2318842 >I tried explicitly setting the CC and CXX variables at the start of the make file to use GCC 4.7, but that didn't fix it. >Could anyone advise on how I could resolve this error? >Thanks, > 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 > > > |
From: doug l. <bi...@gm...> - 2012-04-06 11:07:32
|
Hi -- I'm trying to build cppcms, but am getting this error when I run make: https://gist.github.com/2318842 I tried explicitly setting the CC and CXX variables at the start of the make file to use GCC 4.7, but that didn't fix it. Could anyone advise on how I could resolve this error? Thanks, Doug. |
From: Artyom B. <art...@ya...> - 2012-04-02 09:47:16
|
I'd suggest: Add some regular expression to configration file that would control the gzip compression and use it instead of hard-coded values. Of course it should be optional and it should go to: http://cppcms.com/wikipp/en/page/cppcms_1x_config#gzip Good idea, **patches are welcome** Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Juergen Gleiss <jue...@gm...> >To: cpp...@li... >Sent: Monday, April 2, 2012 12:40 PM >Subject: [Cppcms-users] request of json/rpc compression > > >Hi, > >Is it possible to enable the compression of json/rpc calls. I've changed the function bool::response::need_gzip() and added the protocal "application/json" at the file http_response.cpp. Here is the full function: > >bool response::need_gzip() >{ >#ifndef CPPCMS_NO_GZIP > if(disable_compression_ == 1) > return false; > if(io_mode_!=normal) > return false; > if(context_.service().cached_settings().gzip.enable==false) > return false; > if(strstr(context_.request().cgetenv("HTTP_ACCEPT_ENCODING"),"gzip")==0) > return false; > std::string l_help=get_header("Content-Encoding"); > if(!l_help.empty()) > // User had defined its own content encoding > // he may compress data on its own... disable compression > return false; > std::string const content_type=get_header("Content-Type"); > if(protocol::is_prefix_of("text/",content_type)) > return true; > if(protocol::is_prefix_of("application/json",content_type)) > return true; > > return false; >#else > return false; >#endif >} > >Thanks > >Jürgen Gleiss > > >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Juergen G. <jue...@gm...> - 2012-04-02 09:40:55
|
Hi, Is it possible to enable the compression of json/rpc calls. I've changed the function bool::response::need_gzip() and added the protocal "application/json" at the file http_response.cpp. Here is the full function: bool response::need_gzip() { #ifndef CPPCMS_NO_GZIP if(disable_compression_ == 1) return false; if(io_mode_!=normal) return false; if(context_.service().cached_settings().gzip.enable==false) return false; if(strstr(context_.request().cgetenv("HTTP_ACCEPT_ENCODING"),"gzip")==0) return false; std::string l_help=get_header("Content-Encoding"); if(!l_help.empty()) // User had defined its own content encoding // he may compress data on its own... disable compression return false; std::string const content_type=get_header("Content-Type"); if(protocol::is_prefix_of("text/",content_type)) return true; if(protocol::is_prefix_of("application/json",content_type)) return true; return false; #else return false; #endif } Thanks Jürgen Gleiss |
From: augustin <aug...@ov...> - 2012-03-30 13:28:00
|
On Friday, March 30, 2012 02:17:31 PM ele...@ex... wrote: > I'm posting the fix here so other people don't > stuff up like me. Thank you for having taken the time to post the fix. It might be useful to me at a later date. Blessings, Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |
From: <ele...@ex...> - 2012-03-30 06:17:39
|
Ahh bummer. Stupid mistake. I'm posting the fix here so other people don't stuff up like me. The problem is in the data POST sent to the server. data: JSON.stringify({"method":"build_aircraft_list", "params":["1"] should be data: JSON.stringify({"method":"build_aircraft_list", "params":[1] Not theres no quotation marks around number 1 in the params section. Petr |
From: <ele...@ex...> - 2012-03-30 05:49:40
|
Hi, Im testing the json rpc server using POST ajax calls. I've got this in my view: <script type="text/javascript" charset="utf-8"> $(function(){ $("select#location").change(function(){ $.ajax({url: "/crafty/rpc", type: "POST", contentType: "application/json", data: JSON.stringify({"method":"build_aircraft_list", "params":["1"], "id":1}), dataType: "json", success: function(response) { alert(response.result); }, }); }) }) </script> The alert prints "null", but Im definetely getting a response from the JSON-RPC server (Google Chrome debugger says so) HTTP/1.0 200 Ok Server: CppCMS-Embedded/1.0.0 Connection: close Content-Type: application/json; charset=us-ascii X-Powered-By: CppCMS/1.0.0 Now the problem is the build_aircraft_list(int) never gets called . Here is the JSON_Service class - JSON_Service::JSON_Service(cppcms::service& srv): json_rpc_server(srv) { using namespace cppcms::rpc; bind("build_aircraft_list", json_method(&JSON_Service::build_aircraft_list, this), method_role); } void JSON_Service::build_aircraft_list(int location) { std::cout << "Yay" << std::endl; return_result("test return"); } Nothing ever gets printed to cout. So Im assuming the build_aircraft_list function never gets called. The RPC server is setup as a SubApplication and CSRF is enabled. Any ideas? Thank you Petr |
From: Marcel H. <ke...@co...> - 2012-03-29 07:47:01
|
Oh.. i did not see that you only want the rendering time. I'm sorry. > Well thank you for the help! it is so fast! I have implemented > std::chrono, because I want to show the execution time on the page, > but when is the correct time of render so its as accurate as possible, > below is the algorithm I want to implement, but when or where should > be the time started and where should the time be ended so its as > realistic as possible (since here I'm skipping render time I'm only > using the login time) > void intro() > { > //get start time > content::master c; > //load files and sessions, logic of the page > //get end time and send it to the view render > render("intro",c); //or get the time end on the view itself > (.tmpl) > } Two options. Either you do it this way: start_time(); content::master c; render("intro", c); end_time(); Or you put (caution, it's not recommend) c++ code direct into your template at the end of your render page, where you put the stime into a variable and then print it out. I think both options would be okay, but it's not recommend to put c++ directly into your template. Why? :D I don't know. Just don't do it ;) > > is there a way I should implement it? maybe on other overloaded > functions? or something like preload, to get as realistic as it can be? > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Marcel H. <ke...@co...> - 2012-03-29 07:21:39
|
if you want the time from the request start until the end you can use the virtual method init and clear. dont know if there are other solutions. http://cppcms.com/cppcms_ref/latest/classcppcms_1_1application.html -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. Vicente Benavent <za...@gm...> schrieb: Well thank you for the help! it is so fast! I have implemented std::chrono, because I want to show the execution time on the page, but when is the correct time of render so its as accurate as possible, below is the algorithm I want to implement, but when or where should be the time started and where should the time be ended so its as realistic as possible (since here I'm skipping render time I'm only using the login time) void intro() { //get start time content::master c; //load files and sessions, logic of the page //get end time and send it to the view render render("intro",c); //or get the time end on the view itself (.tmpl) } is there a way I should implement it? maybe on other overloaded functions? or something like preload, to get as realistic as it can be? |
From: Vicente B. <za...@gm...> - 2012-03-29 05:50:14
|
Well thank you for the help! it is so fast! I have implemented std::chrono, because I want to show the execution time on the page, but when is the correct time of render so its as accurate as possible, below is the algorithm I want to implement, but when or where should be the time started and where should the time be ended so its as realistic as possible (since here I'm skipping render time I'm only using the login time) void intro() { //get start time content::master c; //load files and sessions, logic of the page //get end time and send it to the view render render("intro",c); //or get the time end on the view itself (.tmpl) } is there a way I should implement it? maybe on other overloaded functions? or something like preload, to get as realistic as it can be? |
From: Marcel H. <ke...@co...> - 2012-03-28 13:36:07
|
Hello everyone, i am searching for a good and easy to use json parser for c++. I know that cppcms has such, but it's "embedded" into the cppcms framework. I tried jsoncpp but ... it's... ugly. All in all not a good concept. So my question: Is the json parser that perfect that you would approve it? Can i extract the json parser (it's only 3 headers and sources afaics) out of the project? Is it compatible with the license (I don't know much about licening) Is there any other json cpp project that you can recommend? Regards Marcel Hellwig |
From: Artyom B. <art...@ya...> - 2012-03-28 06:02:49
|
Or even better: 1. Valgrind - one of the best profilers arond would help you to locate your bottlenecks. 2. ab (apache benchmark) a small tool to measure loads for specific pages (i.e. page/second ratio) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Marcel Hellwig <ke...@co...> >To: cpp...@li... >Sent: Wednesday, March 28, 2012 7:06 AM >Subject: Re: [Cppcms-users] Execution/Page render time > > >make a time measure with the new std::chrono classes. just google it. >-- >Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. > > > > >Vicente de Jesus Benavent Valenzuela <za...@gm...> schrieb: >Is there a way to know, or a tutorial on how to know how long the page took to render/execute and place it somewhere on the site? like on php it would be something like in here: >>http://www.webdesign.org/web-programming/php/script-execution-time.8722.html >> >> >>Thanks! >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Marcel H. <ke...@co...> - 2012-03-28 05:07:07
|
make a time measure with the new std::chrono classes. just google it. -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. Vicente de Jesus Benavent Valenzuela <za...@gm...> schrieb: Is there a way to know, or a tutorial on how to know how long the page took to render/execute and place it somewhere on the site? like on php it would be something like in here: http://www.webdesign.org/web-programming/php/script-execution-time.8722.html Thanks! |
From: Vicente de J. B. V. <za...@gm...> - 2012-03-28 01:56:47
|
Is there a way to know, or a tutorial on how to know how long the page took to render/execute and place it somewhere on the site? like on php it would be something like in here: http://www.webdesign.org/web-programming/php/script-execution-time.8722.html Thanks! |
From: sergey l. <ccp...@gm...> - 2012-03-27 10:15:49
|
Hi! Nice, thank you! ;-) On Tue, Mar 27, 2012 at 12:30 PM, Artyom Beilis <art...@ya...> wrote: > Hello, > > CppCMS supports both Unix like operating systems and Windows. > > However using CppCMS (and actually any library) on Windows > is not as simple as on OSes like Linux. > > So I've added a small tutorial that marks the notes about using > CppCMS on Windows. > > http://cppcms.com/wikipp/en/page/notes_for_windows_users > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |