cppcms-users Mailing List for CppCMS C++ Web Framework (Page 94)
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-03-04 21:09:58
|
> Yeah, I was also using CppCMS 1.x.x for some time now. > But I had some legacy code which needed to be ported to 1.x. > I am sure, however, I am not the only one in this situation, so I finished > the article: > http://cppcms.com/wikipp/en/page/cppcms_1x_migration > > CppCMS 1.x is vastly superior to 0.x - I realized that again during > porting ;) > Yes, I've began to write it but then left as I thought it was not really required as most of the users had already switched by now. > > I am not very fond of json as configuration format - even though it is very > good as data exchange format - because it lacks comments. Actually I was sure that it was mentioned in documentation (but I can't find it now) CppCMS json parser supports two extensions to the standard json syntax, that make it very easy to use for configuration: 1. C++ style comments i.e. "//" 2. It ignores trailing comma in objects and array definitions so stuff like that works. { "foo" : 10, "bar" : 20, // "baz" : 30 } It makes it very suitable as configuration file format. > What do you think > about a patch which let you switch to http://www.libelektra.org/ at > compiletime if preferred? > > Basically it would be just an alternative implementation of > json::value service::load_settings(int argc,char *argv[]) > > What do you think? > I'm not really fond of adding more 3rd party dependencies. What is the license libelektra distributed under? > >> I don't understand the question, you mean extra spaces when you press > on >> "view plain" ? > > Steps to reproduce: > Go to http://cppcms.com/wikipp/en/page/cppcms_1x_json with firefox/chrome > Select some text of a sourcecode, press ctrl+c and ctrl+v or middle mouse. > > I get: > my_object["name"]="Moshe"; > my_object["salary"]=1000.0; > (Note the two spaces at the end of each line) > > I expect: > No spaces at the end of lines. > > It seems to be some problem within the syntax highlighter, which generates > a "<span>; </span>" that adds these two spaces. It is a > little bit strange, > because the line numbers are suppressed successfully. > > Workaround: > Press "view plain" and copy there. > I assume that this is syntax highlighter bug (I hadn't written it, I just use it) > > Yeah, the decision to drop CgiCC is ok, cppcms is now more homogen and > easier to use. > Also CgiCC was quite buggy and limited :-) I don't miss it. > best regards > Markus Raab > Regards, Artyom |
From: Markus R. <us...@ma...> - 2012-03-04 18:04:11
|
Hi! Artyom Beilis wrote: >> From: Markus Raab <mai...@ma...> > >> To: cpp...@li... >> Cc: > > First of all please register this e-mail to the mailing > list so I would not have to moderate it. Sorry, the post was from a wrong e-mail address. >> I started a migration guide from 0.x to 1.x. It is basically a step by >> step what I needed to do to port my 0.x application: >> http://cppcms.com/wikipp/en/page/cppcms_1x_migration >> > > First of all I'm quite surprised that there are still 0.0.8 users > around. Almost all CppCMS users actually develop using CppCMS 1.x.x > version even during its beta. Yeah, I was also using CppCMS 1.x.x for some time now. But I had some legacy code which needed to be ported to 1.x. I am sure, however, I am not the only one in this situation, so I finished the article: http://cppcms.com/wikipp/en/page/cppcms_1x_migration CppCMS 1.x is vastly superior to 0.x - I realized that again during porting ;) >> The guide (and the porting) is not yet finished, I have some preliminary >> questions: >> >> For settings() it seems like that a const is missing. I could not find a >> page about the accessing of the configuration in the wiki, so maybe I am >> missing something. >> > > Settings returns cppcms::json::value object. > > Read: > > http://cppcms.com/wikipp/en/page/cppcms_1x_json > http://cppcms.com/cppcms_ref/latest/namespacecppcms_1_1json.html > > http://cppcms.com/cppcms_ref/latest/classcppcms_1_1json_1_1value.html I am not very fond of json as configuration format - even though it is very good as data exchange format - because it lacks comments. What do you think about a patch which let you switch to http://www.libelektra.org/ at compiletime if preferred? Basically it would be just an alternative implementation of json::value service::load_settings(int argc,char *argv[]) What do you think? >> Btw. it would be nice to have a full text search somewhere in the wiki, >> because the navigation is far from perfect - there are not many links >> interconnecting the pages. >> > > I know... It is the question of time (which I don't have too much) > and priorities > > Meanwhile google has very good index for the web site, including reference > documentation. Ok. >> Is it a bug that on some browsers (firefox, chrome) the source code of >> wikipp has two spaces at the end of the line when being copied? In >> konqueror no spaces are appended. > > I don't understand the question, you mean extra spaces when you press on > "view plain" ? Steps to reproduce: Go to http://cppcms.com/wikipp/en/page/cppcms_1x_json with firefox/chrome Select some text of a sourcecode, press ctrl+c and ctrl+v or middle mouse. I get: my_object["name"]="Moshe"; my_object["salary"]=1000.0; (Note the two spaces at the end of each line) I expect: No spaces at the end of lines. It seems to be some problem within the syntax highlighter, which generates a "<span>; </span>" that adds these two spaces. It is a little bit strange, because the line numbers are suppressed successfully. Workaround: Press "view plain" and copy there. >> What is the replacement from the previous env->getQueryString(); and >> cgicc::CgiEnvironment? Maybe some tutorial page how to access this >> information directly would be nice. >> > > You should use cppcms::http::request. > > http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1request.html > > > Fir example env->getQueryString() goes to request().query_string() > > CppCMS 1.0.0 does not use CgiCC any more (CgiCC allows to start CppCMS > easily but it wasn't really good library in long term). Yeah, the decision to drop CgiCC is ok, cppcms is now more homogen and easier to use. best regards Markus Raab |
From: Artyom B. <art...@ya...> - 2012-03-04 15:18:34
|
> From: Markus Raab <us...@ma...> > > First of all, congratulation for cppcms 1.0. > It is a really great piece of software! Thanks... :-) > > Ok, I understand. I am rather a fan of Scott Meyers: Use const whenever > possible. > The biggest problem is that const does not really works well with pimpl-design. Because with pipml almost everything can be const however semantically it may be non-const: For example the following construction is 100% correct from C++ point of view (d is not changed) but semantically it is by no means const. class foo { public: ... void bar() const { d->x++; } ... private: ... struct impl { int x; }; impl *d; }; So you can easily make wrong assumptions based on const or non-const interface. Const works very well for real data structures but it is not the best for complex systems with complex relations. For example classes like `cppcms::json::value` or `cppcms::http::cookie` have dual const/non-const interface because they are data structures. But many classes do not have such clear and easy separation. Best, Artyom |
From: Markus R. <us...@ma...> - 2012-03-04 15:02:44
|
Hi! First of all, congratulation for cppcms 1.0. It is a really great piece of software! Artyom Beilis wrote: >> For settings() it seems like that a const is missing. > > In general there are few const methods in CppCMS. > > mostly because it allow to have some side effects > that for example allow caching or lazy initialization. Ok, I understand. I am rather a fan of Scott Meyers: Use const whenever possible. For caching and logging I typically use mutable, because from logical point of view they still give the user constness. I have to admit, however, that I never build such an advanced caching system like cppcms has, it could be easily possible that you will get crazy when you try to have more const methods ;) > So I'd generally recommend to use non-const member function withing > cppcms application derived classes. Ok, so I will do that! best regards Markus -- http://www.markus-raab.org | Begeisterung ist alles! -- A.v. Wilbrandt, -o) | Fridolins heimliche Ehe Kernel 2.6.32-5-a /\ | on a x86_64 _\_v | |
From: Artyom B. <art...@ya...> - 2012-03-03 20:36:42
|
> > For settings() it seems like that a const is missing. In general there are few const methods in CppCMS. mostly because it allow to have some side effects that for example allow caching or lazy initialization. So I'd generally recommend to use non-const member function withing cppcms application derived classes. Artyom |
From: Artyom B. <art...@ya...> - 2012-03-03 20:25:56
|
> From: Markus Raab <mai...@ma...> > To: cpp...@li... > Cc: First of all please register this e-mail to the mailing list so I would not have to moderate it. > Hi! > > I started a migration guide from 0.x to 1.x. It is basically a step by step > what I needed to do to port my 0.x application: > http://cppcms.com/wikipp/en/page/cppcms_1x_migration > First of all I'm quite surprised that there are still 0.0.8 users around. Almost all CppCMS users actually develop using CppCMS 1.x.x version even during its beta. > The guide (and the porting) is not yet finished, I have some preliminary > questions: > > For settings() it seems like that a const is missing. I could not find a page > about the accessing of the configuration in the wiki, so maybe I am missing > something. > Settings returns cppcms::json::value object. Read: http://cppcms.com/wikipp/en/page/cppcms_1x_json http://cppcms.com/cppcms_ref/latest/namespacecppcms_1_1json.html http://cppcms.com/cppcms_ref/latest/classcppcms_1_1json_1_1value.html > Btw. it would be nice to have a full text search somewhere in the wiki, > because the navigation is far from perfect - there are not many links > interconnecting the pages. > I know... It is the question of time (which I don't have too much) and priorities Meanwhile google has very good index for the web site, including reference documentation. > Is it a bug that on some browsers (firefox, chrome) the source code of wikipp > has two spaces at the end of the line when being copied? In konqueror no > spaces are appended. I don't understand the question, you mean extra spaces when you press on "view plain" ? > > What is the replacement from the previous env->getQueryString(); and > cgicc::CgiEnvironment? Maybe some tutorial page how to access this > information directly would be nice. > You should use cppcms::http::request. http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1request.html Fir example env->getQueryString() goes to request().query_string() CppCMS 1.0.0 does not use CgiCC any more (CgiCC allows to start CppCMS easily but it wasn't really good library in long term). > best regards > Markus > Best, Artyom |
From: Markus R. <mai...@ma...> - 2012-03-03 14:09:49
|
Hi! I started a migration guide from 0.x to 1.x. It is basically a step by step what I needed to do to port my 0.x application: http://cppcms.com/wikipp/en/page/cppcms_1x_migration The guide (and the porting) is not yet finished, I have some preliminary questions: For settings() it seems like that a const is missing. I could not find a page about the accessing of the configuration in the wiki, so maybe I am missing something. Btw. it would be nice to have a full text search somewhere in the wiki, because the navigation is far from perfect - there are not many links interconnecting the pages. Is it a bug that on some browsers (firefox, chrome) the source code of wikipp has two spaces at the end of the line when being copied? In konqueror no spaces are appended. What is the replacement from the previous env->getQueryString(); and cgicc::CgiEnvironment? Maybe some tutorial page how to access this information directly would be nice. best regards Markus |
From: Artyom B. <art...@ya...> - 2012-03-02 18:12:39
|
> > In the first example of the plugin interface you pass > the application pointer to the plugin. I think it > would be more decoupled if the plugin could create > its own stripped down application just for rendering. It is up to you, really. I just had shown the general concept how it can be done. > Btw. the functions rendering to a stream should be > const, or do they modify the application? That change > would however break the API.. > It is not const. Because when you call render to access response().out() that does many things under the hood. So even thou technically it may be const. Semantically it does not have to. > Is there any approach how to get booster::locale working > Inside own plugins? > No problem: 1. All applications that are build in hierarchy share same http::context() that holds the locale, 2. Also the response().out() stream has std::locale imbued inside it. That is why you can call for example <% gt ... %> from the view. Of course if you render to your own std::ostream then you should imbue the std::locale object. my_stream.imbue(context().locale()); But it is better to use <% render ... %> template to render the plugin's view, this way you don\t use intermediate buffers and render to the same ostream. > Is it possible with the integrated webserver to > have the script at /? If "script_names" is set to "/", > the url is localhost//name. If it is not given or "", > I always get 404 for every url. > Yes: http://cppcms.com/wikipp/en/page/run_application_web_server_root Specifically: http://cppcms.com/wikipp/en/page/run_application_web_server_root#CppCMS-Embedded > Is it possible to reconfigure the internal file server > to be at another root? You mean "document root"? Yes: http://cppcms.com/wikipp/en/page/cppcms_1x_config#file_server.document_root Also you may be interested in aliases: http://cppcms.com/wikipp/en/page/cppcms_1x_config#file_server.alias > > I am afraid I do not fully understand the url mapper. > E.g. I have: > > 27 attach (new Base_gui(srv), > 28 "gui", "/gui{1}", > 29 "/gui(/(.*))?", 1); > 30 > 31 attach (new Base_rpc(srv), > 32 "rpc", "/rpc{1}", > 33 "/rpc(/(.*))?", 1); > > > For any reason > > 52 << "<a href='" << > url("gui")<< "'>GUI</a><br>" > 53 << "<a href='" << > url("rpc")<< "'>RPC</a><br> > > works for gui, but not for rpc? See following error for rpc: > > 2012-03-01 15:46:48; cppcms, error: url_mapper: key `' not found for url > `gui' > > [...] > > Sorry for all topics in one mail. > Best regards > > Markus Raab > Because when you map sub-application and refer to it you automatically referred to the default URL of the sub-application - empty one "empty key" See: http://cppcms.com/cppcms_ref/latest/classcppcms_1_1url__mapper.html#a249e59de419f7fd0241cab6634c68393 Also I'd recommend to update to CppCMS 1.0.0 as in latest version exception is not thrown in case of invalid URL but rather "/this_is_invalid_url" some something like that generated. Regards, Artyom |
From: Raab M. <Mar...@ka...> - 2012-03-02 10:11:16
|
Hi Artyom! In the first example of the plugin interface you pass the application pointer to the plugin. I think it would be more decoupled if the plugin could create its own stripped down application just for rendering. Btw. the functions rendering to a stream should be const, or do they modify the application? That change would however break the API.. Is there any approach how to get booster::locale working Inside own plugins? Is it possible with the integrated webserver to have the script at /? If "script_names" is set to "/", the url is localhost//name. If it is not given or "", I always get 404 for every url. Is it possible to reconfigure the internal file server to be at another root? I am afraid I do not fully understand the url mapper. E.g. I have: 27 attach (new Base_gui(srv), 28 "gui", "/gui{1}", 29 "/gui(/(.*))?", 1); 30 31 attach (new Base_rpc(srv), 32 "rpc", "/rpc{1}", 33 "/rpc(/(.*))?", 1); For any reason 52 << "<a href='" << url("gui")<< "'>GUI</a><br>" 53 << "<a href='" << url("rpc")<< "'>RPC</a><br> works for gui, but not for rpc? See following error for rpc: 2012-03-01 15:46:48; cppcms, error: url_mapper: key `' not found for url `gui' 0x4056a414: booster::stack_trace::trace(void**, int) + 0x24 in /usr/lib/libbooster.so.0 0x400ef4b9: cppcms::cppcms_error::cppcms_error(std::string const&) + 0x89 in /usr/lib/libcppcms.so.1 0x4012c007: cppcms::url_mapper::data::get_entry(cppcms::string_key const&, unsigned int, cppcms::string_key const&) const + 0x277 in /usr/lib/libcppcms.so.1 0x4012d587: cppcms::url_mapper::data::map(cppcms::string_key const&, cppcms::string_key const&, cppcms::filters::streamable const* const*, unsigned int, std::map<cppcms::string_key, std::string, std::less<cppcms::string_key>, std::allocator<std::pair<cppcms::string_key const, std::string> > > const&, std::map<cppcms::string_key, std::string, std::less<cppcms::string_key>, std::allocator<std::pair<cppcms::string_key const, std::string> > > const&, std::ostream&) const + 0x37 in /usr/lib/libcppcms.so.1 0x4012a02c: cppcms::url_mapper::real_map(char const*, cppcms::filters::streamable const* const*, unsigned int, std::ostream&) + 0x7dc in /usr/lib/libcppcms.so.1 0x4012ab6b: cppcms::url_mapper::map(std::ostream&, char const*) + 0x3b in /usr/lib/libcppcms.so.1 0x4012abad: cppcms::url_mapper::map(std::ostream&, std::string const&) + 0x2d in /usr/lib/libcppcms.so.1 0x40122384: cppcms::application::url(std::string const&) + 0x1f4 in /usr/lib/libcppcms.so.1 0x80506c3: AMT::Base::describe() + 0x243 in /home/markus/CVP/svn/cvp/trunk/software/cpu/build/bin/webserver 0x8051f7d: booster::function<void ()()>::callable_impl<void, cppcms::url_dispatcher::binder0<AMT::Base> >::call() + 0x2d in /home/markus/CVP/svn/cvp/trunk/software/cpu/build/bin/webserver 0x40123a2c: ??? + 0x40123a2c in /usr/lib/libcppcms.so.1 0x401238c0: cppcms::url_dispatcher::dispatch(std::string) + 0x90 in /usr/lib/libcppcms.so.1 0x4011eb43: cppcms::application::main(std::string) + 0x43 in /usr/lib/libcppcms.so.1 0x401175aa: cppcms::http::context::dispatch(booster::intrusive_ptr<cppcms::application>, std::string, bool) + 0x7a in /usr/lib/libcppcms.so.1 0x40119238: booster::function<void ()()>::callable_impl<void, cppcms_boost::_bi::bind_t<void, void (*)(booster::intrusive_ptr<cppcms::application>, std::string, bool), cppcms_boost::_bi::list3<cppcms_boost::_bi::value<booster::intrusive_ptr<cppcms::application> >, cppcms_boost::_bi::value<std::string>, cppcms_boost::_bi::value<bool> > > >::call() + 0x68 in /usr/lib/libcppcms.so.1 0x4011b027: cppcms::impl::thread_pool::worker() + 0xa7 in /usr/lib/libcppcms.so.1 0x4011ad5e: booster::function<void ()()>::callable_impl<void, cppcms_boost::_bi::bind_t<void, cppcms_boost::_mfi::mf0<void, cppcms::impl::thread_pool>, cppcms_boost::_bi::list1<cppcms_boost::_bi::value<cppcms::impl::thread_pool*> > > >::call() + 0x1e in /usr/lib/libcppcms.so.1 0x405bd41a: booster_thread_func + 0x2a in /usr/lib/libbooster.so.0 0x405e6955: ??? + 0x405e6955 in /lib/i686/cmov/libpthread.so.0 0x4049f5ee: clone + 0x5e in /lib/i686/cmov/libc.so.6 Sorry for all topics in one mail. Best regards Markus Raab The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof, and is kindly asked to notify the sender and delete the e-mail immediately. |
From: Daniel R. <dan...@li...> - 2012-03-01 14:31:56
|
Hello cppcms community :) Im very interested on implement a solution using redis + cppcms + slickgrid. Until now I can connect redis and cppcms to query and show data. But Im having issues with JSON and Slickgrid to achieve something like this: http://mleibman.github.com/SlickGrid/examples/example6-ajax-loading.html If anyone its interested on this, would be gr8 to work together. Daniel |
From: Leon <le...@wl...> - 2012-03-01 01:39:43
|
Thanks for the tip. The only problem here is that I do have the function name and parameter info there. I might end up using a delegate functor for all the functions so that I can pre-process the methods. On Wed, Feb 29, 2012 at 6:36 PM, Artyom Beilis <art...@ya...> wrote: > Yes, > > You can override void cppcms::application::main(std::string url) > > void main(std::string url) > { > // hook there > > cppcms::rcp::json_rpc_service::main(url); > > } > > > > Artyom Beilis > ------------- > > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > > >> >> From: Leon <le...@wl...> >> >> Hi, >> When doing json-rpc, is there way I can inject a hook so that I can do >> some checking (like the user id, permission etc.) before each json-rpc >> method is called? >> > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Leon <le...@wl...> - 2012-03-01 01:37:23
|
Thanks! I am much clearer now. On Wed, Feb 29, 2012 at 6:43 PM, Artyom Beilis <art...@ya...> wrote: > > > ----- Original Message ----- > >> From: Leon <le...@wl...> >> >> >> Hi, >> I am still not very clear about cppcms' threading model. Am I correct >> that each json-rpc method will be run from a thread from the thread >> pool? Do this mean that >> each access to any session data should be protected by mutex? >> >> >> Thanks! > > The session is accessed via cppcms::http::context and the context > is request/response specific. So unless you access one context from > two threads (which I don't see a reason to do) it is safe. > > The session storage thread safety is handled by CppCMS, > depending in specific backend and transparent to you. > > Of course if you implement your own session storage you should deal > with it on your own, but as I understand you don't. :-) > > > Artyom Beilis > ------------- > > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2012-02-29 10:43:52
|
----- Original Message ----- > From: Leon <le...@wl...> > > > Hi, > I am still not very clear about cppcms' threading model. Am I correct > that each json-rpc method will be run from a thread from the thread > pool? Do this mean that > each access to any session data should be protected by mutex? > > > Thanks! The session is accessed via cppcms::http::context and the context is request/response specific. So unless you access one context from two threads (which I don't see a reason to do) it is safe. The session storage thread safety is handled by CppCMS, depending in specific backend and transparent to you. Of course if you implement your own session storage you should deal with it on your own, but as I understand you don't. :-) Artyom Beilis ------------- Support CppCMS by donating money: https://sourceforge.net/donate/index.php?group_id=209965 |
From: Artyom B. <art...@ya...> - 2012-02-29 10:36:17
|
Yes, You can override void cppcms::application::main(std::string url) void main(std::string url) { // hook there cppcms::rcp::json_rpc_service::main(url); } Artyom Beilis ------------- Support CppCMS by donating money: https://sourceforge.net/donate/index.php?group_id=209965 > > From: Leon <le...@wl...> > > Hi, > When doing json-rpc, is there way I can inject a hook so that I can do > some checking (like the user id, permission etc.) before each json-rpc > method is called? > |
From: Leon <le...@wl...> - 2012-02-29 09:53:49
|
Hi, I am still not very clear about cppcms' threading model. Am I correct that each json-rpc method will be run from a thread from the thread pool? Do this mean that each access to any session data should be protected by mutex? Thanks! |
From: Leon <le...@wl...> - 2012-02-29 08:59:24
|
Hi, When doing json-rpc, is there way I can inject a hook so that I can do some checking (like the user id, permission etc.) before each json-rpc method is called? |
From: vizcayno <viz...@gm...> - 2012-02-29 01:20:38
|
> Confirmed the problem, > Added a workaround for it in the trunk, so 1.0.0 will include this fix. > > Now you can build CppCMS with MSVC10+Release mode > Artyom, I confirm you I built last CppCMS version in Release mode and tested it without problems, thank you and, my best regards. Vizcayno. |
From: Klaim - J. L. <mj...@gm...> - 2012-02-28 14:30:02
|
On Tue, Feb 28, 2012 at 14:22, Artyom Beilis <art...@ya...> wrote: > In any case if you are not sure I'd recommend your to > refer to: > > http://www.gnu.org/licenses/gpl-faq.html > > > Or ask your lawyer. > > Of course if you are not sure that you may to or want > to comply with the LGPLv3 license terms you may purchase > > the commercial license for your product. > > Well for the moment I'll not use CPPCMS for commercial purpose yet (i need to "'play" with it to get used to it for bigger projects) so I guess it's not good for me to get a commercial license now. But I'll contact you once I get to commercial projects, sure. Joël Lamotte |
From: Artyom B. <art...@ya...> - 2012-02-28 13:22:19
|
> > >Congratulations as well! > >I just need a short confirmation/clarification: >LGPL here means that we can use CPPCMS as we want as far as we don't touch it's code, >we use the separate .so version and we have our own application code in separate binary. > >Am I correct? > > >Joël Lamotte > Disclaimer ---------- First of all I'm not a lawyer everything I say is not a substitute in the LGPL license agreement. If there is a contradiction between the license agreement and what I write down, the LGPL License agreement defines the terms ------------ It is not only the conditions... You have to allow user to change the library and fix bugs. So if you have some embedded devices you should provide an appropriate access to update the shared object. For these purposes user may for example reverse engineer your application in order to understand how to do such modifications, and you may not forbid it. (Section 4 of LGPLv3) Also you must be able to provide sources of the CppCMS upon the clients request and ship the LGPL license agreement with your software, so the user could know that he uses free software. In any case if you are not sure I'd recommend your to refer to: http://www.gnu.org/licenses/gpl-faq.html Or ask your lawyer. Of course if you are not sure that you may to or want to comply with the LGPLv3 license terms you may purchase the commercial license for your product. Artyom Beilis. |
From: Klaim - J. L. <mj...@gm...> - 2012-02-28 13:01:00
|
Congratulations as well! I just need a short confirmation/clarification: LGPL here means that we can use CPPCMS as we want as far as we don't touch it's code, we use the separate .so version and we have our own application code in separate binary. Am I correct? Joël Lamotte |
From: william l. <we...@gm...> - 2012-02-28 05:51:54
|
Congratulations ! CppCMS is really nice and best server side C++ framework! On Tue, Feb 28, 2012 at 10:24 AM, Leon <le...@wl...> wrote: > Congratulations! > > Wish a success for your product. > > On Mon, Feb 27, 2012 at 7:20 AM, Artyom Beilis <art...@ya...> > wrote: > > Congratulations!!! > > > > > > CppCMS 1.0.0 Stable is ready. > > > > Additionally to providing a stable release, CppCMS is available > > > > now under an alternative Commercial License. > > > > See: http://commercial.cppcms.com > > > > Artyom Beilis > > > > > ------------------------------------------------------------------------------ > > Virtualization & Cloud Management Using Capacity Planning > > Cloud computing makes use of virtualization - but cloud computing > > also focuses on allowing computing to be delivered as a service. > > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Leon <le...@wl...> - 2012-02-28 02:24:57
|
Congratulations! Wish a success for your product. On Mon, Feb 27, 2012 at 7:20 AM, Artyom Beilis <art...@ya...> wrote: > Congratulations!!! > > > CppCMS 1.0.0 Stable is ready. > > Additionally to providing a stable release, CppCMS is available > > now under an alternative Commercial License. > > See: http://commercial.cppcms.com > > Artyom Beilis > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2012-02-26 23:20:23
|
Congratulations!!! CppCMS 1.0.0 Stable is ready. Additionally to providing a stable release, CppCMS is available now under an alternative Commercial License. See: http://commercial.cppcms.com Artyom Beilis |
From: Artyom B. <art...@ya...> - 2012-02-23 21:11:03
|
> [ 3%] Building CXX object > booster/CMakeFiles/booster.dir/lib/aio/src/reactor.cp > p.obj > reactor.cpp > c:\apps\instapps\cppcms\booster\lib\aio\src\reactor.cpp(710) > : fatal error > C1001 > : An internal error has occurred in the compiler. > (compiler file > 'f:\dd\vctools\compiler\utc\src\p2\main.c > [0x6CC138D3:0x00000008]' > , line 183) > To work around this problem, try simplifying or changing the program near the > l > ocations listed above. Confirmed the problem, Added a workaround for it in the trunk, so 1.0.0 will include this fix. Now you can build CppCMS with MSVC10+Release mode Thank you for the report. Artyom |
From: Artyom B. <art...@ya...> - 2012-02-23 15:15:27
|
> Is there any way, that the reload thing will be "signal safe"? > I don't see any reason why not. > But thanks for your reply and the review. > (oh, "your code is wrong" sound so hard ): ) > Read this: http://linux.die.net/man/7/signal Section: "Async signal safe functions" You can't call dlclose, dlopen or mutex locks from the signal handler, and this is what you do. Artyom |