Re: how to handle >4K session in camping

2013-12-10 Thread Magnus Holm
On Mon, Nov 4, 2013 at 8:55 PM, låzaro wrote: > Sorry for the thread hacking but, how could be run camping as standalone CGI > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. You can use Rack: app.cgi: #!/usr/bin/env ruby require 'rack' require 'my_app' Rack::Se

Re: how to handle >4K session in camping

2013-12-10 Thread låzaro
Sorry for the thread hacking but, how could be run camping as standalone CGI -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Bluebie escribió: >Unless you’re running your camping app as a CGI script, the ruby >instance keeps running, so you could just create a looping thre

Re: how to handle >4K session in camping

2013-12-10 Thread Francois Sery
i could'nt hope a more detailed answer ! I've never use ruby thread before and it seems to be a the perfect pretext to try . merci Bluebie 2013/12/10 Bluebie > Unless you’re running your camping app as a CGI script, the ruby instance > keeps running, so you could just create a looping threa

Re: how to handle >4K session in camping

2013-12-10 Thread Bluebie
Unless you’re running your camping app as a CGI script, the ruby instance keeps running, so you could just create a looping thread to do it every now and then: hours = 2 # cleanup every two hours Thread.new do loop do # some database cleanup stuff sleep hours * 60 * 60 end end The

Re: how to handle >4K session in camping

2013-12-10 Thread Francois Sery
Bonjour, Thanks for your help. Here is how i've modified my app. now i have - a 'session' model - a "sessions" table with a column for my data... - a session cookie: @state[:sessionid]=SecureRandom.hex It works as wanted but i have one more question. how do you handle all the obsolete sessions i

Re: how to handle >4K session in camping

2013-12-06 Thread Bluebie
If you fill the session cookie with 4kb of data, that means every http request after that to that domain will require the user to upload 4kb of data, which may not seem like much, but on a mobile phone for instance, loading a page with 50 images, that becomes 4*50 = 200kb - pretty significant co

Re: how to handle >4K session in camping

2013-12-06 Thread Charles McKnight
Sure wish the W3C would devise a better state mechanism than cookies... On Dec 6, 2013, at 12:49 PM, Magnus Holm wrote: > You should not store a large amount of data in the session. The > session is stored in a cookie, and everything you store there has to > be sent back and forth over the netwo

Re: how to handle >4K session in camping

2013-12-06 Thread Magnus Holm
You should not store a large amount of data in the session. The session is stored in a cookie, and everything you store there has to be sent back and forth over the network. You can however store an ID in the session and lookup data in your database. // Magnus Holm On Tue, Dec 3, 2013 at 12:04 P

Re: how to handle >4K session in camping

2013-12-03 Thread Michael McMillan
Hi Francis! 4K is not a limit set by Camping, as far as I know. 4K is a limit most modern browsers enforce. On Tue, Dec 3, 2013 at 12:04 PM, Francois Sery wrote: > hi , i need some advices. > I a little Camping app i have to store a cart in a session . i tried > achieving it using the default c

how to handle >4K session in camping

2013-12-03 Thread Francois Sery
hi , i need some advices. I a little Camping app i have to store a cart in a session . i tried achieving it using the default camping/session but it is limited to 4K and my card miss some data. how can store more than 4k in a session ? thanks. ___ Campin