Thread: [Cppcms-users] Using MongoDB
Brought to you by:
artyom-beilis
From: Shiv S. D. <shi...@gm...> - 2012-09-19 15:47:51
|
Hi, I am a newbie with CppCMS. I want to create a login system where I can store sessions in MongoDB as well as on client size. I just do not want to use any of CppDB module. Is this feasible? -- Best regards, Shiv Shankar Dayal |
From: Artyom B. <art...@ya...> - 2012-09-19 18:26:02
|
----- Original Message ----- > From: Shiv Shankar Dayal <shi...@gm...> > To: cpp...@li... > Cc: > Sent: Wednesday, September 19, 2012 6:47 PM > Subject: [Cppcms-users] Using MongoDB > > Hi, > > I am a newbie with CppCMS. I want to create a login system where I can > store sessions in MongoDB as well as on client size. Why do you actually need specifically MongoDB database to store sessions? File system session storage with combination of ext4 is pretty fast storage - also other backends under contrib section are very fast as well - berlekey DB or even a special sqlite3 module. > I just do not want to use any of CppDB module. Is this feasible? Yes, write your own plug-in storage, it should be quite trivial. Take a look on contrib section to see examples. Also take a look on "tests/loadable_storage.cpp" file to see a trivial example how to implement an API. > > -- > Best regards, > Shiv Shankar Dayal > Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: 陈抒 <csf...@gm...> - 2012-09-20 03:46:06
|
Hello You could use mongodb client API in your apps based on CppCMS framework. I have been using this way for one year. MongoDB has its own memory cached layer, so Jetty implement its cached server on MongoDB. I guess its slower than memory cached, but faster than writing to disk directly. 陈抒 Best regards http://blog.csdn.net/sheismylife On Thu, Sep 20, 2012 at 2:25 AM, Artyom Beilis <art...@ya...> wrote: > > > ----- Original Message ----- > > > From: Shiv Shankar Dayal <shi...@gm...> > > To: cpp...@li... > > Cc: > > Sent: Wednesday, September 19, 2012 6:47 PM > > Subject: [Cppcms-users] Using MongoDB > > > > Hi, > > > > I am a newbie with CppCMS. I want to create a login system where I can > > store sessions in MongoDB as well as on client size. > > Why do you actually need specifically MongoDB database to store sessions? > > File system session storage with combination of ext4 is pretty > fast storage - also other backends under contrib section are very fast > as well - berlekey DB or even a special sqlite3 module. > > > I just do not want to use any of CppDB module. Is this feasible? > > Yes, write your own plug-in storage, it should be quite trivial. > > Take a look on contrib section to see examples. Also take a look > on "tests/loadable_storage.cpp" file to see a trivial example how > to implement an API. > > > > > -- > > Best regards, > > Shiv Shankar Dayal > > > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Shiv S. D. <shi...@gm...> - 2012-09-20 05:09:38
|
Hi, I had another question. What advantage does CppCMS offer when PHP is combined with HipHop or Python is used with PyPy? -- Best regards, Shiv Shankar Dayal |
From: Artyom B. <art...@ya...> - 2012-09-20 06:32:15
|
----- Original Message ----- > From: Shiv Shankar Dayal <shi...@gm...> > To: cpp...@li... > Cc: Artyom Beilis <art...@ya...> > Sent: Thursday, September 20, 2012 8:09 AM > Subject: Re: [Cppcms-users] Using MongoDB > > Hi, > > I had another question. What advantage does CppCMS offer when PHP is > combined with HipHop or Python is used with PyPy? > When you write PHP: $a = $b + $c Python: a = b + c and run it under HipHop or PyPy the code should **dynamically** check of $b and $c are have compatible types and have operation "+" defined for them. Because these languages are dynamically typed and you do not know in the run-time what $b and $c are. In practice using HipHop reduced the load on servers by 50% when CppCMS provides an improvement of over order of magnitude. > -- > Best regards, > Shiv Shankar Dayal > For more details read: http://cppcms.com/wikipp/en/page/benchmarks Note - Java is statically typed JIT compiled language and still has significantly lower performance than CppCMS based applications. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |