[appengine-java] Re: Sending mail with the mail api

2009-09-08 Thread king

I have the same problem. I sent out 3 email and have been waiting for
hours, still no email arrived at my inbox, there is no error message
either. Does anyone have any update on this issue?


On Aug 20, 12:00 pm, DrMorten 
wrote:
> Nothing in the log about failed messages. I've made a Grails Service
> sending my emails. Basiclly I just cut and pasted the info 
> fromhttp://code.google.com/appengine/docs/java/mail/usingjavamail.html,
> and modified it to fit my needs. Just as a quick version to get it
> working. I pasted the service below.
>
> class MailService {
>
>         boolean transactional = true
>
>         def sendMail(subject, msgBody, from, fromText, too, tooText) {
>
>                 Properties props = new Properties();
>                 Session session = Session.getDefaultInstance(props, null);
>
>                 try {
>                         def msg = new MimeMessage(session);
>                         msg.setFrom(new InternetAddress(from, fromText));
>                         msg.addRecipient(Message.RecipientType.TO,
>                                                         new 
> InternetAddress(too, tooText));
>                         msg.setSubject(subject);
>                         msg.setText(msgBody);
>                         Transport.send(msg);
>
>                 } catch (AddressException e) {
>                         log.error("address error sendingmail", e)
>                 } catch (MessagingException e) {
>                         log.error("messaging exception sendingmail", e)
>                 }
>
>         }
>
> }
>
> On Aug 20, 8:48 pm, "Jason (Google)"  wrote:
>
>
>
> > Did you check your application's logs to see if there were any errors
> > sending the messages? What code were you using to send the emails?
> > - Jason
>
> > On Wed, Aug 19, 2009 at 7:47 AM, DrMorten 
> > > wrote:
>
> > > I sent about 7 emails last night to my own email address. They havnt
> > > arrived, Ive checked the code and the addresses were right. The Quotas
> > > say that I've sent the e-mails.
>
> > > Anyone have an idea of how long it should take to send to a gmail
> > > address?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Sending mail with the mail api

2009-09-09 Thread king

Hi Richard, did you set the send address to your gmail account or
myn...@mycompany.com ?  I did the latter, and it is not going
anywhere.  However, if I log in to mail.mycompany.com hosted on google
apps, I can send and receive mail without any problem.  I also look
into the GAE's email sent counter, it does increment correctly.  I
also tried both the code sample in the tutorial as well as the one
posted by Sadhasivam Jayabalaganesan above, both gets the GAE email
counter incremented but no email arrives in my inbox.   So I don't
know where the problem is.  Could you post your code and perhaps I can
simply copy and paste to my GAE environment?  Thanks in advance.

On Sep 9, 6:18 am, Richard Le Mesurier 
wrote:
> Hi, I know it shouldn't make a difference if its Java or Grails, but
> my code (also copied from the same tutorial) is still working today
> (on the app server).
>
> It took a matter of seconds for the mail to hit my inbox and thats
> taking into account a slowish undersea cable connection to Africa...
> i.e. it should be practically instantaneous.
>
> But as I say - I'm using pure Java.
>
> Richard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] when will BigDecimal be supported in datastore?

2009-09-18 Thread king

I want to manipulate currency in GAE.  The datastore data type spec
doesn't have BigDecimal.  When will it be supported?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: when will BigDecimal be supported in datastore?

2009-09-19 Thread king

thanks Clay, that's exactly what I am doing now, but that approach
takes extra processing cycle, it would be great if GAE can support
bigdecimal intrinsically.

On Sep 19, 9:20 am, Clay Lenhart  wrote:
> One option is to store the values as a Long in the datastore and have
> the value represent cents not dollars (or pence not pounds)
>
> -Clay
>
> On Sep 19, 3:16 am, king  wrote:
>
>
>
> > I want to manipulate currency in GAE.  The datastore data type spec
> > doesn't haveBigDecimal.  When will it be supported?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] using contains(Key) in JDO query

2009-10-21 Thread king

Can anyone help me to figure out how to write a query to do contains
(Key) in JDO?  Here is my scriplet:
select from " + master.class.getName()
+ " where detailKeySet.contains('" + detail.getKey().toString() + "')"

where detailKeySet is a Set collection holding all the keys of
the details for the master.

I ran it in GAE and it doesn't return anything even though I do have
the deailKeySet populated with detail.getKey().  Please help, thanks a
lot in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: using contains(Key) in JDO query

2009-10-22 Thread king

Thanks Yasuo, it works!  Do you know how I can set filter for multiple
keys? that is, how I can do something like:
query.setFilter("detailKeySet.contains(:keyList)");

On Oct 21, 10:36 pm, Yasuo Higa  wrote:
> Hi king,
>
> On Thu, Oct 22, 2009 at 6:19 AM, king  wrote:
>
> > Can anyone help me to figure out how to write a query to do contains
> > (Key) in JDO?  Here is my scriplet:
> > select from " + master.class.getName()
> > + " where detailKeySet.contains('" + detail.getKey().toString() + "')"
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
> Query query = pm.newQuery(Master.class);
> query.setFilter("detailKeySet.contains(:key)");
> List list = (List) query.execute(detail.getKey());
>
> Hope this helps,
>
> Yasuo Higa
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: using contains(Key) in JDO query

2009-10-23 Thread king

Thanks so much for the feedback.  I actually tried to extend the Key
CONTAINS concept to other fields but ran into a big wall right away.
It would be great to get your 2 cents.  Here is the root of my
problem:

I have a student object, it has a number of qualifying attributes, for
example:
int gpa: 1 = 0 to 2.0, 2 = 2.0 to 3.0, 3 = 3.0 to 4.0
int ageGroup: 1 = 0 to 17, 2 = 18 to 30, 3 = 30 to 65, 4 = 65+
ArrayList schoolPreference: [0] = 'MIT', [1] = 'Stanford', [2] =
'Harvard', [3] = 'Yale'

Now, I need to create a query to find out all the students where (gpa
= 2 or gpa = 3) AND (age group = 3 or age group = 4) AND
(schoolPreference contains MIT or Yale, or both)

As far as I know, GAE doesn't support OR operator in a query, so the
only way I can get the query above to work is to have multiple sub-
queries and do a manual join on all the datastore resultsets to
artificially create a union. If so, big problem arises:

Since I have so many OR sub-conditions, if every OR translates into a
separate sub-query, literally speaking, I need to do a full
permutation of all the conditions (full product of all the OR and AND
conditions)  in all my sub-queries to achieve my goal, which doesn't
make any sense if I keep adding more value types (such as more schools
being selected in the student preference criteria) into my attributes,
not to mention adding more attributes to my student object.  Is there
any way to accomplish this query in GAE?  Your help is greatly
appreciated because this can be the deal breaker of whether my whole
project can migrate to GAE or not.  Thanks a lot in advance.

On Oct 23, 1:51 am, Yasuo Higa  wrote:
> Hi Andy,
>
> >> query.setFilter("key == :keyList");
> >> List list = (List) query.execute(keyList);
>
> > I'd like to know if that works with GAE/J, because it is illegal JDOQL
> > syntax and would be a bug. JDOQL is supposed to follow Java syntax,
> > and you simply cannot do
> > Key == List
> > and get success in Java.
>
> You are right, but unfortunately the above query works on GAE/J.
>
> I should have recommended the following query:
>
> List keys = ...;
> List ids = new ArrayList();
> for (Key key : keys) {
>     ids.add(pm.newObjectIdInstance(Master.class, key));}
>
> List list = (List) pm.getObjectsById(ids);
>
> Thanks,
>
> Yasuo Higa
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: using contains(Key) in JDO query

2009-10-26 Thread king

Hi there, can anyone from Google shines some light on the issue I
posted last week?  I just need to find out if it is a major limitation
on google's part with no workaround so that I can move forward
accordingly. Thanks a lot.

On Oct 23, 11:01 am, king  wrote:
> Thanks so much for the feedback.  I actually tried to extend the Key
> CONTAINS concept to other fields but ran into a big wall right away.
> It would be great to get your 2 cents.  Here is the root of my
> problem:
>
> I have a student object, it has a number of qualifying attributes, for
> example:
> int gpa: 1 = 0 to 2.0, 2 = 2.0 to 3.0, 3 = 3.0 to 4.0
> int ageGroup: 1 = 0 to 17, 2 = 18 to 30, 3 = 30 to 65, 4 = 65+
> ArrayList schoolPreference: [0] = 'MIT', [1] = 'Stanford', [2] =
> 'Harvard', [3] = 'Yale'
>
> Now, I need to create a query to find out all the students where (gpa
> = 2 or gpa = 3) AND (age group = 3 or age group = 4) AND
> (schoolPreference contains MIT or Yale, or both)
>
> As far as I know, GAE doesn't support OR operator in a query, so the
> only way I can get the query above to work is to have multiple sub-
> queries and do a manual join on all the datastore resultsets to
> artificially create a union. If so, big problem arises:
>
> Since I have so many OR sub-conditions, if every OR translates into a
> separate sub-query, literally speaking, I need to do a full
> permutation of all the conditions (full product of all the OR and AND
> conditions)  in all my sub-queries to achieve my goal, which doesn't
> make any sense if I keep adding more value types (such as more schools
> being selected in the student preference criteria) into my attributes,
> not to mention adding more attributes to my student object.  Is there
> any way to accomplish this query in GAE?  Your help is greatly
> appreciated because this can be the deal breaker of whether my whole
> project can migrate to GAE or not.  Thanks a lot in advance.
>
> On Oct 23, 1:51 am, Yasuo Higa  wrote:
>
>
>
> > Hi Andy,
>
> > >> query.setFilter("key == :keyList");
> > >> List list = (List) query.execute(keyList);
>
> > > I'd like to know if that works with GAE/J, because it is illegal JDOQL
> > > syntax and would be a bug. JDOQL is supposed to follow Java syntax,
> > > and you simply cannot do
> > > Key == List
> > > and get success in Java.
>
> > You are right, but unfortunately the above query works on GAE/J.
>
> > I should have recommended the following query:
>
> > List keys = ...;
> > List ids = new ArrayList();
> > for (Key key : keys) {
> >     ids.add(pm.newObjectIdInstance(Master.class, key));}
>
> > List list = (List) pm.getObjectsById(ids);
>
> > Thanks,
>
> > Yasuo Higa
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: using contains(Key) in JDO query

2009-10-27 Thread king

Jason, thanks for the feedback.  The issue with this boolean approach
is that the queries are all dynamically generated, depending on the
options selected in the search configurator.  So there is no way to
know at record write time what flags to set unless I work out
thousands of possible boolean flags in advance (full permutation of
all the ever expanding filter values available, such as in the
schoolPreference ArrayList, we keep adding new schools, which can be
an infinite set).  Any other workaround is greatly welcome.

Is the OR query operator on the roadmap for GAE?  If so, what time
frame would that be?



