Hello Patricia, You code is indeed pretty standard :-). One thing I noticed though is that you might be setting authorization credentials in another part of you code (and I assume you are using 2-Legged OAuth).
If you are creating many calendars for a user, I would suggest grouping all the insert requests into one single batch request (up to 50 operations) as to avoid hitting your quota too quickly. About the number of calendar, the issue is not about the backend but about the eventuality of returning thousands of calendar in a single requests. It is better not to have a single user handle all of an organization calendars, but to have the calendars spread among user and eventually have a super account, or use 2-Legged OAuth to manage those calendars. Also, our engineers are constantly working on improving response times and adding features to our existing product. Every feedback is welcome :-) Best, Alain On Fri, Sep 23, 2011 at 5:08 PM, Patricia N Goldweic < [email protected]> wrote: > Sure Alain,**** > > Thanks for responding. My calendar creation code is pretty standard, I > assume, since I use the client apis (although wrapped in a few classes of > mine which are not shown here). Here is the code that actually gets to run > on calendar creation (after resolving the intermediate level) :**** > > > ---------------------------------------------------------------------------------------------------------- > **** > > CalendarEntry entry = *new* CalendarEntry();**** > > entry.setTitle(*new* PlainTextConstruct(“Some name”)); **** > > entry.setSummary(*new* PlainTextConstruct(“Some description”)); **** > > CalendarEntry newEntry = *null*;**** > > CalendarService calendarService = new CalendarService(“My own service”);** > ** > > *try* {**** > > calendarService.insert(updateURLFeed(new URL(*“ > https://www.google.com/calendar/feeds/default/owncalendars/full”*)), > entry);**** > > ** ** > > } catch (ServiceException e) {**** > > …**** > > } catch (Exception e) {**** > > …**** > > }**** > > ** ** > > Where ‘updateURLFeed’ is a method that adds the ‘xoauth_requestor_id’ http > parameter to the feed url. **** > > > ---------------------------------------------------------------------------------------------------------- > **** > > ** ** > > So, a couple of things come to mind from your response:**** > > **1- **I don’t think I could optimize this (simple) code. Or, do you > have any suggestions on how to do this?**** > > **2- **Your statement about the likelihood of api failures increasing > with the number of calendar a user owns tells me that the Google api > implementation is really not scalable, and it probably needs improvement. > Are there any plans in place for Google to work on this?**** > > Thanks again for your response,**** > > -Patricia**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Alain > Vongsouvanh > *Sent:* Friday, September 23, 2011 3:44 AM > *To:* [email protected] > *Subject:* Re: [Calendar API] programmatic calendar creation is failing > often**** > > ** ** > > Hello Patricia,**** > > ** ** > > 500 errors usually mean a temporary issue with the API. It can be avoided > by optimizing the code and making sure no weird requests are sent to the > API.**** > > Would you mind sharing the part of your code that creates the calendar (by > removing any private data)?**** > > ** ** > > Also, the more calendar a user has, the more likely the API will fail as > processing too many calendar in the allocated time (for a web request) might > not be possible.**** > > Thanks!**** > > Alain**** > > ** ** > > On Thu, Sep 22, 2011 at 9:56 PM, Patricia Goldweic < > [email protected]> wrote:**** > > My web application creates Google Apps calendars among other types of > content, and it has been failing often since yesterday, in approximately > 10-25% of calendar creation requests. The application uses the Java gdata > client apis, and has been getting the following type of error: > > com.google.gdata.util.ServiceException: Internal Server Error > Internal Error > > at > > com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataR > equest.java:624) > at > > com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGD > ataRequest.java:563) > at > > com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest > .java:552) > at > > com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java: > 530) > at > > com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.j > ava:535) > at com.google.gdata.client.Service.insert(Service.java:1409) > at > com.google.gdata.client.GoogleService.insert(GoogleService.java:606) > at > > edu.northwestern.at.bboogle.gint.data.gservices.GintCalendarService.insertCa > lendarEntry(GintCalendarService.java:132) > > Is this a known bug in Google Apps Calendars, or a temporary issue? Please > note that I have successfully submitted later requests to create the same > type of calendar (with the same names) and they have succeeded. > > Thanks in advance, > -Patricia > > > > -- > You received this message because you are subscribed to the Google > Groups "Google Calendar Data API" group. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://code.google.com/apis/calendar/community/forum.html**** > > > > **** > > ** ** > > -- > Alain Vongsouvanh | Developer Programs Engineer**** > > -- > You received this message because you are subscribed to the Google > Groups "Google Calendar Data API" group. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://code.google.com/apis/calendar/community/forum.html**** > > -- > You received this message because you are subscribed to the Google > Groups "Google Calendar Data API" group. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://code.google.com/apis/calendar/community/forum.html > -- Alain Vongsouvanh | Developer Programs Engineer -- You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://code.google.com/apis/calendar/community/forum.html
