GAE MemcachePageStore | Re: GAE big table PageStore

2009-12-29 Thread A. Maza


I am not sure why you want to have a BigTable PageStore since it would 
have quite negative performance implications (imho). you may consider 
also the presentation of Guido van Rossum


https://sites.google.com/site/appengineappstats/AppStats_Meetup09.pdf?attredirects=0


I attach an implementation of a Memcache-based PageStore to this mail. 
It is very much based on the code posted by Richard Wilkinson some time 
before. If you find any bugs or are able to improve it, please post it 
to the list.


regards,
andr


On 24.12.2009 18:43, sudhir543-...@yahoo.com wrote:



  Last comment on that page is from my self only :)
  It says.. I dont want to keep every thing in session.. and no one would want 
to.
I want 'GAE big table based PageStore'



Sudhir NimavatSenior software engineer.
Quick start global PVT LTD.
Baroda - 390007
Gujarat, India

Personally I'm always ready to learn, although I do not always like being taught






From: Ilja Pavkovic
To: users@wicket.apache.org
Sent: Thu, 24 December, 2009 10:55:27 PM
Subject: Re: GAE big table PageStore

Hi,

http://lmgtfy.com/?q=google+app+engine+wicket

first link :)

Best Regards,
 Ilja Pavkovic


Am Donnerstag, 24. Dezember 2009 10:56:51 schrieb sudhir543-...@yahoo.com:

I need to write app specifically for GAE, I know Disk based page store
  wouldnt work. Is there any existing solution for this? I searched mailing
  lists and did googling, seems that it has been discussed earlier too, but
  I don't find any implementation.

If I can get a prebuilt solution, I want to avoid my self from writing.

SN





Sudhir NimavatSenior software engineer.
Quick start global PVT LTD.
Baroda - 390007
Gujarat, India

Personally I'm always ready to learn, although I do not always like being
  taught


   The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
  http://in.yahoo.com/





/*

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

*/


import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.Map.Entry;
import java.util.concurrent.locks.ReentrantReadWriteLock;

import org.apache.wicket.IClusterable;
import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.pagestore.AbstractPageStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;

public class MemcachePageStore extends AbstractPageStore {

private static final Logger logger = LoggerFactory
.getLogger(MemcachePageStore.class);
private static final String PAGESTORE_MEMCACHE_KEY = 
"PAGESTORE_MEMCACHE_KEY";
private final int MAX_PAGES_PER_MAP;

private static final int NO_MAX_PAGES_PER_MAP = -99;

private MemcacheService memcache;

public MemcachePageStore() {
logger.debug("New Memcache Page Store, MAX_PAGES_PER_MAP is 
Unlimited");
MAX_PAGES_PER_MAP = MemcachePageStore.NO_MAX_PAGES_PER_MAP;
this.initMemcache();
}

public MemcachePageStore(final int maxPagesPerMap) {
if (logger.isDebugEnabled()) {
logger.debug("New Memcache Page Store, 
MAX_PAGES_PER_MAP is "
+ maxPagesPerMap);
}
MAX_PAGES_PER_MAP = maxPagesPerMap;
this.initMemcache();
}

public boolean containsPage(final String sessionId,
final String pageMapName, final int pageId, final int 
pageVersion) {
return getPageMapStore(sessionId).getPageStore(pageMapName)
.containsPage(pageId, pageVersion);
}

public void destroy() {
// nothing to do - PageStores will be destroyed with their 
sessions
}

public Page getPage(final String sessionId, final String pagemap,
final int id, final int versionNumber, final int 
ajaxVersionNumber) {
final SerializedPage sPage = 
getPageMapStore(sessionId).getPageStore(
pagemap).getPage(id, versionNumber, 
ajaxVersionNumber);
   

Re: GAE big table PageStore

2009-12-24 Thread sudhir543-dev


 Last comment on that page is from my self only :)
 It says.. I dont want to keep every thing in session.. and no one would want 
to.
I want 'GAE big table based PageStore'

  

Sudhir NimavatSenior software engineer. 
Quick start global PVT LTD.
Baroda - 390007
Gujarat, India

Personally I'm always ready to learn, although I do not always like being taught
  





From: Ilja Pavkovic 
To: users@wicket.apache.org
Sent: Thu, 24 December, 2009 10:55:27 PM
Subject: Re: GAE big table PageStore

Hi,

http://lmgtfy.com/?q=google+app+engine+wicket

first link :)

Best Regards,
Ilja Pavkovic


Am Donnerstag, 24. Dezember 2009 10:56:51 schrieb sudhir543-...@yahoo.com:
> I need to write app specifically for GAE, I know Disk based page store
>  wouldnt work. Is there any existing solution for this? I searched mailing
>  lists and did googling, seems that it has been discussed earlier too, but
>  I don't find any implementation.
> 
> If I can get a prebuilt solution, I want to avoid my self from writing.
> 
> SN
> 
> 
> 
> 
> 
> Sudhir NimavatSenior software engineer.
> Quick start global PVT LTD.
> Baroda - 390007
> Gujarat, India
> 
> Personally I'm always ready to learn, although I do not always like being
>  taught
> 
> 
>   The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
>  http://in.yahoo.com/
> 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: GAE big table PageStore

2009-12-24 Thread Ilja Pavkovic
Hi,

http://lmgtfy.com/?q=google+app+engine+wicket

first link :)

Best Regards,
Ilja Pavkovic


Am Donnerstag, 24. Dezember 2009 10:56:51 schrieb sudhir543-...@yahoo.com:
> I need to write app specifically for GAE, I know Disk based page store
>  wouldnt work. Is there any existing solution for this? I searched mailing
>  lists and did googling, seems that it has been discussed earlier too, but
>  I don't find any implementation.
> 
> If I can get a prebuilt solution, I want to avoid my self from writing.
> 
> SN
> 
> 
> 
> 
> 
> Sudhir NimavatSenior software engineer.
> Quick start global PVT LTD.
> Baroda - 390007
> Gujarat, India
> 
> Personally I'm always ready to learn, although I do not always like being
>  taught
> 
> 
>   The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
>  http://in.yahoo.com/
> 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



GAE big table PageStore

2009-12-24 Thread sudhir543-dev
I need to write app specifically for GAE, I know Disk based page store wouldnt 
work.
Is there any existing solution for this? I searched mailing lists and did 
googling, seems that it has been discussed earlier too, but I don't find any 
implementation.

If I can get a prebuilt solution, I want to avoid my self from writing.

SN


 
  

Sudhir NimavatSenior software engineer. 
Quick start global PVT LTD.
Baroda - 390007
Gujarat, India

Personally I'm always ready to learn, although I do not always like being taught


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/