Re: [google-appengine] Understanding Security

2011-05-13 Thread Erick Fleming
You are correct.  Google stores and serves static files differently than
Filters/Servlets/Resources.  I know of two alternatives:

1. Store your files as resources
2. Store static content in Datastore

Erick

On Fri, May 13, 2011 at 6:49 PM, Eric Kolotyluk wrote:

> I've been playing around with security in my test app, and was hoping
> someone could confirm my understanding of things.
>
> I have the following in my web.xml
>
>   
> 
>   Protected Site
>   /*
> 
> 
>   *
> 
> 
> CONFIDENTIAL
> 
>   
>
> Which as far as I can tell forces everyone through the Google login no
> matter what URL they use. Is this correct?
>
> I also have
>
>   
> IdentityCheck
> /*
>   
>
> Which as far as I can tell only invokes the filter if a servlet is being
> invoked. It will not invoke a filter for any static content such as an HTML
> file. Is this correct?
>
> I wanted to set up a second level of authentication to force people to
> register another identity with the site, and I thought I could do this with
> the filter by comparing their google ID with a of previously authenticated
> google IDs. That is, they would only have to go through second level
> authentication once, and then the app would automatically them through once
> they authenticated their Google ID.
>
> But if filters only run when invoking a servlet, then static content cannot
> be protect this way because the second level of authentication will never
> get invoked.
>
> Am I understanding this all correctly?
>
> Is there any other mechanism I can use to implement this second level of
> authentication that does cover static content too?
>
> Cheers, Eric
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Understanding Security

2011-05-14 Thread Erick Fleming
>
> If I understand what you are saying, I could make every URL map to a
> servlet, and let the servlet return the specific static pages.
>

Yes.  I generate my static content from simple templates, store them in the
Datastore + Memcache, and serve them through a Servlet.  There's a blog post
by Nick Johnson on this technique for Python (though i can find it now).


>
> Or can I just put my folder of HTML into the resources section, and not
> have to write another servlet?
>

No. You still need a servlet or filter to serve the file out of the
resources


>
> Cheers, Eric
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Understanding Security

2011-05-14 Thread Erick Fleming
Actually I was wrong I on the last point.  If you use appengine_web.xml [1] 
to configure your static files as "excluded" then appengine won't move them 
to the "static" server.  Therefore, you can use a statandard filtering 
mechanism for those files.

[1] 
http://code.google.com/appengine/docs/java/config/appconfig.html#Including_and_Excluding_Files

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Is the order of datastore puts guaranteed?

2011-05-17 Thread Erick Fleming
Within the context of an Entity group, can I guarantee that puts will be in
the order I put them?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Is the order of datastore puts guaranteed?

2011-05-17 Thread Erick Fleming
@Brandon

You are correct, I really care about the order of the records when
retrieving them, so I guess my question should have been "Is the result
order of a query consistent with the put order".

I know I can use DateTime (or Date in Java), but I always need these
Entities in a specific order and was just trying to avoid using the sort.

Thanks for your feedback and especially the humorous example :-)

On Tue, May 17, 2011 at 6:31 PM, Brandon Wirtz  wrote:

> Order often matters.  (I don't know about the context of this app)
>
> Say you are 4th Bank Of Brandon
>
> You process transactions from your customer Strom
>
> Strom has $500 in his account.
>
> Strom hits the Che Target for $450, Cylon's Coffee Shop for $6, the Hair
> Stylist for $50, and Google bills him for each of his for App Engine
> Accounts at $9 each.
>
> Because of the way the bank does caching Strom could make any purchase in a
> 4 hour window up to $600 ($500 plus his $100 overdraft protection)
>
> If we process the charges in the above order, 4BoB charges Strom $35 over
> draft on the last 5 trans actions.
> If we process the charges in the reverse order 4BoB only gets one over
> draft.
> Depending on the order you can have anywhere from 1 to 6 overdrafts when
> the
> daily fee assessment task runs and determines how much Strom owes.
>
> Yes if we put the time stamp in it shouldn't matter which order the items
> were added to the table...  Which is likely the bit that Erick needed. (BTW
> Erick you are both Eric with a C and a K so I'd have thought you'd have
> gotten the redundancy I'm going to explain next...
>
> When you store data that will need to be ordered add the auto DateTime to
> it.  Or the Time the thing took place, like my bank example someone may
> have
> made a purchase on Tuesday that doesn't show up until Thursday and you'd
> want both when you got the transaction and when it happened.
>
> Then sort the returned date by the DateTime, (or that other time thing we
> just discussed) then do whatever you were going to do with the data.
>
> Don't do this...
>
> Strom has
>
> $500
> -450
> = 50
>
> Google sends 4 requests for $9 in 3 seconds
>
> 50-9 = 41
> 50-9=41
> 41-9=32
> 32-9=23
>
> And you missed $9 because you processed each trans action rather than
> batching a lot of transactions but only using data older than a certain
> amount, and without flagging said data as "processed".
>
>
>
>
>
>
> -Original Message-
> From: google-appengine@googlegroups.com
> [mailto:google-appengine@googlegroups.com] On Behalf Of Strom
> Sent: Tuesday, May 17, 2011 3:55 PM
> To: Google App Engine
> Subject: [google-appengine] Re: Is the order of datastore puts guaranteed?
>
> First, the context needs to be a transaction, otherwise there isn't even a
> guarantee that all puts will happen.
> Even inside a transaction though, why does the order matter? I can only
> think of a situation where you use system generated ids, but those aren't
> guaranteed to be in order anyway.
>
> On May 17, 10:02 pm, Erick Fleming  wrote:
> > Within the context of an Entity group, can I guarantee that puts will
> > be in the order I put them?
> >
> > Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Is the order of datastore puts guaranteed?

2011-05-18 Thread Erick Fleming
@Strom

Thanks.  Good idea with "use custom keys for sorting".

On Wed, May 18, 2011 at 3:48 AM, Strom  wrote:

> Brandon, funny example. However I feel that a banking system that
> doesn't reduce your balance inside a transaction is stupid. It's
> certainly something that can't be done in GAE without timestamps.
>
> Erick, so you care about the query result order instead of put order.
> Those are different. You need to sort the results if you want a
> specific order. You could use custom keys for sorting if you want to
> save space in terms of no extra timestamp attributes.
>
>
> On May 18, 2:59 am, Erick Fleming  wrote:
> > @Brandon
> >
> > You are correct, I really care about the order of the records when
> > retrieving them, so I guess my question should have been "Is the result
> > order of a query consistent with the put order".
> >
> > I know I can use DateTime (or Date in Java), but I always need these
> > Entities in a specific order and was just trying to avoid using the sort.
> >
> > Thanks for your feedback and especially the humorous example :-)
> >
> >
> >
> >
> >
> >
> >
> > On Tue, May 17, 2011 at 6:31 PM, Brandon Wirtz 
> wrote:
> > > Order often matters.  (I don't know about the context of this app)
> >
> > > Say you are 4th Bank Of Brandon
> >
> > > You process transactions from your customer Strom
> >
> > > Strom has $500 in his account.
> >
> > > Strom hits the Che Target for $450, Cylon's Coffee Shop for $6, the
> Hair
> > > Stylist for $50, and Google bills him for each of his for App Engine
> > > Accounts at $9 each.
> >
> > > Because of the way the bank does caching Strom could make any purchase
> in a
> > > 4 hour window up to $600 ($500 plus his $100 overdraft protection)
> >
> > > If we process the charges in the above order, 4BoB charges Strom $35
> over
> > > draft on the last 5 trans actions.
> > > If we process the charges in the reverse order 4BoB only gets one over
> > > draft.
> > > Depending on the order you can have anywhere from 1 to 6 overdrafts
> when
> > > the
> > > daily fee assessment task runs and determines how much Strom owes.
> >
> > > Yes if we put the time stamp in it shouldn't matter which order the
> items
> > > were added to the table...  Which is likely the bit that Erick needed.
> (BTW
> > > Erick you are both Eric with a C and a K so I'd have thought you'd have
> > > gotten the redundancy I'm going to explain next...
> >
> > > When you store data that will need to be ordered add the auto DateTime
> to
> > > it.  Or the Time the thing took place, like my bank example someone may
> > > have
> > > made a purchase on Tuesday that doesn't show up until Thursday and
> you'd
> > > want both when you got the transaction and when it happened.
> >
> > > Then sort the returned date by the DateTime, (or that other time thing
> we
> > > just discussed) then do whatever you were going to do with the data.
> >
> > > Don't do this...
> >
> > > Strom has
> >
> > > $500
> > > -450
> > > = 50
> >
> > > Google sends 4 requests for $9 in 3 seconds
> >
> > > 50-9 = 41
> > > 50-9=41
> > > 41-9=32
> > > 32-9=23
> >
> > > And you missed $9 because you processed each trans action rather than
> > > batching a lot of transactions but only using data older than a certain
> > > amount, and without flagging said data as "processed".
> >
> > > -Original Message-
> > > From: google-appengine@googlegroups.com
> > > [mailto:google-appengine@googlegroups.com] On Behalf Of Strom
> > > Sent: Tuesday, May 17, 2011 3:55 PM
> > > To: Google App Engine
> > > Subject: [google-appengine] Re: Is the order of datastore puts
> guaranteed?
> >
> > > First, the context needs to be a transaction, otherwise there isn't
> even a
> > > guarantee that all puts will happen.
> > > Even inside a transaction though, why does the order matter? I can only
> > > think of a situation where you use system generated ids, but those
> aren't
> > > guaranteed to be in order anyway.
> >
> > > On May 17, 10:02 pm, Erick Fleming  wrote:
> > > > Within the context of an Entity group, can I guarantee that puts will
> > > > be in the order I put th

Re: [google-appengine] Re: Is the order of datastore puts guaranteed?

2011-05-18 Thread Erick Fleming
Thanks Jeff,

I read Ikai Lan's blog post
[1<http://ikaisays.com/2011/01/25/app-engine-datastore-tip-monotonically-increasing-values-are-bad/>]
about monotonically increasing
values and datetime on AppEngine, which ultimately prompted me to ask my
question.

I think my scenario is pretty simple, so might help I describe it.

I have the following Entity structure:

Entity: [CommitEntity("1")]
  latestVersion = 2
  count = 2

Entity: [Commit("1")/Event("aaa")]
  version = 1

Entity: [Commit("1")/Event("bbb")]
  version = 2

I'm adding all the Event entities within a transaction and the Commit entity
group, so I should be able to assign a sequential value which is simply an
increment of the latest version (stored in the parent entity) without
contention.

Then, I can get a sorted list of Event entities given a specific Commit key:

val commitKey = KeyFactory.createKey("Commit", "1")

val query = new Query("Event", commitKey).addSort("version")

This works fine now, but I may be naive in thinking this will scale on
AppEngine.

[1]
http://ikaisays.com/2011/01/25/app-engine-datastore-tip-monotonically-increasing-values-are-bad/

On Wed, May 18, 2011 at 2:02 PM, Jeff Schnitzer  wrote:

> To answer your question more specifically... the answer is no.
>
> If you don't apply a sort order, ordering is undefined and may even
> change from query to query.
>
> You can order by __key__ but there is no guarantee that keys increase
> monotonically.
>
> You can create your own datestamp field but keep in mind that clocks
> can (and will) skew between instances.  The amount of skew has no
> guaranteed limit.  So you can pretty much only guarantee ordering for
> put()s from a single instance, and only if you ensure that the
> datestamp actually increments between writes (be careful with batch
> puts).
>
> I've found it necessary to create my own monotonically increasing
> counter using memcache increment to deal with situations like this.
> It is a nontrivial problem.
>
> Jeff
>
> On Tue, May 17, 2011 at 4:59 PM, Erick Fleming  wrote:
> > @Brandon
> > You are correct, I really care about the order of the records when
> > retrieving them, so I guess my question should have been "Is the result
> > order of a query consistent with the put order".
> > I know I can use DateTime (or Date in Java), but I always need these
> > Entities in a specific order and was just trying to avoid using the sort.
> > Thanks for your feedback and especially the humorous example :-)
> > On Tue, May 17, 2011 at 6:31 PM, Brandon Wirtz 
> wrote:
> >>
> >> Order often matters.  (I don't know about the context of this app)
> >>
> >> Say you are 4th Bank Of Brandon
> >>
> >> You process transactions from your customer Strom
> >>
> >> Strom has $500 in his account.
> >>
> >> Strom hits the Che Target for $450, Cylon's Coffee Shop for $6, the Hair
> >> Stylist for $50, and Google bills him for each of his for App Engine
> >> Accounts at $9 each.
> >>
> >> Because of the way the bank does caching Strom could make any purchase
> in
> >> a
> >> 4 hour window up to $600 ($500 plus his $100 overdraft protection)
> >>
> >> If we process the charges in the above order, 4BoB charges Strom $35
> over
> >> draft on the last 5 trans actions.
> >> If we process the charges in the reverse order 4BoB only gets one over
> >> draft.
> >> Depending on the order you can have anywhere from 1 to 6 overdrafts when
> >> the
> >> daily fee assessment task runs and determines how much Strom owes.
> >>
> >> Yes if we put the time stamp in it shouldn't matter which order the
> items
> >> were added to the table...  Which is likely the bit that Erick needed.
> >> (BTW
> >> Erick you are both Eric with a C and a K so I'd have thought you'd have
> >> gotten the redundancy I'm going to explain next...
> >>
> >> When you store data that will need to be ordered add the auto DateTime
> to
> >> it.  Or the Time the thing took place, like my bank example someone may
> >> have
> >> made a purchase on Tuesday that doesn't show up until Thursday and you'd
> >> want both when you got the transaction and when it happened.
> >>
> >> Then sort the returned date by the DateTime, (or that other time thing
> we
> >> just discussed) then do whatever you were going to do with the data.
> >>
> >> Don't do this...
> >>
> >

Re: [google-appengine] Bug in Channel API with non-default HR app.

2011-05-22 Thread Erick Fleming
this was discussed on another thread [1] and a google engineer "reported
it", but no issue was opened.  I starred your issue.

[1]
https://groups.google.com/d/topic/google-appengine-java/bnwFHOoh0jQ/discussion

On Sat, May 21, 2011 at 11:20 PM, Calvin  wrote:

> Okay, I think I finally narrowed down this bug that's been blocking me all
> day.
>
> When you create a channel on the non-default version of a high-replication
> app you will get a InvalidChannelClientIdError when you attempt to send on
> that channel.
>
> http://code.google.com/p/googleappengine/issues/detail?id=5093
>
> Sounds crazy, but that's what I narrowed it down to.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Get and Post in Mail Service

2010-11-18 Thread Erick Fleming
what's your form and routing code look like?

On Thu, Nov 18, 2010 at 2:52 PM, Zeynel  wrote:
> Hello,
>
> I am trying to send email by using the examples in the tutorial:
>
> http://code.google.com/appengine/docs/python/mail/overview.html
>
>
> 
> class MainPage(webapp.RequestHandler):
>    def get(self):
>
>        message = mail.EmailMessage(sender="sen...@gmail.com",
>                                    subject="test email from app")
>        message.to = "recei...@gmail.com"
>        message.body = "Hello"
>
>        message.send()
>
>    def post(self):
>        user_address = "recei...@gmail.com"
>
>        confirmation_url = "http://support.example.com/";
>        sender_address = "sen...@gmail.com"
>        subject = "confirm your registration"
>        body = "Click on the link  %s " % confirmation_url
>
>        mail.send_mail(sender_address, user_address, subject, body)
> **
>
> The first version works; but the second one works only if I change it
> to "get":
>
>    def get(self):
>        user_address = "a...@gmail.com"
>        
>
> Can anyone explain how get and post work in this context. Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>



-- 
Erick Fleming

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Get and Post in Mail Service

2010-11-18 Thread Erick Fleming
Robert is correct.  You either need to have an HTML form in order to
create a POST request, or you could use a program like curl from the
command line.

On Thu, Nov 18, 2010 at 4:31 PM, Zeynel  wrote:
> On Nov 18, 4:45 pm, Erick Fleming  wrote:
>> what's your form and routing code look like?
>
> Hi Erick,
>
> That's the entire code. I hardcoded the emails; there is no form; I am
> just trying to make sending/receiving email work.
>
> For routing I have this:
>
> application = webapp.WSGIApplication(
>                                     [('/', MainPage),
>                                      ],
>                                     debug=True)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>



-- 
Erick Fleming

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] how to select first entity from a BigTable

2010-12-04 Thread Erick Fleming
are you using python or java?

On Sat, Dec 4, 2010 at 9:43 AM, YF CAO  wrote:

> Hi.
> in google app engine, how to select first entity from a bigtable.
> like this sql:
> select AGE from TABLENAME where order by AGE desc limit 1.
> or like:
> select max(AGE) from TABLENAME.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Erick Fleming

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: how to select first entity from a BigTable

2010-12-04 Thread Erick Fleming
In Java you can use Query cursors to [1] limit your results.  As far as
aggregate functions (like MIN and MAX) you can use [2] indexes to achieve
the similar result (ie. order by age and get the top result)

[1]
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors
<http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors>
[2]
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Indexes
<http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Indexes>
On Sat, Dec 4, 2010 at 10:31 AM, Jeff Schwartz wrote:

> Conceptually they are tables, but not in the same sense as SQL tables. They
> are more like a hash map and if you think of them in those terms you will be
> better served.
>
> Are you coding in Python or Java. If you are coding in Java then here's an
> example:
>
> query(Some.class).order('age').limit(1).get()
>
>
> On Sat, Dec 4, 2010 at 11:16 AM, Zeynel  wrote:
>
>> On Dec 4, 11:08 am, Tim Hoffman  wrote:
>> > Remember there are no tables. Just kinds representing models.
>>
>> I am confused by this statement. When I look at the Development
>> Console - Datastore Viewer; I see a table named after the model. In my
>> case, I have a table called User with columns "userEmail", "userName"
>> and so on. Each row in this table is what the documentation calls an
>> "instance" of the class. So what is the justification for the
>> statement that there are no tables?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appeng...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>
>
> --
> *Jeff Schwartz*
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Erick Fleming

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: how to select first entity from a BigTable

2010-12-04 Thread Erick Fleming
Jeff, I interpreted the meat of his question to be related to advanced
queries.  As such I was just pointing him to the two areas of documentation
that spell out how these queries worked (which also has an example of
withLimit).  You had already answered his question with a valid response, so
I was just providing the more info.

On Sat, Dec 4, 2010 at 10:59 AM, Jeff Schwartz wrote:

> Odd but I don't see him needing either cursors or 2 indexes to achieve his
> required result and it doesn't even need a filter condition. IMO it just
> requires a descending ordering with a limit of 1.
>
> On Sat, Dec 4, 2010 at 11:38 AM, Erick Fleming wrote:
>
>> In Java you can use Query cursors to [1] limit your results.  As far as
>> aggregate functions (like MIN and MAX) you can use [2] indexes to achieve
>> the similar result (ie. order by age and get the top result)
>>
>> [1]
>> http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors
>> <http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors>
>> [2]
>> http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Indexes
>> <http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Indexes>
>> On Sat, Dec 4, 2010 at 10:31 AM, Jeff Schwartz 
>> wrote:
>>
>>> Conceptually they are tables, but not in the same sense as SQL tables.
>>> They are more like a hash map and if you think of them in those terms you
>>> will be better served.
>>>
>>> Are you coding in Python or Java. If you are coding in Java then here's
>>> an example:
>>>
>>> query(Some.class).order('age').limit(1).get()
>>>
>>>
>>> On Sat, Dec 4, 2010 at 11:16 AM, Zeynel  wrote:
>>>
>>>> On Dec 4, 11:08 am, Tim Hoffman  wrote:
>>>> > Remember there are no tables. Just kinds representing models.
>>>>
>>>> I am confused by this statement. When I look at the Development
>>>> Console - Datastore Viewer; I see a table named after the model. In my
>>>> case, I have a table called User with columns "userEmail", "userName"
>>>> and so on. Each row in this table is what the documentation calls an
>>>> "instance" of the class. So what is the justification for the
>>>> statement that there are no tables?
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google App Engine" group.
>>>> To post to this group, send email to google-appeng...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-appengine+unsubscr...@googlegroups.com
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-appengine?hl=en.
>>>>
>>>>
>>>
>>>
>>> --
>>> *Jeff Schwartz*
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine" group.
>>> To post to this group, send email to google-appeng...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine?hl=en.
>>>
>>
>>
>>
>> --
>> Erick Fleming
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appeng...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>
>
>
> --
> *Jeff Schwartz*
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Erick Fleming

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Java server side i18n?

2010-12-09 Thread Erick Fleming
Java has a fair amount of i18n built-in [1], are you using JSPs or
some other template engine?

[1] http://java.sun.com/javase/technologies/core/basic/intl/

On Thu, Dec 9, 2010 at 12:48 PM, nacho  wrote:
> How can i use internationalization over appengine (java) on the server
> side?
>
> Does any one have any idea?
>
> I've been googling but all the posts that i find are for python
> appengine.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>



-- 
Erick Fleming

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Using closure with channel API

2010-12-16 Thread Erick Fleming
This is great news.  Thanks for the update.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Billing and Google checkout with Google Apps account

2011-01-21 Thread Erick Fleming
PK,

I just switched my billing admin to my Google Apps account two days ago, if
that's what you are referring to.

On Thu, Jan 20, 2011 at 5:15 PM, PK  wrote:

> I read in the site that Google checkout is only possible with a
> regular individual Google account. I just migrated my Google Apps
> domain, among other improvements I now see that it allows many
> services including Google Checkout.
>
> So I am wondering is the stated restriction still in place for even
> for accounts in migrated Google Apps Domains?
>
> Thanks,
> PK
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] if my Java app uses GAE services, can I run my app in Tomcat or Jetty or GWT Development mode ? or the GAE services would not be available in those environments ?

2011-02-26 Thread Erick Fleming
No. If you are using any AppEngine specific API calls, then you have to run
in the GAE dev server (or third party implementation like
AppScale.


However, many of the services are abstracted into standard Java EE APIs so
in theory it's possible to build an application that runs in any servlet
environment and then deploy to AppEngine.


On Sat, Feb 26, 2011 at 7:59 PM, zixzigma  wrote:

> I am writing a Java app for GAE,
> and use maven build tool, which has plugins for jetty, tomcat, gwt, gae.
>
> If I use GAE Services, such as Cache, ImageService, etc,
> can I still run my App in typical Jetty/Tomcat or GWT Development mode ?
>
> or I need to use maven-gae plugin for the emulated GAE Services be present
> ?
>
>
> Thank You
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] what are GAE required Java .jar libraries (Maven Dependencies)

2011-02-26 Thread Erick Fleming
These guys [1 ] have everything
concerning Maven and AppEngine figured out if you have not seen them.

[1] http://code.google.com/p/maven-gae-plugin/

On Sat, Feb 26, 2011 at 8:57 PM, zixzigma  wrote:

> Hello Everyone,
> I could not find any documentation on GAE Java required libraries
> (dependencies).
> I have the following configuration, but I guess it is redundant,
> in addition I have come across two .jar files which I don't know the
> difference between the two,
> namely: appengine-java-sdk vs appengine-api1.0-sdk
> do you know which one should be used ?
>
> you can find my pom.xml here:
> http://pastebin.com/BEuwJ4ZV
>
> could you please suggest, which dependencies I need to add/remove ?
> (including for testing)
>
> Thank Yoiu
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.