On Oct 27, 2:41 pm, "Jason (Google)"  wrote:
> While App Engine's datastore does limit which queries you're able to
> execute, there are various workarounds, which, while not ideal from a
> development point of view, do ensure that query execution time is minimized
> so your app can achieve the best possible scalability. One common pattern is
> determining whether an entity meets the conditions of a certain query at
> write time, then setting a boolean flag on that entity. When you need to run
> the query, instead of managing multiple sub-queries and merging, you only
> need to filter on this boolean field. When new queries are added, you can
> run a task to re-process all existing entities and set their flags
> accordingly. This is quite different from executing your query on runtime,
> but should be much more efficient.
>
> - Jason
>
>
>
> On Mon, Oct 26, 2009 at 10:22 AM, king  wrote:
>
> > Hi there, can anyone from Google shines some light on the issue I
> > posted last week?  I just need to find out if it is a major limitation
> > on google's part with no workaround so that I can move forward
> > accordingly. Thanks a lot.
>
> > On Oct 23, 11:01 am, king  wrote:
> > > Thanks so much for the feedback.  I actually tried to extend the Key
> > > CONTAINS concept to other fields but ran into a big wall right away.
> > > It would be great to get your 2 cents.  Here is the root of my
> > > problem:
>
> > > I have a student object, it has a number of qualifying attributes, for
> > > example:
> > > int gpa: 1 = 0 to 2.0, 2 = 2.0 to 3.0, 3 = 3.0 to 4.0
> > > int ageGroup: 1 = 0 to 17, 2 = 18 to 30, 3 = 30 to 65, 4 = 65+
> > > ArrayList schoolPreference: [0] = 'MIT', [1] = 'Stanford', [2] =
> > > 'Harvard', [3] = 'Yale'
>
> > > Now, I need to create a query to find out all the students where (gpa
> > > = 2 or gpa = 3) AND (age group = 3 or age group = 4) AND
> > > (schoolPreference contains MIT or Yale, or both)
>
> > > As far as I know, GAE doesn't support OR operator in a query, so the
> > > only way I can get the query above to work is to have multiple sub-
> > > queries and do a manual join on all the datastore resultsets to
> > > artificially create a union. If so, big problem arises:
>
> > > Since I have so many OR sub-conditions, if every OR translates into a
> > > separate sub-query, literally speaking, I need to do a full
> > > permutation of all the conditions (full product of all the OR and AND
> > > conditions)  in all my sub-queries to achieve my goal, which doesn't
> > > make any sense if I keep adding more value types (such as more schools
> > > being selected in the student preference criteria) into my attributes,
> > > not to mention adding more attributes to my student object.  Is there
> > > any way to accomplish this query in GAE?  Your help is greatly
> > > appreciated because this can be the deal breaker of whether my whole
> > > project can migrate to GAE or not.  Thanks a lot in advance.
>
> > > On Oct 23, 1:51 am, Yasuo Higa  wrote:
>
> > > > Hi Andy,
>
> > > > >> query.setFilter("key == :keyList");
> > > > >> List list = (List) query.execute(keyList);
>
> > > > > I'd like to know if that works with GAE/J, because it is illegal
> > JDOQL
> > > > > syntax and would be a bug. JDOQL is supposed to follow Java syntax,
> > > > > and you simply cannot do
> > > > > Key == List
> > > > > and get success in Java.
>
> > > > You are right, but unfortunately the above query works on GAE/J.
>
> > > > I should have recommended the following query:
>
> > > > List keys = ...;
> > > > List ids = new ArrayList();
> > > > for (Key key : keys) {
> > > >     ids.add(pm.newObjectIdInstance(Master.class, key));}
>
> > > > List list = (List) pm.getObjectsById(ids);
>
> > > > Thanks,
>
> > > > Yasuo Higa
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] JDO multi-dimensional array support

2009-10-28 Thread king

Hi there, does GAE JDO support something like:

@Persistent
private int [][][] 3d_grid;

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



[appengine-java] can image aspect ratio

2009-12-01 Thread king
In the image library provided by google, in the function:
Transform resize = ImagesServiceFactory.makeResize(width, height);

It seems like the resized image is always taking the height and ignore
the width.
Can anyone tell me how I can change the aspect ratio?

--

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




[appengine-java] Re: can image aspect ratio

2009-12-02 Thread king
Hi Moissinac, thanks for replying.  Actually I don't really care if
it's a feature or bug, I just want to know how I can change the aspect
ratio.  Any help would be greatly appreciated.


On Dec 2, 1:51 am, moissinac  wrote:
> The Overview about the Image service Resize says
> "You can resize the image while maintaining the same aspect ratio."
>
> It seems that it's a feature not a bug!

--

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




[appengine-java] Re: select count(*) ?

2009-12-02 Thread king
Jason, do you have a timeline for when:
1. the cursor feature will be available?
2. the data download feature be available for JAVA (not Python).


On Oct 21, 10:54 am, "Jason (Google)"  wrote:
> The query restrictions are an artifact of the way App Engine's datastore is
> constructed, which makes certain operations (e.g. queries and reads) very
> fast and scalable but does limit the types of queries you can make, though
> you can typically get around these restrictions by re-thinking your model a
> bit.
>
> We are working on adding built-in cursor support for easier paging through
> entities and have just added a datastore statistics API for, among other
> things, getting the total entity count, even if it exceeds 1,000. More
> details here:
>
> http://code.google.com/appengine/docs/java/datastore/stats.html
>
> And we also have a data export utility included with the SDK to make it
> easier for you to back up or even move off of App Engine should you choose
> to, and we're continuing to look at ways of making App Engine, particularly
> the datastore component, easier to use.
>
> http://code.google.com/appengine/docs/python/tools/uploadingdata.html...
>
> - Jason
>
>
>
> On Mon, Oct 19, 2009 at 1:53 PM, vetch  wrote:
>
> > On 6 Paź, 10:03, "Jason (Google)"  wrote:
> > > * Because App Engine queries can only return up to 1,000 results,
> > > count(this) will never return above 1,000, even if you have more than
> > 1,000
> > > entities, so bear this in mind.
>
> > I'm deeply shocked. This works like some black hole.
>
> > You put your data there simply, but can't get them back that simply.
>
> > In connection with restricions (inequality property filter), it is
> > even harder to get anything more complex.
>
> > BiGAppEngine disappointment.

--

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




[appengine-java] Re: select count(*) ?

2009-12-17 Thread king
can anyone shine some lights on when the java datastore export will be
available?

On Dec 2, 11:19 am, king  wrote:
> Jason, do you have a timeline for when:
> 1. the cursor feature will be available?
> 2. the data download feature be available for JAVA (not Python).
>
> On Oct 21, 10:54 am, "Jason (Google)"  wrote:
>
>
>
> > The query restrictions are an artifact of the way App Engine'sdatastoreis
> > constructed, which makes certain operations (e.g. queries and reads) very
> > fast and scalable but does limit the types of queries you can make, though
> > you can typically get around these restrictions by re-thinking your model a
> > bit.
>
> > We are working on adding built-in cursor support for easier paging through
> > entities and have just added adatastorestatistics API for, among other
> > things, getting the total entity count, even if it exceeds 1,000. More
> > details here:
>
> >http://code.google.com/appengine/docs/java/datastore/stats.html
>
> > And we also have a dataexportutility included with the SDK to make it
> > easier for you to back up or even move off of App Engine should you choose
> > to, and we're continuing to look at ways of making App Engine, particularly
> > thedatastorecomponent, easier to use.
>
> >http://code.google.com/appengine/docs/python/tools/uploadingdata.html...
>
> > - Jason
>
> > On Mon, Oct 19, 2009 at 1:53 PM, vetch  wrote:
>
> > > On 6 Paź, 10:03, "Jason (Google)"  wrote:
> > > > * Because App Engine queries can only return up to 1,000 results,
> > > > count(this) will never return above 1,000, even if you have more than
> > > 1,000
> > > > entities, so bear this in mind.
>
> > > I'm deeply shocked. This works like some black hole.
>
> > > You put your data there simply, but can't get them back that simply.
>
> > > In connection with restricions (inequality property filter), it is
> > > even harder to get anything more complex.
>
> > > BiGAppEngine disappointment.

--

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




[appengine-java] Re: select count(*) ?

2010-01-06 Thread king
just to follow up on a pending question back a few months ago.  When
the java datastore export will be
available?




On Dec 18 2009, 2:47 am, Jorge  wrote:
> I second this question.
>
> Jorge Gonzalez
>
> On Dec 2, 1:19 pm, king  wrote:
>
>
>
> > Jason, do you have a timeline for when:
> > 1. the cursor feature will be available?
> > 2. the data download feature be available for JAVA (not Python).
>
> > On Oct 21, 10:54 am, "Jason (Google)"  wrote:
>
> > > The query restrictions are an artifact of the way App Engine's datastore 
> > > is
> > > constructed, which makes certain operations (e.g. queries and reads) very
> > > fast and scalable but does limit the types of queries you can make, though
> > > you can typically get around these restrictions by re-thinking your model 
> > > a
> > > bit.
>
> > > We are working on adding built-in cursor support for easier paging through
> > > entities and have just added a datastore statistics API for, among other
> > > things, getting the total entity count, even if it exceeds 1,000. More
> > > details here:
>
> > >http://code.google.com/appengine/docs/java/datastore/stats.html
>
> > > And we also have a data export utility included with the SDK to make it
> > > easier for you to back up or even move off of App Engine should you choose
> > > to, and we're continuing to look at ways of making App Engine, 
> > > particularly
> > > the datastore component, easier to use.
>
> > >http://code.google.com/appengine/docs/python/tools/uploadingdata.html...
>
> > > - Jason
>
> > > On Mon, Oct 19, 2009 at 1:53 PM, vetch  wrote:
>
> > > > On 6 Paź, 10:03, "Jason (Google)"  wrote:
> > > > > * Because App Engine queries can only return up to 1,000 results,
> > > > > count(this) will never return above 1,000, even if you have more than
> > > > 1,000
> > > > > entities, so bear this in mind.
>
> > > > I'm deeply shocked. This works like some black hole.
>
> > > > You put your data there simply, but can't get them back that simply.
>
> > > > In connection with restricions (inequality property filter), it is
> > > > even harder to get anything more complex.
>
> > > > BiGAppEngine disappointment.
-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] synchronous task queue support

2010-04-26 Thread king
Hi all, I encounter a queueing related challenge and need you guys'
help badly:

The use case is that I have 3 tasks that I want to insert into the
queue. Each task takes about 20 seconds to complete.  The challenge is
that task # 3 depends on task # 2, and task # 2 depends on task # 1.
The question is, how can I insert those 3 tasks and expect task 1 be
finished before task 2 starts, and task 2 be finished before task 3
starts?

Base upon my current knowledge about GAE, I am thinking about wrapping
a new transaction around every single task such as follows:

-
// run task #1
Queue queue = QueueFactory.getDefaultQueue();
Transaction tx = pm.currentTransaction();
try {
  tx.begin();
 
queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
TaskOptions().url("/task1.jsp"));
  tx.commit();
} finally {  if (tx.isActive()) { tx.rollback();} }


// run task #2
tx = pm.currentTransaction();
try {
  tx.begin();
 
queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
TaskOptions().url("/task2.jsp"));
  tx.commit();
} finally {  if (tx.isActive()) { tx.rollback();} }


// run task #3
tx = pm.currentTransaction();
try {
  tx.begin();
 
queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
TaskOptions().url("/task2.jsp"));
  tx.commit();
} finally {  if (tx.isActive()) { tx.rollback();} }
-

where task2.jsp and task3.jsp both perform select, update and insert
operations based upon the datastore contents from the prior tasks (ie,
task 3 depends on task 2, and task 2 depends on task 1).

Is this the right way to implement the synchronous queued tasks?  Is
there a better solution out there offered by GAE?  Your help is
greatly appreciated and thanks in advance.

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



[appengine-java] Re: synchronous task queue support

2010-04-26 Thread king
sorry for the typo, the last queue.add statement should be:

queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransacti
on(),
TaskOptions().url("/task3.jsp"));

Your help is greatly appreciated :)


On Apr 26, 2:53 pm, king  wrote:
> Hi all, I encounter a queueing related challenge and need you guys'
> help badly:
>
> The use case is that I have 3 tasks that I want to insert into the
> queue. Each task takes about 20 seconds to complete.  The challenge is
> that task # 3 depends on task # 2, and task # 2 depends on task # 1.
> The question is, how can I insert those 3 tasks and expect task 1 be
> finished before task 2 starts, and task 2 be finished before task 3
> starts?
>
> Base upon my current knowledge about GAE, I am thinking about wrapping
> a new transaction around every single task such as follows:
>
> -
> // run task #1
> Queue queue = QueueFactory.getDefaultQueue();
> Transaction tx = pm.currentTransaction();
> try {
>   tx.begin();
>
> queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransacti 
> on(),
> TaskOptions().url("/task1.jsp"));
>   tx.commit();
>
> } finally {  if (tx.isActive()) { tx.rollback();} }
>
> // run task #2
> tx = pm.currentTransaction();
> try {
>   tx.begin();
>
> queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransacti 
> on(),
> TaskOptions().url("/task2.jsp"));
>   tx.commit();
>
> } finally {  if (tx.isActive()) { tx.rollback();} }
>
> // run task #3
> tx = pm.currentTransaction();
> try {
>   tx.begin();
>
> queue.add(DatastoreServiceFactory.getDatastoreService().getCurrentTransacti 
> on(),
> TaskOptions().url("/task2.jsp"));
>   tx.commit();} finally {  if (tx.isActive()) { tx.rollback();} }
>
> -
>
> where task2.jsp and task3.jsp both perform select, update and insert
> operations based upon the datastore contents from the prior tasks (ie,
> task 3 depends on task 2, and task 2 depends on task 1).
>
> Is this the right way to implement the synchronous queued tasks?  Is
> there a better solution out there offered by GAE?  Your help is
> greatly appreciated and thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] full text search tutorial wanted

2010-05-27 Thread king
I need your help.  I am building a prototype to index text documents
for my school.  The students will upload their paper through browser
and my gae apps is supposed to index them and make them searchable.
Is lucene the best solution on GAE?  If so, could you show me a very
simple (WITHOUT struts2, spring, hibernate, etc..) tutorial of how to
use lucene with GAE?  The lucene example in googlecode is read-only
and require off-line index building, which doesn't work with dynamic
document upload. Your help is greatly greatly appreciated. Thanks in
advance.

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



[appengine-java] Re: full text search tutorial wanted

2010-05-28 Thread king
thanks everybody for the feedback :)

On May 28, 10:17 am, nicolas melendez  wrote:
> Tristan, your solution is creative and good, but you have a limit of 5000
> documents per account in google documents.
> NM
>
> On Fri, May 28, 2010 at 12:53 PM, Tristan wrote:
>
>
>
>
>
> > For what you're trying to do perhaps you should consider this instead:
>
> > Create a Google Apps account. Use the Goole Document List API to
> > upload the documents to an application account in Google Apps,
> > something like  ("applicat...@myapp.com"). Then when somebody submits
> > a query, just use Google Document List API full text search to return
> > results.  See here:
>
> >http://code.google.com/apis/documents/docs/3.0/developers_guide_java
>
> > Your GAE app would be the go-between the user and your private
> > application Google Apps account. And it should be a lot faster and
> > easier to implement.
>
> > Cheers!
>
> > Tristan
>
> > On May 28, 3:57 am, Nacho Coloma  wrote:
> > > If your website is public you can also use the google search Ajax API
> > > (with a site: query) and parse the returned URLs if needed.
>
> > > On May 28, 10:30 am, Andrés Cerezo  wrote:
>
> > > > You can use gaelucene code.google.com/p/gaelucene/ you have to index
> > > > the information in your pc and after upload the information indexed.
>
> > > > 2010/5/28 Toby :
>
> > > > > I use the code done by Nicolas and I can only say that it works
> > great.
> > > > > There is one limitation, though. It assumes AND between the keywords
> > > > > that you search. I modified that by breaking it up in several queries
> > > > > but I think that code is not very efficient.
> > > > > In the longer term there is fulltext search on the roadmap of GAE.
> > > > > If you have real documents like PDF or something you could also try
> > to
> > > > > use the blob store and something like google site search or google
> > > > > scholar. This way your documents are also publically accessible.
>
> > > > > On May 27, 11:42 pm, nicolas melendez  wrote:
> > > > >> Due to GAE limitations, fulltext search isn't a easy task.
> > > > >> you can see this code of a basic fulltext search for JDO here:
> >http://googleappengine.blogspot.com/2010/04/making-your-app-searchabl...
>
> > > > >> and i made a migration of the code to objectify, you can find it
> > here:http://code.google.com/p/fulltext-search-in-objectify/
>
> > > > >> Hope it helps,
> > > > >> NM
>
> > > > >> On Thu, May 27, 2010 at 5:22 PM, king 
> > wrote:
> > > > >> > I need your help.  I am building a prototype to index text
> > documents
> > > > >> > for my school.  The students will upload their paper through
> > browser
> > > > >> > and my gae apps is supposed to index them and make them
> > searchable.
> > > > >> > Is lucene the best solution on GAE?  If so, could you show me a
> > very
> > > > >> > simple (WITHOUT struts2, spring, hibernate, etc..) tutorial of how
> > to
> > > > >> > use lucene with GAE?  The lucene example in googlecode is
> > read-only
> > > > >> > and require off-line index building, which doesn't work with
> > dynamic
> > > > >> > document upload. Your help is greatly greatly appreciated. Thanks
> > in
> > > > >> > advance.
>
> > > > >> > --
> > > > >> > You received this message because you are subscribed to the Google
> > Groups
> > > > >> > "Google App Engine for Java" group.
> > > > >> > To post to this group, send email to
> > > > >> > google-appengine-j...@googlegroups.com.
> > > > >> > To unsubscribe from this group, send email to
> > > > >> > google-appengine-java+unsubscr...@googlegroups.com > > > >> >  unsubscr...@googlegroups.com> > unsubscr...@googlegroups.com>
> > > > >> > .
> > > > >> > For more options, visit this group at
> > > > >> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> > > > >> --
> > > > >> Nicolás Meléndez
> > > > >> Java Software Developer
>
> > > > >> 1) Google App Engine