cppcms-users Mailing List for CppCMS C++ Web Framework (Page 69)
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-11-01 08:37:02
|
To be honest, I'm not sure it is good idea. I'll explain why: In C++ JSON object has valuesemantics, unlike the reference semantics in JavaScript, so using NULL pointer or pointer to cppcms::json::null would be alien. That is why object cppcms::json::null exists, it is dummy object that represents null value and it works perfectly fine. Using pointer as substitution may be misleading as users may assume that they assign pointers to json object and not values themselves. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Lee Elenbaas <lee...@gm...> >To: Artyom Beilis <art...@ya...> >Sent: Thursday, November 1, 2012 12:53 AM >Subject: Re: [Cppcms-users] Set a null value on JSON without quotes > > >Hi Artyom, > >attached is a tested and working solution for the nullptr assignment >i have 2 issues with it: > >1. i am not sure that the support for the C++03 syntax of >my_object["val"] = (cppcms::json::null*)NULL; gives anything at all - so i think that should be removed, but i whould like your input on this >2. i did not understand the config.h mechanism yet - and i think the support for autoptr should be inserted only in the case of C++11 and not in other modes - so conditioning for this is also missing > >lee > > >On Wed, Oct 31, 2012 at 11:55 AM, Lee Elenbaas <lee...@gm...> wrote: > >Since this message bounced from the mailing list (probably due to the attachment) >>i thought i will send it directly to you >> >> >>as far as agreement to the copy write - i already gave you my consent about the tmpl_cc tool - just extend it to this or anything else i will send over in the future unless i will explicitly tell you not to >> >> >> >>---------- Forwarded message ---------- >>From: Lee Elenbaas <lee...@gm...> >>Date: Wed, Oct 31, 2012 at 11:51 AM >>Subject: Re: [Cppcms-users] Set a null value on JSON without quotes >>To: cpp...@li... >> >> >> >>i did not found how to bring it up through source forge >>i did not had time to check and see if it works yet (i will probably get around to it tonight) >> >> >>but attached is the updated file that should support the following syntax: >> >> >>always: >>my_object["name"]=(json::null*)NULL; >> >> >>in C++11 also >>my_object["name"]=nullptr; >> >>if anyone manage to check it before i do - please let me know >> >> >>On Wed, Oct 31, 2012 at 10:14 AM, Marcel Hellwig <ke...@co...> wrote: >> >> >>>-----BEGIN PGP SIGNED MESSAGE----- >>>Hash: SHA1 >>> >>>Am 31.10.2012 08:29, schrieb Lee Elenbaas: >>> >>>> Any chance that cppcms under C++11 will support the syntax: >>>> >>>> my_object["name"]=nullptr; >>> I don't see any arguments against this. Write a patch and commit it via sourceforge. Artyom will respond you if he thinks it is worth to implement. >>>> >>>> On Wed, Oct 31, 2012 at 9:09 AM, Artyom Beilis <art...@ya... <mailto:art...@ya...>> wrote: >>>> >>>> my_object["name"]=cppcms::json::null(); >>>> >>>> http://cppcms.com/cppcms_ref/latest/structcppcms_1_1json_1_1null.html >>>> >>>> Artyom Beilis >>>> -------------- >>>> CppCMS - C++ Web Framework: http://cppcms.com/ >>>> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>>> >>> > ------------------------- >>>> *From:* Daniel Rios <dan...@li... <mailto:dan...@li...>> >>>> *To:* cppcms <cpp...@li... <mailto:cpp...@li...>> >>>> *Sent:* Wednesday, October 31, 2012 <tel:2012> 3:18 AM >>>> *Subject:* [Cppcms-users] Set a null value on JSON without quotes >>> >>>> >>>> Hello there ! I've need to set a null value on JSON without quotes, I've tried the following: >>>> >>>> my_object["name"] = NULL; >>>> my_object["name"] = "null"; >>>> >>>> On the first case I've got "my_object": 0 and then "my_object":"null" >>>> >>>> But I've need "my_object":null >>>> >>>> Any clue ? >>>> >>>> Daniel >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Everyone hates slow websites. So do we. >>>> Make your web apps faster with AppDynamics >>>> Download AppDynamics Lite for free today: >>>> http://p.sf.net/sfu/appdyn_sfd2d_oct >>>> _______________________________________________ >>>> Cppcms-users mailing list >>> > Cpp...@li... <mailto:Cpp...@li...> >>> >>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Everyone hates slow websites. So do we. >>>> Make your web apps faster with AppDynamics >>>> Download AppDynamics Lite for free today: >>>> http://p.sf.net/sfu/appdyn_sfd2d_oct >>>> _______________________________________________ >>>> Cppcms-users mailing list >>> > Cpp...@li... <mailto:Cpp...@li...> >>> >>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>>> >>>> >>>> -- >>>> -- >>>> lee >>>> Lee Elenbaas >>> > lee...@gm... <mailto:lee...@gm...> >>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Everyone hates slow websites. So do we. >>>> Make your web apps faster with AppDynamics >>>> Download AppDynamics Lite for free today: >>>> http://p.sf.net/sfu/appdyn_sfd2d_oct >>>> >>>> >>>> _______________________________________________ >>>> Cppcms-users mailing list >>>> Cpp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>>-----BEGIN PGP SIGNATURE----- >>>Version: GnuPG v1.4.12 (GNU/Linux) >>>Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ >>> >>>iQIcBAEBAgAGBQJQkN3JAAoJEIROXYQnkAHpqZsP/3kmWyN5la134Ckc62Zc02F5 >>>LlOKQ5RHmtOcKBxRj78xUSukmGVzwnM3tVe/JnRbnQYo+SFf5n/zl74s3PfzBKp6 >>>CNSEltKObhrhCnRTc1kwCdvXzHi1SNfyXDhwRIkrnLC8PKcWa1DfcwV3VZdvVWRE >>>0XTNDMIc3SbOjuQCWNbnsTsWoGV5o7U5ZeUv9fTqAWCL0w7FQIfn3uSt+d/AqvM7 >>>rVCIxbDs96sunEyEerH0jc1atHmxRWtCPtZdosISgZOKuea72710MrRZ3zpPzWsb >>>9CCIzh0Yo+l+fRAcGKej0VYAuH+i5DC+OrbBCQryukTynp6JjvUnZxOYeSbAj5Ro >>>n3uzY/oatB4br/RjKLZGN3TW6fxz0ZMvNujoRgV5+25mRXyd7Z+nfgpbRDpjVgVL >>>5BQotc+fboPvtANYiF9K6YZjGr82w9yMc95pO2d8x6CEtd7bbLroGSSc3pjNO0rC >>>Cb5D0oW8dM8ivgUz6jR42ud7nwd8OtXaIk+UkIoWswpe1t6P/sKzZyD0awmisqaN >>>bRRZL70mXeAZBQz4bpCPN3br2WhdbbWOR5Fzf/5NhosB/wtQfaWLnRGmIj6e+HOj >>>VxuHzuZVjPlBmVTzdxtKN6fJwTeT3CvOmM9naT/zhvlbBu0uTgFpikgBNVeUUf9I >>>oBlR6SgfrgiC2BuFfgb/ >>>=4nhe >>>-----END PGP SIGNATURE----- >>> >>> >>>------------------------------------------------------------------------------ >>>Everyone hates slow websites. So do we. >>>Make your web apps faster with AppDynamics >>>Download AppDynamics Lite for free today: >>>http://p.sf.net/sfu/appdyn_sfd2d_oct >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >> >> >> >>-- >>-- >>lee >>Lee Elenbaas >>lee...@gm... >> >> >> >> >> >>-- >>-- >>lee >>Lee Elenbaas >>lee...@gm... >> >> > > >-- >-- >lee >Lee Elenbaas >lee...@gm... > > > > |
From: Marcel H. <ke...@co...> - 2012-10-31 14:20:12
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 31.10.2012 15:15, schrieb Daniel Rios: > Thanks Artyom, it worked perfectly :) > > Now following the json example, Im trying to publish the content using: > > my_object.save(response.out(),cppcms::json::compact); > > Everything seems ok, but looking at the output type it shows: text/html > > but, it needs to be: text/javascript > > How can I do that? http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1response.html#a8fb156db7d2b0350fb6fee9ce9d300be > Daniel Regards > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQkTOPAAoJEIROXYQnkAHpGrgP/2FcqG3xSWwSTqwqJxNBrFiq XxVOUvzlQjKM+a5QMWkncv0R2S4clq75wfnZU03iutbJn7FG94RHv5ZdyQ5xt5/s l7LQy7h5tgVUcS78eM/t+AXYuNi75nGT9vs7ZI4OVyiO5a4mtkngDs61gS1T/HwW /FJauPYec0Ud74Vx/T3n8DTm36EHAcNP+Hv3L94NsjCUhrkmqUPLjmW/lQ9/fpp5 n6RXLdM/gEQBCHJwdV+4hMiJPVjCFG2jUGe6F4mKylLBb7v3uxM2c7Sf7naxQLmk 8McEYcTVZ8hJfvfrqB1xCH4a7XYnZVbV1CBduimvp4h7EfXKWBkLykTUP9c7i2Ad /lRVIcD9LZKc21uAWYHV0ozmowPM4nkVGxfwQzr7J6M2PDkIgZqw70XmpyDNduAa Xwh81k4QLGRSct4wPnrc5oYuzt73c+7PwCLSXLgbBQYWAORkAtTuW7WoQTyd3cQ1 IKbFR7xOFtu4gpo8G7jnQVFxsuzfzN+OHRCEyLq/xiNXoBMcrUKS2Jobqyr/sO/6 L0IeR6qLdEuBED9JPRqWoQBVIkVcZCpT5gLOt05kYERQFXj6Syg5trglHYSofRZD SYh/PzRD8bO0lXtS83zsIEEz4LaGe3SC9GVZLi3NZYCpTbrRM04Og8+4Vq7eAfKY vqdrT4fJG3mW8r4kJ1P6 =eHK0 -----END PGP SIGNATURE----- |
From: Daniel R. <dan...@li...> - 2012-10-31 14:15:33
|
Thanks Artyom, it worked perfectly :) Now following the json example, Im trying to publish the content using: my_object.save(response.out(),cppcms::json::compact); Everything seems ok, but looking at the output type it shows: text/html but, it needs to be: text/javascript How can I do that? Daniel |
From: Artyom B. <art...@ya...> - 2012-10-31 09:43:22
|
>________________________________ > From: Pinakee Biswas <pi...@vv...> >To: cpp...@li... >Cc: 'Artyom Beilis' <art...@ya...> >Sent: Wednesday, October 31, 2012 11:22 AM >Subject: Re: [Cppcms-users] C++ Web framework > > >Hi, > >Kind of transferring byte array through HTTP – some of the well known methods like Progressive download, adaptive streaming and 3GPP DASH. > see one of the good things in CppCMS HTTP (and all other protocols) that you for example can get a feedback about transfering. CppCMS asychrnonous application can receive completion notification on data trasfer and thus for example postpone or change stream parameters according to the performance. Also, the same is valid for syncrhonous operations. i.e. if you write to output stream you can get blocked until operation completes and very the transfer parameters. So you can do whatever you feel is right. Using any of the protocols. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Artyom B. <art...@ya...> - 2012-10-31 09:32:25
|
----- Original Message ----- > From: Pinakee Biswas <pi...@vv...> > To: 'Artyom Beilis' <art...@ya...>; cpp...@li... > Cc: > Sent: Wednesday, October 31, 2012 11:11 AM > Subject: Re: [Cppcms-users] C++ Web framework > > Hi Artyom, > > Thanks for the prompt response. > > I was in fact looking for a framework to develop http streaming server for > our video portal. I was wondering if CppCMS would be the right choice for > the same. > > Thanks, > Pinakee > First of all you can do it without problems, you can actually use internal HTTP server to do this. In both synchronous and asynchonous manner, you can for example hande several hundreds of simultaniuos connections using asynchronous applications. You can also do it via FastCGI, SCGI or use reverse HTTP Proxy. Of course for static content it would better to use real web server. What I can recommend is to use combination of X-Send-File, X-Send-Range and lighttpd to give lighttpd information about what to send. If you are planning to serve everything via CppCMS HTTP server it is not good idea, but I don't see specific problem in video streaming. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Pinakee B. <pi...@vv...> - 2012-10-31 09:23:20
|
Hi, Kind of transferring byte array through HTTP – some of the well known methods like Progressive download, adaptive streaming and 3GPP DASH. Regards, Pinakee From: 陈抒 [mailto:csf...@gm...] Sent: 31 October 2012 14:46 To: cpp...@li... Cc: Artyom Beilis Subject: Re: [Cppcms-users] C++ Web framework Do you mean you want to transfer the byte array(BLOB) via HTTP? I just tried google protocolBuffer with CppCMS. It worked. 陈抒 Best regards http://blog.csdn.net/sheismylife On Wed, Oct 31, 2012 at 5:11 PM, Pinakee Biswas <pi...@vv...> wrote: Hi Artyom, Thanks for the prompt response. I was in fact looking for a framework to develop http streaming server for our video portal. I was wondering if CppCMS would be the right choice for the same. Thanks, Pinakee -----Original Message----- From: Artyom Beilis [mailto:art...@ya...] Sent: 31 October 2012 14:20 To: cpp...@li... Subject: Re: [Cppcms-users] C++ Web framework >________________________________ > From: Pinakee Biswas <pi...@vv...> >To: cpp...@li... > >Hi, > >I have been a C/C++ developer for more than a decade and it is really great to see a web framework in C++. We are building a http based streaming server and I have been searching for a high performing web server/framework supporting C/C++ and I came across cppcms. >I have following queries: > >1. Is this just a web framework or does it also come with > a web server? I mean do we need a separate web server to process http? It comes with built-in web server that is mostly designed for embedded applications and debugging purposes. For high load web sites and web sites in general it is recommended to deploy the CppCMS application via FastCGI or SCGI behind web servers like Lighttpd or Nginx. >2. How is this compared to high performing web servers like Nginx? In terms of serving static files or being feature rich obviously nginx and lighttpd are way better. In terms of the application of course for "hello world" like applications the internal web server would eliminate an additional IPC and be faster but in real world the are no significant drawbacks running behind full-featured web servers. In fact all production deployments of web sites running CppCMS I'm aware of run behind lighttpd or nginx. >3. Has this been deployed anywhere for a high performing web with live traffic? > First of all: http://cppcms.com/wikipp/en/page/who_uses One of the systems that I developed for one of my clients provides services for one of the leaning news web site on some local market. I can't provide more details right now, but very soon much more information will be available publicly. >We would really appreciate if you could please let us know about the above. > >Looking forward to your response and support...> >Thanks, >Pinakee Biswas >Director & CTO > >Just watch it ! > Regards, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ---------------------------------------------------------------------------- -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Shiv S. D. <shi...@gm...> - 2012-10-31 09:22:12
|
A video streaming server will be bound by high disk I/O because certainly you cannot keep all the data in memory. The second aspect is whether you want users to upload their video. If yes then what formats will you support? If you support multiple formats and stream one then you need to convert them. Now conversion needs lots of CPU and RAM so certainly CppCMS seems an excellent choice in this case. On Wed, Oct 31, 2012 at 2:46 PM, 陈抒 <csf...@gm...> wrote: > Do you mean you want to transfer the byte array(BLOB) via HTTP? > I just tried google protocolBuffer with CppCMS. > It worked. > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > > On Wed, Oct 31, 2012 at 5:11 PM, Pinakee Biswas <pi...@vv...>wrote: > >> Hi Artyom, >> >> Thanks for the prompt response. >> >> I was in fact looking for a framework to develop http streaming server for >> our video portal. I was wondering if CppCMS would be the right choice for >> the same. >> >> Thanks, >> Pinakee >> >> >> >> -----Original Message----- >> From: Artyom Beilis [mailto:art...@ya...] >> Sent: 31 October 2012 14:20 >> To: cpp...@li... >> Subject: Re: [Cppcms-users] C++ Web framework >> >> >> >> >> >________________________________ >> > From: Pinakee Biswas <pi...@vv...> >> >To: cpp...@li... >> > >> >Hi, >> > >> >I have been a C/C++ developer for more than a decade and it is really >> great >> to see a web framework in C++. We are building a http based streaming >> server >> and I have been searching for a high performing web server/framework >> supporting C/C++ and I came across cppcms. >> >I have following queries: >> > >> >> >1. Is this just a web framework or does it also come with >> > a web server? I mean do we need a separate web server to process http? >> >> >> It comes with built-in web server that is mostly designed for embedded >> applications and debugging purposes. >> >> For high load web sites and web sites in general it is recommended to >> deploy >> the CppCMS application via FastCGI or SCGI behind web servers like >> Lighttpd >> or Nginx. >> >> >> >> >2. How is this compared to high performing web servers like Nginx? >> >> In terms of serving static files or being feature rich obviously nginx and >> lighttpd are way better. >> >> In terms of the application of course for "hello world" like applications >> the internal web server would eliminate an additional IPC and be faster >> but >> in real world the are no significant drawbacks running behind >> >> full-featured web servers. >> >> In fact all production deployments of web sites running CppCMS I'm aware >> of >> run behind lighttpd or nginx. >> >> >> >> >3. Has this been deployed anywhere for a high performing web with >> live traffic? >> > >> >> First of all: >> >> >> http://cppcms.com/wikipp/en/page/who_uses >> >> >> One of the systems that I developed for one of my clients provides >> services >> for one of the leaning news web site on some local market. >> >> >> I can't provide more details right now, but very >> >> soon much more information will be available publicly. >> >> >> >> >We would really appreciate if you could please let us know about the >> above. >> > >> >Looking forward to your response and support...> >> >> >Thanks, >> >Pinakee Biswas >> >Director & CTO >> > >> >Just watch it ! >> > >> >> Regards, >> >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL >> Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> ---------------------------------------------------------------------------- >> -- >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics Download AppDynamics Lite for >> free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Best regards, Shiv Shankar Dayal |
From: 陈抒 <csf...@gm...> - 2012-10-31 09:16:31
|
Do you mean you want to transfer the byte array(BLOB) via HTTP? I just tried google protocolBuffer with CppCMS. It worked. 陈抒 Best regards http://blog.csdn.net/sheismylife On Wed, Oct 31, 2012 at 5:11 PM, Pinakee Biswas <pi...@vv...>wrote: > Hi Artyom, > > Thanks for the prompt response. > > I was in fact looking for a framework to develop http streaming server for > our video portal. I was wondering if CppCMS would be the right choice for > the same. > > Thanks, > Pinakee > > > > -----Original Message----- > From: Artyom Beilis [mailto:art...@ya...] > Sent: 31 October 2012 14:20 > To: cpp...@li... > Subject: Re: [Cppcms-users] C++ Web framework > > > > > >________________________________ > > From: Pinakee Biswas <pi...@vv...> > >To: cpp...@li... > > > >Hi, > > > >I have been a C/C++ developer for more than a decade and it is really > great > to see a web framework in C++. We are building a http based streaming > server > and I have been searching for a high performing web server/framework > supporting C/C++ and I came across cppcms. > >I have following queries: > > > > >1. Is this just a web framework or does it also come with > > a web server? I mean do we need a separate web server to process http? > > > It comes with built-in web server that is mostly designed for embedded > applications and debugging purposes. > > For high load web sites and web sites in general it is recommended to > deploy > the CppCMS application via FastCGI or SCGI behind web servers like Lighttpd > or Nginx. > > > > >2. How is this compared to high performing web servers like Nginx? > > In terms of serving static files or being feature rich obviously nginx and > lighttpd are way better. > > In terms of the application of course for "hello world" like applications > the internal web server would eliminate an additional IPC and be faster but > in real world the are no significant drawbacks running behind > > full-featured web servers. > > In fact all production deployments of web sites running CppCMS I'm aware of > run behind lighttpd or nginx. > > > > >3. Has this been deployed anywhere for a high performing web with > live traffic? > > > > First of all: > > > http://cppcms.com/wikipp/en/page/who_uses > > > One of the systems that I developed for one of my clients provides services > for one of the leaning news web site on some local market. > > > I can't provide more details right now, but very > > soon much more information will be available publicly. > > > > >We would really appreciate if you could please let us know about the > above. > > > >Looking forward to your response and support...> > > >Thanks, > >Pinakee Biswas > >Director & CTO > > > >Just watch it ! > > > > Regards, > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL > Connectivity: http://cppcms.com/sql/cppdb/ > > > ---------------------------------------------------------------------------- > -- > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite for > free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Shiv S. D. <shi...@gm...> - 2012-10-31 09:16:13
|
CppCMS is right choice for everything. :-) On Wed, Oct 31, 2012 at 2:41 PM, Pinakee Biswas <pi...@vv...>wrote: > Hi Artyom, > > Thanks for the prompt response. > > I was in fact looking for a framework to develop http streaming server for > our video portal. I was wondering if CppCMS would be the right choice for > the same. > > Thanks, > Pinakee > > > > -----Original Message----- > From: Artyom Beilis [mailto:art...@ya...] > Sent: 31 October 2012 14:20 > To: cpp...@li... > Subject: Re: [Cppcms-users] C++ Web framework > > > > > >________________________________ > > From: Pinakee Biswas <pi...@vv...> > >To: cpp...@li... > > > >Hi, > > > >I have been a C/C++ developer for more than a decade and it is really > great > to see a web framework in C++. We are building a http based streaming > server > and I have been searching for a high performing web server/framework > supporting C/C++ and I came across cppcms. > >I have following queries: > > > > >1. Is this just a web framework or does it also come with > > a web server? I mean do we need a separate web server to process http? > > > It comes with built-in web server that is mostly designed for embedded > applications and debugging purposes. > > For high load web sites and web sites in general it is recommended to > deploy > the CppCMS application via FastCGI or SCGI behind web servers like Lighttpd > or Nginx. > > > > >2. How is this compared to high performing web servers like Nginx? > > In terms of serving static files or being feature rich obviously nginx and > lighttpd are way better. > > In terms of the application of course for "hello world" like applications > the internal web server would eliminate an additional IPC and be faster but > in real world the are no significant drawbacks running behind > > full-featured web servers. > > In fact all production deployments of web sites running CppCMS I'm aware of > run behind lighttpd or nginx. > > > > >3. Has this been deployed anywhere for a high performing web with > live traffic? > > > > First of all: > > > http://cppcms.com/wikipp/en/page/who_uses > > > One of the systems that I developed for one of my clients provides services > for one of the leaning news web site on some local market. > > > I can't provide more details right now, but very > > soon much more information will be available publicly. > > > > >We would really appreciate if you could please let us know about the > above. > > > >Looking forward to your response and support...> > > >Thanks, > >Pinakee Biswas > >Director & CTO > > > >Just watch it ! > > > > Regards, > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL > Connectivity: http://cppcms.com/sql/cppdb/ > > > ---------------------------------------------------------------------------- > -- > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite for > free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Best regards, Shiv Shankar Dayal |
From: Shiv S. D. <shi...@gm...> - 2012-10-31 09:15:32
|
Hi Artyom, I have written a db pool which creates given no. of persistent connections and also dynamically increases connections. Say I create the pool globally and in the code where dispatcher calls functions which perform actual business logic I acquire one connection. Is it guaranteed that connections will execute in multi-threaded fashion. I have taken care in my db pool that it is thread-safe. On Wed, Oct 24, 2012 at 9:25 PM, Shiv Shankar Dayal < shi...@gm...> wrote: > No it is not SQL. It seems I will have to modify backend.h and write my > own driver. :-) > > > On Wed, Oct 24, 2012 at 7:48 AM, Artyom Beilis <art...@ya...>wrote: > >> I'm not familiar with the API of Hypertable but I assume it is not SQL :-) >> >> In any case implementing CppCMS backends is not hard as long as you >> familiar with specific >> library API. >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> ------------------------------ >> *From:* Shiv Shankar Dayal <shi...@gm...> >> *To:* Artyom Beilis <art...@ya...>; >> cpp...@li... >> *Sent:* Tuesday, October 23, 2012 8:14 PM >> >> *Subject:* Re: [Cppcms-users] DB connection pooling >> >> Hi, >> >> Is it simple to do write a backend driver based on what is available for >> Hypertable? >> >> On Tue, Oct 23, 2012 at 10:19 PM, Artyom Beilis <art...@ya...>wrote: >> >> Using cppdb you only need to add a small parameter to connection string >> to enable connection pooling. >> It would automatically use a pool withing a special singleton. >> >> Usually you don't need to use the pool class directly. >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> ------------------------------ >> *From:* Lee Elenbaas <lee...@gm...> >> *To:* cpp...@li... >> *Sent:* Tuesday, October 23, 2012 5:33 PM >> *Subject:* Re: [Cppcms-users] DB connection pooling >> >> I have not used cppDB yet - aside from some testing - but if you look at >> its API, it comes with a pool class, >> >> just hold an instance of that pool in your app, and use it whenever you >> need a connection >> you can pass a shared_ptr around for it - or just store it in a single >> place. >> >> but this is not part of the cppcms framework itself, and i have no idea >> how the pool will handle multiple threads requesting a connection at the >> same time - perhaps Artyom could answer that >> >> On Mon, Oct 22, 2012 at 3:47 PM, Shiv Shankar Dayal < >> shi...@gm...> wrote: >> >> Agreed. So where do I put my DB connection pool? As mentioned in >> documentation "The CppCMS service has a simple design of a single event >> loop and a thread pool that handles actual user application responses." >> this means on outer side there is an event-based design and internally >> there is a thread pool. Therefore I draw a conclusion that I need a thread >> based pool and once the application is mounted and a factory object is >> created right where I hit first db query I should use one connection from >> pool. >> >> >> On Mon, Oct 22, 2012 at 6:30 PM, Lee Elenbaas <lee...@gm...>wrote: >> >> I fail to see the connection between the application being asynchronious >> and the DB connections being pooled >> >> if you need to do several things with the same DB at the same time (or >> simply in different threads) >> you need several DB connections - you can choose to pool them - and this >> way reuse them >> >> both synchronious and asynchronious applications can handle multiple >> threads - so both need some way of using db connections - and a pool is one >> good way to do that >> >> On Mon, Oct 22, 2012 at 2:22 PM, Shiv Shankar Dayal < >> shi...@gm...> wrote: >> >> Hi, >> Consider the following piece of documentation >> If the application that handles it is a synchronous application, its >> execution is passed to the *thread pool*. The user application prepares >> the response and sends it synchronously to the client and the context is >> destroyed, completing the "requst/response" cycle. >> If the application is asynchronous, the HTTP Context remains inside the >> event loop's thread and it is handled by the asynchronous application. This >> application may decide to complete the response immediately or postpone it >> by implementing, for example, long polling. >> and following code >> >> 1. int main(int argc,char ** argv) >> 2. { >> 3. try { >> 4. cppcms::service srv(argc,argv); >> 5. srv.applications_pool().mount( >> 6. cppcms::applications_factory<hello>() >> 7. ); >> >> now as it is also written that applications are asynchronous what is the >> need of more that one database connection. Is it the case that one >> persistent connection will suffice? >> -- >> Best regards, >> Shiv Shankar Dayal >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> -- >> -- >> lee >> Lee Elenbaas >> lee...@gm... >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> -- >> Best regards, >> Shiv Shankar Dayal >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> -- >> -- >> lee >> Lee Elenbaas >> lee...@gm... >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> -- >> Best regards, >> Shiv Shankar Dayal >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > > > -- > Best regards, > Shiv Shankar Dayal > -- Best regards, Shiv Shankar Dayal |
From: Pinakee B. <pi...@vv...> - 2012-10-31 09:12:23
|
Hi Artyom, Thanks for the prompt response. I was in fact looking for a framework to develop http streaming server for our video portal. I was wondering if CppCMS would be the right choice for the same. Thanks, Pinakee -----Original Message----- From: Artyom Beilis [mailto:art...@ya...] Sent: 31 October 2012 14:20 To: cpp...@li... Subject: Re: [Cppcms-users] C++ Web framework >________________________________ > From: Pinakee Biswas <pi...@vv...> >To: cpp...@li... > >Hi, > >I have been a C/C++ developer for more than a decade and it is really great to see a web framework in C++. We are building a http based streaming server and I have been searching for a high performing web server/framework supporting C/C++ and I came across cppcms. >I have following queries: > >1. Is this just a web framework or does it also come with > a web server? I mean do we need a separate web server to process http? It comes with built-in web server that is mostly designed for embedded applications and debugging purposes. For high load web sites and web sites in general it is recommended to deploy the CppCMS application via FastCGI or SCGI behind web servers like Lighttpd or Nginx. >2. How is this compared to high performing web servers like Nginx? In terms of serving static files or being feature rich obviously nginx and lighttpd are way better. In terms of the application of course for "hello world" like applications the internal web server would eliminate an additional IPC and be faster but in real world the are no significant drawbacks running behind full-featured web servers. In fact all production deployments of web sites running CppCMS I'm aware of run behind lighttpd or nginx. >3. Has this been deployed anywhere for a high performing web with live traffic? > First of all: http://cppcms.com/wikipp/en/page/who_uses One of the systems that I developed for one of my clients provides services for one of the leaning news web site on some local market. I can't provide more details right now, but very soon much more information will be available publicly. >We would really appreciate if you could please let us know about the above. > >Looking forward to your response and support...> >Thanks, >Pinakee Biswas >Director & CTO > >Just watch it ! > Regards, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ---------------------------------------------------------------------------- -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2012-10-31 08:49:46
|
>________________________________ > From: Pinakee Biswas <pi...@vv...> >To: cpp...@li... > >Hi, > >I have been a C/C++ developer for more than a decade and it is really great to see a web framework in C++. We are building a http based streaming server and I have been searching for a high performing web server/framework supporting C/C++ and I came across cppcms. >I have following queries: > >1. Is this just a web framework or does it also come with > a web server? I mean do we need a separate web server to process http? It comes with built-in web server that is mostly designed for embedded applications and debugging purposes. For high load web sites and web sites in general it is recommended to deploy the CppCMS application via FastCGI or SCGI behind web servers like Lighttpd or Nginx. >2. How is this compared to high performing web servers like Nginx? In terms of serving static files or being feature rich obviously nginx and lighttpd are way better. In terms of the application of course for "hello world" like applications the internal web server would eliminate an additional IPC and be faster but in real world the are no significant drawbacks running behind full-featured web servers. In fact all production deployments of web sites running CppCMS I'm aware of run behind lighttpd or nginx. >3. Has this been deployed anywhere for a high performing web with live traffic? > First of all: http://cppcms.com/wikipp/en/page/who_uses One of the systems that I developed for one of my clients provides services for one of the leaning news web site on some local market. I can't provide more details right now, but very soon much more information will be available publicly. >We would really appreciate if you could please let us know about the above. > >Looking forward to your response and support...> >Thanks, >Pinakee Biswas >Director & CTO > >Just watch it ! > Regards, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Marcel H. <ke...@co...> - 2012-10-31 08:14:12
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 31.10.2012 08:29, schrieb Lee Elenbaas: > Any chance that cppcms under C++11 will support the syntax: > > my_object["name"]=nullptr; I don't see any arguments against this. Write a patch and commit it via sourceforge. Artyom will respond you if he thinks it is worth to implement. > > On Wed, Oct 31, 2012 at 9:09 AM, Artyom Beilis <art...@ya... <mailto:art...@ya...>> wrote: > > my_object["name"]=cppcms::json::null(); > > http://cppcms.com/cppcms_ref/latest/structcppcms_1_1json_1_1null.html > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------- > *From:* Daniel Rios <dan...@li... <mailto:dan...@li...>> > *To:* cppcms <cpp...@li... <mailto:cpp...@li...>> > *Sent:* Wednesday, October 31, 2012 <tel:2012> 3:18 AM > *Subject:* [Cppcms-users] Set a null value on JSON without quotes > > Hello there ! I've need to set a null value on JSON without quotes, I've tried the following: > > my_object["name"] = NULL; > my_object["name"] = "null"; > > On the first case I've got "my_object": 0 and then "my_object":"null" > > But I've need "my_object":null > > Any clue ? > > Daniel > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... <mailto:Cpp...@li...> > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... <mailto:Cpp...@li...> > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > -- > lee > Lee Elenbaas > lee...@gm... <mailto:lee...@gm...> > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQkN3JAAoJEIROXYQnkAHpqZsP/3kmWyN5la134Ckc62Zc02F5 LlOKQ5RHmtOcKBxRj78xUSukmGVzwnM3tVe/JnRbnQYo+SFf5n/zl74s3PfzBKp6 CNSEltKObhrhCnRTc1kwCdvXzHi1SNfyXDhwRIkrnLC8PKcWa1DfcwV3VZdvVWRE 0XTNDMIc3SbOjuQCWNbnsTsWoGV5o7U5ZeUv9fTqAWCL0w7FQIfn3uSt+d/AqvM7 rVCIxbDs96sunEyEerH0jc1atHmxRWtCPtZdosISgZOKuea72710MrRZ3zpPzWsb 9CCIzh0Yo+l+fRAcGKej0VYAuH+i5DC+OrbBCQryukTynp6JjvUnZxOYeSbAj5Ro n3uzY/oatB4br/RjKLZGN3TW6fxz0ZMvNujoRgV5+25mRXyd7Z+nfgpbRDpjVgVL 5BQotc+fboPvtANYiF9K6YZjGr82w9yMc95pO2d8x6CEtd7bbLroGSSc3pjNO0rC Cb5D0oW8dM8ivgUz6jR42ud7nwd8OtXaIk+UkIoWswpe1t6P/sKzZyD0awmisqaN bRRZL70mXeAZBQz4bpCPN3br2WhdbbWOR5Fzf/5NhosB/wtQfaWLnRGmIj6e+HOj VxuHzuZVjPlBmVTzdxtKN6fJwTeT3CvOmM9naT/zhvlbBu0uTgFpikgBNVeUUf9I oBlR6SgfrgiC2BuFfgb/ =4nhe -----END PGP SIGNATURE----- |
From: Lee E. <lee...@gm...> - 2012-10-31 07:29:27
|
Any chance that cppcms under C++11 will support the syntax: my_object["name"]=nullptr; On Wed, Oct 31, 2012 at 9:09 AM, Artyom Beilis <art...@ya...> wrote: > my_object["name"]=cppcms::json::null(); > > http://cppcms.com/cppcms_ref/latest/structcppcms_1_1json_1_1null.html > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Daniel Rios <dan...@li...> > *To:* cppcms <cpp...@li...> > *Sent:* Wednesday, October 31, 2012 3:18 AM > *Subject:* [Cppcms-users] Set a null value on JSON without quotes > > Hello there ! I've need to set a null value on JSON without quotes, I've > tried the following: > > my_object["name"] = NULL; > my_object["name"] = "null"; > > On the first case I've got "my_object": 0 and then "my_object":"null" > > But I've need "my_object":null > > Any clue ? > > Daniel > > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- -- lee Lee Elenbaas lee...@gm... |
From: Artyom B. <art...@ya...> - 2012-10-31 07:09:45
|
my_object["name"]=cppcms::json::null(); http://cppcms.com/cppcms_ref/latest/structcppcms_1_1json_1_1null.html Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Daniel Rios <dan...@li...> >To: cppcms <cpp...@li...> >Sent: Wednesday, October 31, 2012 3:18 AM >Subject: [Cppcms-users] Set a null value on JSON without quotes > > > >Hello there ! I've need to set a null value on JSON without quotes, I've tried the following: > > >my_object["name"] = NULL; >my_object["name"] = "null"; > > >On the first case I've got "my_object": 0 and then "my_object":"null" > > >But I've need "my_object":null > > >Any clue ? > > >Daniel > > > > > > > > >------------------------------------------------------------------------------ >Everyone hates slow websites. So do we. >Make your web apps faster with AppDynamics >Download AppDynamics Lite for free today: >http://p.sf.net/sfu/appdyn_sfd2d_oct >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Daniel R. <dan...@li...> - 2012-10-31 01:18:11
|
Hello there ! I've need to set a null value on JSON without quotes, I've tried the following: my_object["name"] = NULL; my_object["name"] = "null"; On the first case I've got "my_object": 0 and then "my_object":"null" But I've need "my_object":null Any clue ? Daniel |
From: Marcel H. <ke...@co...> - 2012-10-28 15:52:20
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 28.10.2012 16:14, schrieb Alexey Omelchenko: > Hi all, > > I have compiled Hello sampe from the Tutorial. > Under root it runs perfectly. > Under non root user it gets exception in srv.run(): "system: Permission denied". > What might I have missed? > maybe a port problem? Everything under (I thin) 1024 is reserved and only accessable for root applications. Try something like 12345 or so. > Thanks, > Alexey. Regards Marcel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQjVD4AAoJEIROXYQnkAHpsVAP/jkwM4g7aRgvt9hRepriz+NO Gb8nzFMHgMTIbMFj9DUwlH3euPvULN67egoJpx6mEW6owy+QWnrtLQGAhvn4/eWm R3Gb6/gA9XSGVSzItblwCdohiZEVWo5et755m63sS0CfwdqEYjVcbRnlk5hp4odH 0Yqq61FcQXCPdYbnT+1zXx7PBj2vNPMvbxT1t3MnXRBNnB1OzbdlRbhCLqHsur4J 0fQ9o2l0bsV/ruzxj0dRcCOiktTfWxnvxcUdxLNKm8+ZvJwYes1wilqx7qIhWpWy r2o4GLSzL10g5Y7fv2TaZiOzz8fHiO2YZn0TfkASxUzPSwIuCqyF1b6WnWn5TRLT eCUjOqmEpxvsRAdIodfLRSXfiHE/Ya0cYJ9J852mnM/5Ss7Urlslr1OhabEw3h+r 6bIeMSSKcaOgtp0xT/aI5RvymOik6QkB9cudccxpQXFJm9+yDC4w1tKHnZmlfsSI vhvjxp1pu+R2Y9kMlJqO4PFeV943VfYymb+/us4IYyOIMi2bUrS92kh6iBNIXqbm Ho0llfSblBLK4y17S7ludmYzpp/udCB5CWqCc3qgkMYivhUyMfKg4g9qJ2oQwQkw K4Z7tvFFmuzQwscKyyiNgt5IBW0pgA8XDVI0ZOzmie1cOl4vmL4weLKgAcyz7yg2 UdeO2VDv/AsQYtXWTPYL =ev4i -----END PGP SIGNATURE----- |
From: Alexey O. <aom...@gm...> - 2012-10-28 15:15:05
|
Hi all, I have compiled Hello sampe from the Tutorial. Under root it runs perfectly. Under non root user it gets exception in srv.run(): "system: Permission denied". What might I have missed? Thanks, Alexey. |
From: Shiv S. D. <shi...@gm...> - 2012-10-24 15:55:49
|
No it is not SQL. It seems I will have to modify backend.h and write my own driver. :-) On Wed, Oct 24, 2012 at 7:48 AM, Artyom Beilis <art...@ya...> wrote: > I'm not familiar with the API of Hypertable but I assume it is not SQL :-) > > In any case implementing CppCMS backends is not hard as long as you > familiar with specific > library API. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Shiv Shankar Dayal <shi...@gm...> > *To:* Artyom Beilis <art...@ya...>; > cpp...@li... > *Sent:* Tuesday, October 23, 2012 8:14 PM > > *Subject:* Re: [Cppcms-users] DB connection pooling > > Hi, > > Is it simple to do write a backend driver based on what is available for > Hypertable? > > On Tue, Oct 23, 2012 at 10:19 PM, Artyom Beilis <art...@ya...>wrote: > > Using cppdb you only need to add a small parameter to connection string > to enable connection pooling. > It would automatically use a pool withing a special singleton. > > Usually you don't need to use the pool class directly. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Lee Elenbaas <lee...@gm...> > *To:* cpp...@li... > *Sent:* Tuesday, October 23, 2012 5:33 PM > *Subject:* Re: [Cppcms-users] DB connection pooling > > I have not used cppDB yet - aside from some testing - but if you look at > its API, it comes with a pool class, > > just hold an instance of that pool in your app, and use it whenever you > need a connection > you can pass a shared_ptr around for it - or just store it in a single > place. > > but this is not part of the cppcms framework itself, and i have no idea > how the pool will handle multiple threads requesting a connection at the > same time - perhaps Artyom could answer that > > On Mon, Oct 22, 2012 at 3:47 PM, Shiv Shankar Dayal < > shi...@gm...> wrote: > > Agreed. So where do I put my DB connection pool? As mentioned in > documentation "The CppCMS service has a simple design of a single event > loop and a thread pool that handles actual user application responses." > this means on outer side there is an event-based design and internally > there is a thread pool. Therefore I draw a conclusion that I need a thread > based pool and once the application is mounted and a factory object is > created right where I hit first db query I should use one connection from > pool. > > > On Mon, Oct 22, 2012 at 6:30 PM, Lee Elenbaas <lee...@gm...>wrote: > > I fail to see the connection between the application being asynchronious > and the DB connections being pooled > > if you need to do several things with the same DB at the same time (or > simply in different threads) > you need several DB connections - you can choose to pool them - and this > way reuse them > > both synchronious and asynchronious applications can handle multiple > threads - so both need some way of using db connections - and a pool is one > good way to do that > > On Mon, Oct 22, 2012 at 2:22 PM, Shiv Shankar Dayal < > shi...@gm...> wrote: > > Hi, > Consider the following piece of documentation > If the application that handles it is a synchronous application, its > execution is passed to the *thread pool*. The user application prepares > the response and sends it synchronously to the client and the context is > destroyed, completing the "requst/response" cycle. > If the application is asynchronous, the HTTP Context remains inside the > event loop's thread and it is handled by the asynchronous application. This > application may decide to complete the response immediately or postpone it > by implementing, for example, long polling. > and following code > > 1. int main(int argc,char ** argv) > 2. { > 3. try { > 4. cppcms::service srv(argc,argv); > 5. srv.applications_pool().mount( > 6. cppcms::applications_factory<hello>() > 7. ); > > now as it is also written that applications are asynchronous what is the > need of more that one database connection. Is it the case that one > persistent connection will suffice? > -- > Best regards, > Shiv Shankar Dayal > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > -- > lee > Lee Elenbaas > lee...@gm... > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > Best regards, > Shiv Shankar Dayal > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > -- > lee > Lee Elenbaas > lee...@gm... > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > Best regards, > Shiv Shankar Dayal > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Best regards, Shiv Shankar Dayal |
From: Artyom B. <art...@ya...> - 2012-10-24 14:48:26
|
I'm not familiar with the API of Hypertable but I assume it is not SQL :-) In any case implementing CppCMS backends is not hard as long as you familiar with specific library API. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Shiv Shankar Dayal <shi...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Tuesday, October 23, 2012 8:14 PM >Subject: Re: [Cppcms-users] DB connection pooling > > >Hi, > >Is it simple to do write a backend driver based on what is available for Hypertable? > > >On Tue, Oct 23, 2012 at 10:19 PM, Artyom Beilis <art...@ya...> wrote: > >Using cppdb you only need to add a small parameter to connection string to enable connection pooling. >>It would automatically use a pool withing a special singleton. >> >> >>Usually you don't need to use the pool class directly. >> >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: Lee Elenbaas <lee...@gm...> >>>To: cpp...@li... >>>Sent: Tuesday, October 23, 2012 5:33 PM >>>Subject: Re: [Cppcms-users] DB connection pooling >>> >>> >>> >>>I have not used cppDB yet - aside from some testing - but if you look at its API, it comes with a pool class, >>> >>> >>>just hold an instance of that pool in your app, and use it whenever you need a connection >>>you can pass a shared_ptr around for it - or just store it in a single place. >>> >>> >>>but this is not part of the cppcms framework itself, and i have no idea how the pool will handle multiple threads requesting a connection at the same time - perhaps Artyom could answer that >>> >>> >>>On Mon, Oct 22, 2012 at 3:47 PM, Shiv Shankar Dayal <shi...@gm...> wrote: >>> >>>Agreed. So where do I put my DB connection pool? As mentioned in documentation "The CppCMS service has a simple design of a single event loop and a thread pool that handles actual user application responses." this means on outer side there is an event-based design and internally there is a thread pool. Therefore I draw a conclusion that I need a thread based pool and once the application is mounted and a factory object is created right where I hit first db query I should use one connection from pool. >>>> >>>> >>>> >>>>On Mon, Oct 22, 2012 at 6:30 PM, Lee Elenbaas <lee...@gm...> wrote: >>>> >>>>I fail to see the connection between the application being asynchronious and the DB connections being pooled >>>>> >>>>> >>>>>if you need to do several things with the same DB at the same time (or simply in different threads) >>>>>you need several DB connections - you can choose to pool them - and this way reuse them >>>>> >>>>> >>>>>both synchronious and asynchronious applications can handle multiple threads - so both need some way of using db connections - and a pool is one good way to do that >>>>> >>>>> >>>>>On Mon, Oct 22, 2012 at 2:22 PM, Shiv Shankar Dayal <shi...@gm...> wrote: >>>>> >>>>>Hi, >>>>>> >>>>>>Consider the following piece of documentation >>>>>> >>>>>>If the application that handles it is a synchronous application, its execution is passed to the thread pool. The user application prepares the response and sends it synchronously to the client and the context is destroyed, completing the "requst/response" cycle. >>>>>>If the application is asynchronous, the HTTP Context remains inside the event loop's thread and it is handled by the asynchronous application. This application may decide to complete the response immediately or postpone it by implementing, for example, long polling.and following code >>>>>> >>>>>> 1. int main(int argc,char ** argv) >>>>>> 2. { >>>>>> 3. try { >>>>>> 4. cppcms::service srv(argc,argv); >>>>>> >>>>>> 5. srv.applications_pool().mount( >>>>>> 6. cppcms::applications_factory<hello>() >>>>>> 7. ); >>>>>> >>>>>>now as it is also written that applications are asynchronous what is the need of more that one database connection. Is it the case that one persistent connection will suffice? >>>>>>-- >>>>>>Best regards, >>>>>>Shiv Shankar Dayal >>>>>> >>>>>>------------------------------------------------------------------------------ >>>>>>Everyone hates slow websites. So do we. >>>>>>Make your web apps faster with AppDynamics >>>>>>Download AppDynamics Lite for free today: >>>>>>http://p.sf.net/sfu/appdyn_sfd2d_oct >>>>>>_______________________________________________ >>>>>>Cppcms-users mailing list >>>>>>Cpp...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>-- >>>>>lee >>>>>Lee Elenbaas >>>>>lee...@gm... >>>>> >>>>> >>>>>------------------------------------------------------------------------------ >>>>>Everyone hates slow websites. So do we. >>>>>Make your web apps faster with AppDynamics >>>>>Download AppDynamics Lite for free today: >>>>>http://p.sf.net/sfu/appdyn_sfd2d_oct >>>>>_______________________________________________ >>>>>Cppcms-users mailing list >>>>>Cpp...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>> >>>>> >>>> >>>> >>>>-- >>>>Best regards, >>>>Shiv Shankar Dayal >>>> >>>>------------------------------------------------------------------------------ >>>>Everyone hates slow websites. So do we. >>>>Make your web apps faster with AppDynamics >>>>Download AppDynamics Lite for free today: >>>>http://p.sf.net/sfu/appdyn_sfd2d_oct >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>> >>> >>> >>>-- >>>-- >>>lee >>>Lee Elenbaas >>>lee...@gm... >>> >>> >>>------------------------------------------------------------------------------ >>>Everyone hates slow websites. So do we. >>>Make your web apps faster with AppDynamics >>>Download AppDynamics Lite for free today: >>>http://p.sf.net/sfu/appdyn_sfd2d_oct >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >>------------------------------------------------------------------------------ >>Everyone hates slow websites. So do we. >>Make your web apps faster with AppDynamics >>Download AppDynamics Lite for free today: >>http://p.sf.net/sfu/appdyn_sfd2d_oct >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > > >-- >Best regards, >Shiv Shankar Dayal > >------------------------------------------------------------------------------ >Everyone hates slow websites. So do we. >Make your web apps faster with AppDynamics >Download AppDynamics Lite for free today: >http://p.sf.net/sfu/appdyn_sfd2d_oct >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2012-10-24 13:38:33
|
You can provide a specialization for serialization traits like namespace cppcms { serialization_traits<std::vector<page> > { load(...) save(...) } }; It is generally designed to be used with custom (not-cppcms based) serialization methods. I woudn't say it is best practice, but it would allow you not to use the "wrapper" class. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: sergey lavrov <ccp...@gm...> >To: cpp...@li... >Sent: Wednesday, October 24, 2012 11:02 AM >Subject: [Cppcms-users] What is the best practice to serialize vector of struct? > > >Hi All! > > >What is the best practice to serialize vector of struct (std::vector<struct_name>)? > > >Now I use ugly method to wrap main struct into struct container with std:vector member: > > >struct page_container : public cppcms::serializable { >struct page : public cppcms::serializable { >std::string uuid; >time_t insert_date; >time_t update_date; >void serialize(cppcms::archive &a) { >a & uuid & insert_date & update_date; >} >}; >std::vector<page> pages; > > >void serialize(cppcms::archive &a) { >a & pages; >} >}; > > >page_container pages; >if(!cache().fetch_data("pages", pages)) { >get_pages(pages); >cache().store_data("pages", pages); >} > > >Thanks in advance! >------------------------------------------------------------------------------ >Everyone hates slow websites. So do we. >Make your web apps faster with AppDynamics >Download AppDynamics Lite for free today: >http://p.sf.net/sfu/appdyn_sfd2d_oct >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2012-10-24 13:27:36
|
>________________________________ > From: Christian Gmeiner <chr...@gm...> >To: cpp...@li... >Sent: Wednesday, October 24, 2012 3:18 PM >Subject: [Cppcms-users] Different ways to display the same model > >Hi all > >I have a working cppcms based application and would like to extend it to display >the same model's in a completely different way. > >At the moment I have a touch optimized administration GUI. Is it >possible to create >an PC browser optimized version (with twitters bootstrap) to display >the same models? >Should this be the a different skin? > You need to create a different `<% view ... %> that uses the same model. It is generally good idea to create two different skins that each one of them contains the code this way you can switch only the skin name and use the same "view" name according to logic/model. Also if you have some 100% shared parts you can put them to "unnamed" skin and provide a name at compilation stage. >thanks >-- >Christian Gmeiner, MSc > Regards, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Christian G. <chr...@gm...> - 2012-10-24 13:18:52
|
Hi all I have a working cppcms based application and would like to extend it to display the same model's in a completely different way. At the moment I have a touch optimized administration GUI. Is it possible to create an PC browser optimized version (with twitters bootstrap) to display the same models? Should this be the a different skin? thanks -- Christian Gmeiner, MSc |
From: sergey l. <ccp...@gm...> - 2012-10-24 09:02:54
|
Hi All! What is the best practice to serialize vector of struct (std::vector<struct_name>)? Now I use ugly method to wrap main struct into struct container with std:vector member: struct page_container : public cppcms::serializable { struct page : public cppcms::serializable { std::string uuid; time_t insert_date; time_t update_date; void serialize(cppcms::archive &a) { a & uuid & insert_date & update_date; } }; std::vector<page> pages; void serialize(cppcms::archive &a) { a & pages; } }; page_container pages; if(!cache().fetch_data("pages", pages)) { get_pages(pages); cache().store_data("pages", pages); } Thanks in advance! |
From: Shiv S. D. <shi...@gm...> - 2012-10-23 18:14:44
|
Hi, Is it simple to do write a backend driver based on what is available for Hypertable? On Tue, Oct 23, 2012 at 10:19 PM, Artyom Beilis <art...@ya...> wrote: > Using cppdb you only need to add a small parameter to connection string > to enable connection pooling. > It would automatically use a pool withing a special singleton. > > Usually you don't need to use the pool class directly. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Lee Elenbaas <lee...@gm...> > *To:* cpp...@li... > *Sent:* Tuesday, October 23, 2012 5:33 PM > *Subject:* Re: [Cppcms-users] DB connection pooling > > I have not used cppDB yet - aside from some testing - but if you look at > its API, it comes with a pool class, > > just hold an instance of that pool in your app, and use it whenever you > need a connection > you can pass a shared_ptr around for it - or just store it in a single > place. > > but this is not part of the cppcms framework itself, and i have no idea > how the pool will handle multiple threads requesting a connection at the > same time - perhaps Artyom could answer that > > On Mon, Oct 22, 2012 at 3:47 PM, Shiv Shankar Dayal < > shi...@gm...> wrote: > > Agreed. So where do I put my DB connection pool? As mentioned in > documentation "The CppCMS service has a simple design of a single event > loop and a thread pool that handles actual user application responses." > this means on outer side there is an event-based design and internally > there is a thread pool. Therefore I draw a conclusion that I need a thread > based pool and once the application is mounted and a factory object is > created right where I hit first db query I should use one connection from > pool. > > > On Mon, Oct 22, 2012 at 6:30 PM, Lee Elenbaas <lee...@gm...>wrote: > > I fail to see the connection between the application being asynchronious > and the DB connections being pooled > > if you need to do several things with the same DB at the same time (or > simply in different threads) > you need several DB connections - you can choose to pool them - and this > way reuse them > > both synchronious and asynchronious applications can handle multiple > threads - so both need some way of using db connections - and a pool is one > good way to do that > > On Mon, Oct 22, 2012 at 2:22 PM, Shiv Shankar Dayal < > shi...@gm...> wrote: > > Hi, > Consider the following piece of documentation > If the application that handles it is a synchronous application, its > execution is passed to the *thread pool*. The user application prepares > the response and sends it synchronously to the client and the context is > destroyed, completing the "requst/response" cycle. > If the application is asynchronous, the HTTP Context remains inside the > event loop's thread and it is handled by the asynchronous application. This > application may decide to complete the response immediately or postpone it > by implementing, for example, long polling. > and following code > > 1. int main(int argc,char ** argv) > 2. { > 3. try { > 4. cppcms::service srv(argc,argv); > 5. srv.applications_pool().mount( > 6. cppcms::applications_factory<hello>() > 7. ); > > now as it is also written that applications are asynchronous what is the > need of more that one database connection. Is it the case that one > persistent connection will suffice? > -- > Best regards, > Shiv Shankar Dayal > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > -- > lee > Lee Elenbaas > lee...@gm... > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > Best regards, > Shiv Shankar Dayal > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > -- > lee > Lee Elenbaas > lee...@gm... > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Best regards, Shiv Shankar Dayal |