Thread: [Cppcms-users] per request data storage?
Brought to you by:
artyom-beilis
|
From: Heiko I. <hi...@93...> - 2013-12-05 15:17:41
|
Hi there, how can i save data per request? I store the user id in a browser cookie, then there is a function called getCurrentUser() which looks into the cookie, then gets the user from the database. Obviously i do not want to have a database query every time getCurrentUser() is called within one request, so i want to store the current user for the current request. How can i do this? Thanx in advance. -- Heiko |
|
From: Artyom B. <art...@ya...> - 2013-12-05 15:21:11
|
http://cppcms.com/wikipp/en/page/cppcms_1x_sessions Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Thu, 12/5/13, Heiko Irrgang <hi...@93...> wrote: Subject: [Cppcms-users] per request data storage? To: cpp...@li... Date: Thursday, December 5, 2013, 4:50 PM Hi there, how can i save data per request? I store the user id in a browser cookie, then there is a function called getCurrentUser() which looks into the cookie, then gets the user from the database. Obviously i do not want to have a database query every time getCurrentUser() is called within one request, so i want to store the current user for the current request. How can i do this? Thanx in advance. -- Heiko ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Heiko I. <hi...@93...> - 2013-12-05 15:45:34
|
Hi, hm.. maybe i'm missing something here... i do not want to store full user information in the session cookie, i just want to safe it somewhere for the current request, so i do not re-re-re-re-read it from the database, just because i need it on 5 different locations. i already have a cookie session running, but it only holds the user id and a usertoken. What i would need is some storage, that is neither file/cookie based and does not interfere with the session. Pretty much like some local variables in the actual application instance, but on a point where i do not have this application instance. Is something like this available, or do i have to give the application instance as parameters to every function that might need information limited to the current request? Maybe i'm just thinking too much php here ;) Thanx in advance, Heiko On Thu, Dec 05, 2013 at 07:21:04AM -0800, Artyom Beilis wrote: > http://cppcms.com/wikipp/en/page/cppcms_1x_sessions > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > -------------------------------------------- > On Thu, 12/5/13, Heiko Irrgang <hi...@93...> wrote: > > Subject: [Cppcms-users] per request data storage? > To: cpp...@li... > Date: Thursday, December 5, 2013, 4:50 PM > > Hi there, > > how can i save data per request? > > I store the user id in a browser cookie, then there is a > function > called getCurrentUser() which looks into the cookie, then > gets the user from the database. > > Obviously i do not want to have a database query every time > getCurrentUser() is called within one request, so i want to > store the current user for the current request. > > How can i do this? > > Thanx in advance. |
|
From: 陈抒 <csf...@gm...> - 2013-12-05 16:08:33
|
Not sure the different locations mean what? Different web URLs? If you want to save something in web app, in my way, I usually create a singleton object called my_app, you could use any singleton technology to create it. And save the variables that you want to cache and share as the my_app object's member variable. For multi-thread protection, use boost::mutex to protect them. Dean Chen Best regards http://blog.csdn.net/csfreebird On Thu, Dec 5, 2013 at 11:45 PM, Heiko Irrgang <hi...@93...> wrote: > Hi, > > hm.. maybe i'm missing something here... i do not want to store full > user information in the session cookie, i just want to safe it somewhere > for the current request, so i do not re-re-re-re-read it from the > database, just because i need it on 5 different locations. > > i already have a cookie session running, but it only holds the user id > and a usertoken. > > What i would need is some storage, that is neither file/cookie based and > does not interfere with the session. > > Pretty much like some local variables in the actual application instance, > but on a point where i do not have this application instance. > > Is something like this available, or do i have to give the application > instance as parameters to every function that might need information > limited to the current request? > > Maybe i'm just thinking too much php here ;) > > Thanx in advance, > Heiko > > On Thu, Dec 05, 2013 at 07:21:04AM -0800, Artyom Beilis wrote: > > http://cppcms.com/wikipp/en/page/cppcms_1x_sessions > > > > Artyom Beilis > > -------------- > > CppCMS - C++ Web Framework: http://cppcms.com/ > > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > -------------------------------------------- > > On Thu, 12/5/13, Heiko Irrgang <hi...@93...> wrote: > > > > Subject: [Cppcms-users] per request data storage? > > To: cpp...@li... > > Date: Thursday, December 5, 2013, 4:50 PM > > > > Hi there, > > > > how can i save data per request? > > > > I store the user id in a browser cookie, then there is a > > function > > called getCurrentUser() which looks into the cookie, then > > gets the user from the database. > > > > Obviously i do not want to have a database query every time > > getCurrentUser() is called within one request, so i want to > > store the current user for the current request. > > > > How can i do this? > > > > Thanx in advance. > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Heiko I. <hi...@93...> - 2013-12-05 18:38:57
|
Hi, thanx, i thought about singleton, but wouldn't this be application wide? So if i store user information in a singleton, everyone would count as that user? Kind regards, Heiko On Fri, Dec 06, 2013 at 12:08:05AM +0800, 陈抒 wrote: > Not sure the different locations mean what? Different web URLs? > If you want to save something in web app, in my way, I usually create a > singleton object called my_app, you could use any singleton technology to > create it. And save the variables that you want to cache and share as the > my_app object's member variable. > For multi-thread protection, use boost::mutex to protect them. > > > Dean Chen > Best regards > http://blog.csdn.net/csfreebird > > > On Thu, Dec 5, 2013 at 11:45 PM, Heiko Irrgang <hi...@93...> wrote: > > > Hi, > > > > hm.. maybe i'm missing something here... i do not want to store full > > user information in the session cookie, i just want to safe it somewhere > > for the current request, so i do not re-re-re-re-read it from the > > database, just because i need it on 5 different locations. > > > > i already have a cookie session running, but it only holds the user id > > and a usertoken. > > > > What i would need is some storage, that is neither file/cookie based and > > does not interfere with the session. > > > > Pretty much like some local variables in the actual application instance, > > but on a point where i do not have this application instance. > > > > Is something like this available, or do i have to give the application > > instance as parameters to every function that might need information > > limited to the current request? > > > > Maybe i'm just thinking too much php here ;) > > > > Thanx in advance, > > Heiko |
|
From: 陈抒 <csf...@gm...> - 2013-12-06 04:25:40
|
1. You can save a key-value data structure in singleton application object, key will be user id, value can be any user-specific data. But if you do this, you actually implement your own version of user session. Why not use cppcms session? 2. If the web server has session, it's not stateless anymore. When clustering several web servers together to do load balance and to prevent single point of failure, sync these session between these web servers are important and hard job. So my way is to avoid use session, just use database cluster or cache server to hold session values. Dean Chen Best regards http://blog.csdn.net/csfreebird On Fri, Dec 6, 2013 at 2:38 AM, Heiko Irrgang <hi...@93...> wrote: > Hi, > > thanx, i thought about singleton, but wouldn't this be application wide? > So if i store user information in a singleton, everyone would count as > that user? > > Kind regards, > Heiko > > On Fri, Dec 06, 2013 at 12:08:05AM +0800, 陈抒 wrote: > > Not sure the different locations mean what? Different web URLs? > > If you want to save something in web app, in my way, I usually create a > > singleton object called my_app, you could use any singleton technology to > > create it. And save the variables that you want to cache and share as > the > > my_app object's member variable. > > For multi-thread protection, use boost::mutex to protect them. > > > > > > Dean Chen > > Best regards > > http://blog.csdn.net/csfreebird > > > > > > On Thu, Dec 5, 2013 at 11:45 PM, Heiko Irrgang <hi...@93...> wrote: > > > > > Hi, > > > > > > hm.. maybe i'm missing something here... i do not want to store full > > > user information in the session cookie, i just want to safe it > somewhere > > > for the current request, so i do not re-re-re-re-read it from the > > > database, just because i need it on 5 different locations. > > > > > > i already have a cookie session running, but it only holds the user id > > > and a usertoken. > > > > > > What i would need is some storage, that is neither file/cookie based > and > > > does not interfere with the session. > > > > > > Pretty much like some local variables in the actual application > instance, > > > but on a point where i do not have this application instance. > > > > > > Is something like this available, or do i have to give the application > > > instance as parameters to every function that might need information > > > limited to the current request? > > > > > > Maybe i'm just thinking too much php here ;) > > > > > > Thanx in advance, > > > Heiko > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Heiko I. <hi...@93...> - 2013-12-06 05:32:23
|
Hi, well, thats exactly the point, i am not storing the session in a database and therefor i do not want to save things like user password in the browser cookie. using a database for session storage would definately be an option, but as far as i see, this involves dynamic linking, i do not want this, when my project is near to finish, i will get a commercial license and link everything into a single file, having some extra files in the filesystem is not an option. any way to implement db session without dynamic linking? Kind regards, Heiko On Fri, Dec 06, 2013 at 12:25:11PM +0800, 陈抒 wrote: > 1. You can save a key-value data structure in singleton application object, > key will be user id, value can be any user-specific data. > But if you do this, you actually implement your own version of user > session. Why not use cppcms session? > > 2. If the web server has session, it's not stateless anymore. When > clustering several web servers together to do load balance and to prevent > single point of failure, sync these session between these web servers are > important and hard job. So my way is to avoid use session, just use > database cluster or cache server to hold session values. > > > Dean Chen > Best regards > http://blog.csdn.net/csfreebird > > > On Fri, Dec 6, 2013 at 2:38 AM, Heiko Irrgang <hi...@93...> wrote: > > > Hi, > > > > thanx, i thought about singleton, but wouldn't this be application wide? > > So if i store user information in a singleton, everyone would count as > > that user? > > > > Kind regards, > > Heiko > > > > On Fri, Dec 06, 2013 at 12:08:05AM +0800, 陈抒 wrote: > > > Not sure the different locations mean what? Different web URLs? > > > If you want to save something in web app, in my way, I usually create a > > > singleton object called my_app, you could use any singleton technology to > > > create it. And save the variables that you want to cache and share as > > the > > > my_app object's member variable. > > > For multi-thread protection, use boost::mutex to protect them. > > > > > > > > > Dean Chen > > > Best regards > > > http://blog.csdn.net/csfreebird > > > > > > > > > On Thu, Dec 5, 2013 at 11:45 PM, Heiko Irrgang <hi...@93...> wrote: > > > > > > > Hi, > > > > > > > > hm.. maybe i'm missing something here... i do not want to store full > > > > user information in the session cookie, i just want to safe it > > somewhere > > > > for the current request, so i do not re-re-re-re-read it from the > > > > database, just because i need it on 5 different locations. > > > > > > > > i already have a cookie session running, but it only holds the user id > > > > and a usertoken. > > > > > > > > What i would need is some storage, that is neither file/cookie based > > and > > > > does not interfere with the session. > > > > > > > > Pretty much like some local variables in the actual application > > instance, > > > > but on a point where i do not have this application instance. > > > > > > > > Is something like this available, or do i have to give the application > > > > instance as parameters to every function that might need information > > > > limited to the current request? > > > > > > > > Maybe i'm just thinking too much php here ;) > > > > > > > > Thanx in advance, > > > > Heiko > > > > > > ------------------------------------------------------------------------------ > > Sponsored by Intel(R) XDK > > Develop, test and display web and hybrid apps with a single code base. > > Download it for free now! > > > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- Heiko Irrgang 93-interactive Hochfeldstr. 30 82377 Penzberg Germany Web....: http://93i.de Email..: hi...@93... Phone..: +49-160-7873168 |
|
From: Shiv S. D. <shi...@gm...> - 2013-12-06 05:39:57
|
You can use something like Redis for this which is in-memory database. On Fri, Dec 6, 2013 at 11:02 AM, Heiko Irrgang <hi...@93...> wrote: > Hi, > > well, thats exactly the point, i am not storing the session in a > database and therefor i do not want to save things like user password in > the browser cookie. > > using a database for session storage would definately be an option, but > as far as i see, this involves dynamic linking, i do not want this, when > my project is near to finish, i will get a commercial license and link > everything into a single file, having some extra files in the filesystem > is not an option. > > any way to implement db session without dynamic linking? > > Kind regards, > Heiko > > On Fri, Dec 06, 2013 at 12:25:11PM +0800, 陈抒 wrote: > > 1. You can save a key-value data structure in singleton application > object, > > key will be user id, value can be any user-specific data. > > But if you do this, you actually implement your own version of user > > session. Why not use cppcms session? > > > > 2. If the web server has session, it's not stateless anymore. When > > clustering several web servers together to do load balance and to prevent > > single point of failure, sync these session between these web servers are > > important and hard job. So my way is to avoid use session, just use > > database cluster or cache server to hold session values. > > > > > > Dean Chen > > Best regards > > http://blog.csdn.net/csfreebird > > > > > > On Fri, Dec 6, 2013 at 2:38 AM, Heiko Irrgang <hi...@93...> wrote: > > > > > Hi, > > > > > > thanx, i thought about singleton, but wouldn't this be application > wide? > > > So if i store user information in a singleton, everyone would count as > > > that user? > > > > > > Kind regards, > > > Heiko > > > > > > On Fri, Dec 06, 2013 at 12:08:05AM +0800, 陈抒 wrote: > > > > Not sure the different locations mean what? Different web URLs? > > > > If you want to save something in web app, in my way, I usually > create a > > > > singleton object called my_app, you could use any singleton > technology to > > > > create it. And save the variables that you want to cache and share > as > > > the > > > > my_app object's member variable. > > > > For multi-thread protection, use boost::mutex to protect them. > > > > > > > > > > > > Dean Chen > > > > Best regards > > > > http://blog.csdn.net/csfreebird > > > > > > > > > > > > On Thu, Dec 5, 2013 at 11:45 PM, Heiko Irrgang <hi...@93...> wrote: > > > > > > > > > Hi, > > > > > > > > > > hm.. maybe i'm missing something here... i do not want to store > full > > > > > user information in the session cookie, i just want to safe it > > > somewhere > > > > > for the current request, so i do not re-re-re-re-read it from the > > > > > database, just because i need it on 5 different locations. > > > > > > > > > > i already have a cookie session running, but it only holds the > user id > > > > > and a usertoken. > > > > > > > > > > What i would need is some storage, that is neither file/cookie > based > > > and > > > > > does not interfere with the session. > > > > > > > > > > Pretty much like some local variables in the actual application > > > instance, > > > > > but on a point where i do not have this application instance. > > > > > > > > > > Is something like this available, or do i have to give the > application > > > > > instance as parameters to every function that might need > information > > > > > limited to the current request? > > > > > > > > > > Maybe i'm just thinking too much php here ;) > > > > > > > > > > Thanx in advance, > > > > > Heiko > > > > > > > > > > ------------------------------------------------------------------------------ > > > Sponsored by Intel(R) XDK > > > Develop, test and display web and hybrid apps with a single code base. > > > Download it for free now! > > > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > > > _______________________________________________ > > > Cppcms-users mailing list > > > Cpp...@li... > > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > ------------------------------------------------------------------------------ > > Sponsored by Intel(R) XDK > > Develop, test and display web and hybrid apps with a single code base. > > Download it for free now! > > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > -- > Heiko Irrgang > 93-interactive > Hochfeldstr. 30 > 82377 Penzberg > Germany > > Web....: http://93i.de > Email..: hi...@93... > Phone..: +49-160-7873168 > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Respect, Shiv Shankar Dayal |
|
From: 陈抒 <csf...@gm...> - 2013-12-06 05:49:01
|
Hi, Shiv, If Heiko uses in-memory database, that means he still enables session in web server. The web server cannot be clustered unless Redis provides a way to sync their data in different machines. And my current project is using MongoDB, mongodb driver can be statically linked in my app. So when deploying my app on product server, no mongodb driver's dll or so file is required. Hi, Heiko: If you have chosen a database already and don't want to change this, could you find a way to link the database client lib into your app statically? Dean Chen Best regards http://blog.csdn.net/csfreebird On Fri, Dec 6, 2013 at 1:39 PM, Shiv Shankar Dayal < shi...@gm...> wrote: > You can use something like Redis for this which is in-memory database. > > > On Fri, Dec 6, 2013 at 11:02 AM, Heiko Irrgang <hi...@93...> wrote: > >> Hi, >> >> well, thats exactly the point, i am not storing the session in a >> database and therefor i do not want to save things like user password in >> the browser cookie. >> >> using a database for session storage would definately be an option, but >> as far as i see, this involves dynamic linking, i do not want this, when >> my project is near to finish, i will get a commercial license and link >> everything into a single file, having some extra files in the filesystem >> is not an option. >> >> any way to implement db session without dynamic linking? >> >> Kind regards, >> Heiko >> >> On Fri, Dec 06, 2013 at 12:25:11PM +0800, 陈抒 wrote: >> > 1. You can save a key-value data structure in singleton application >> object, >> > key will be user id, value can be any user-specific data. >> > But if you do this, you actually implement your own version of user >> > session. Why not use cppcms session? >> > >> > 2. If the web server has session, it's not stateless anymore. When >> > clustering several web servers together to do load balance and to >> prevent >> > single point of failure, sync these session between these web servers >> are >> > important and hard job. So my way is to avoid use session, just use >> > database cluster or cache server to hold session values. >> > >> > >> > Dean Chen >> > Best regards >> > http://blog.csdn.net/csfreebird >> > >> > >> > On Fri, Dec 6, 2013 at 2:38 AM, Heiko Irrgang <hi...@93...> wrote: >> > >> > > Hi, >> > > >> > > thanx, i thought about singleton, but wouldn't this be application >> wide? >> > > So if i store user information in a singleton, everyone would count as >> > > that user? >> > > >> > > Kind regards, >> > > Heiko >> > > >> > > On Fri, Dec 06, 2013 at 12:08:05AM +0800, 陈抒 wrote: >> > > > Not sure the different locations mean what? Different web URLs? >> > > > If you want to save something in web app, in my way, I usually >> create a >> > > > singleton object called my_app, you could use any singleton >> technology to >> > > > create it. And save the variables that you want to cache and share >> as >> > > the >> > > > my_app object's member variable. >> > > > For multi-thread protection, use boost::mutex to protect them. >> > > > >> > > > >> > > > Dean Chen >> > > > Best regards >> > > > http://blog.csdn.net/csfreebird >> > > > >> > > > >> > > > On Thu, Dec 5, 2013 at 11:45 PM, Heiko Irrgang <hi...@93...> wrote: >> > > > >> > > > > Hi, >> > > > > >> > > > > hm.. maybe i'm missing something here... i do not want to store >> full >> > > > > user information in the session cookie, i just want to safe it >> > > somewhere >> > > > > for the current request, so i do not re-re-re-re-read it from the >> > > > > database, just because i need it on 5 different locations. >> > > > > >> > > > > i already have a cookie session running, but it only holds the >> user id >> > > > > and a usertoken. >> > > > > >> > > > > What i would need is some storage, that is neither file/cookie >> based >> > > and >> > > > > does not interfere with the session. >> > > > > >> > > > > Pretty much like some local variables in the actual application >> > > instance, >> > > > > but on a point where i do not have this application instance. >> > > > > >> > > > > Is something like this available, or do i have to give the >> application >> > > > > instance as parameters to every function that might need >> information >> > > > > limited to the current request? >> > > > > >> > > > > Maybe i'm just thinking too much php here ;) >> > > > > >> > > > > Thanx in advance, >> > > > > Heiko >> > > >> > > >> > > >> ------------------------------------------------------------------------------ >> > > Sponsored by Intel(R) XDK >> > > Develop, test and display web and hybrid apps with a single code base. >> > > Download it for free now! >> > > >> > > >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >> > > _______________________________________________ >> > > Cppcms-users mailing list >> > > Cpp...@li... >> > > https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > >> >> > >> ------------------------------------------------------------------------------ >> > Sponsored by Intel(R) XDK >> > Develop, test and display web and hybrid apps with a single code base. >> > Download it for free now! >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >> >> > _______________________________________________ >> > Cppcms-users mailing list >> > Cpp...@li... >> > https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> -- >> Heiko Irrgang >> 93-interactive >> Hochfeldstr. 30 >> 82377 Penzberg >> Germany >> >> Web....: http://93i.de >> Email..: hi...@93... >> Phone..: +49-160-7873168 >> >> >> ------------------------------------------------------------------------------ >> Sponsored by Intel(R) XDK >> Develop, test and display web and hybrid apps with a single code base. >> Download it for free now! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > -- > Respect, > Shiv Shankar Dayal > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
|
From: Heiko I. <hi...@93...> - 2013-12-06 07:16:38
|
Hi, On Fri, Dec 06, 2013 at 01:48:33PM +0800, 陈抒 wrote: > If you have chosen a database already and don't want to change this, > could you find a way to link the database client lib into your app > statically? i am already using cppdb with mysql which you can link statically, but maybe i did not understand this right? When i look at session docs, it says session.server.storage can have the values: files memory network external So i assume i need to use external when i want to use cppcms session? Which seems to be limited to dynamic linking, or am i missing something? Kind regards, Heiko |
|
From: 陈抒 <csf...@gm...> - 2013-12-06 07:26:00
|
You want to use cppcms session with mysql & cppdb. also using static linking. I have not used this way before. Let's see who can give you correct. :) Dean Chen Best regards http://blog.csdn.net/csfreebird On Fri, Dec 6, 2013 at 3:16 PM, Heiko Irrgang <hi...@93...> wrote: > Hi, > > On Fri, Dec 06, 2013 at 01:48:33PM +0800, 陈抒 wrote: > > If you have chosen a database already and don't want to change this, > > could you find a way to link the database client lib into your app > > statically? > > i am already using cppdb with mysql which you can link statically, but > maybe i did not understand this right? When i look at session docs, it > says session.server.storage can have the values: > > files > memory > network > external > > So i assume i need to use external when i want to use cppcms session? > Which seems to be limited to dynamic linking, or am i missing something? > > Kind regards, > Heiko > > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |