Appointments Plus - Google calendar General Event limits

Hi,

I've been corresponding with the developer @Vladislav through another post: https://premium.wpmudev.org/forums/topic/a-google-calendar-integration-issue#post-425454.

However I thought it would be best if I created a new topic on this subject so as not to confuse matters.

I would appreciate if you could forward to @Vladislav and for ease of reference I will add the original posts after submitting.

Regards
SteveB

  • pxwm

    This was posted by me 13/5/13 on the other topic

    Hi - Vladislav,

    Further to my previous post I've read the rules and conditions on the google site about api limits and quota:

    https://developers.google.com/analytics/devguides/config/mgmt/v3/limits-quotas

    If I've understood this correctly it states:-

    General Quota Limits (All APIs) - 50,000 requests per project per day – can be increased

    Management API - Data Upload - 500 upload operations per project per day

    I've reviewed the limits stated in each of the service providers api quotas through their google account and the limits it quotes are:-

    10,000 per day and 5 per second.

    I would appreciate if you could confirm what causes the 500 limit based on the above?

    If you would prefer I open a new topic please let me know

    Regards
    SteveB

  • pxwm

    This was posted by @Vladislav 14/5/13 on the other topic

    Hello,

    @junction I'm really happy to hear you managed to resolve the problem. @pxwm (SteveB), thank you very much for your assistance. As for the questions you had, the plugin is currently setting up two limits when fetching events *from* the Calendar. The first limit is the lookahead days (how far ahead the Gcal events will be fetched) - this is controlled by the mentioned "Appointments upper limit" setting and/or "app_limit" filter result. The second limit is the actual number of events that will be pulled from Gcal, and it's currently (as of v1.2.8) hardcoded to 500 (as set up in includes/class.gcal.php, AppointmentsGcal::import_and_update_events() method). Exposing this upper limit for filtering and/or changes via a define isn't a problem, however, I'd just like to point that juggling 500+ events around between the servers is quite a lot, regardless of the Google service limits. At some point, the script execution times and even the overall performance could perhaps become an issue with this kind of volumes.

  • pxwm

    This was posted by me 14/5/13 on the other topic and this is the latest post in respect to this subject.

    Hi @Vladislav

    Many thanks for the feedback.

    Would appreciate if you could confirm whether this hard coded limit is for 500 entries or 500 changes?

    e.g. If the google calendar had 1000 active entries and only one of these was changed in the calendar would it synchronize or not?

    Would this depend on the location within the calendar of the changed entry?

    Regards
    SteveB

  • Vladislav

    Hello,

    Thanks for separating this thread, and I understand your consideration. To clear things up, this applies to importing Google Calendar events *to* Appointment+. In this scenario, we have two limits - one is the time limit within which the GCal events will be fetched. Another, additional limit is hard-set at 500 events. Also, this number applies to events overall - not just to the events that got changed. So, in other words, the maximum amount of GCal events that will be fetched from Google at any time will be 500 or less, regardless of the time frame.

  • pxwm

    Hi,

    Many thanks for the update and based on your feedback I would appreciate if you could confirm the following:-

    We have a client that operates two Service Providers and they will make all appointments for their customers using A+. The appointments will be sent to each Service Provider's google calendar, which are shared with a main calendar.

    A+ is set up for full synchronisation.

    We have set A+ so that appointments can be made up to 365 days ahead.

    We have estimated that during a 365 day period there will be a minimum of 800 events recorded in the google calendar.

    Our client will manage all active appointments from the google calendar, so if a customer wishes to revise the time/date etc. of an appointment our client will do this from the google calendar. The only change they will manage from the A+ backend will be if the appointment needs to be removed as this currently cannot be done through the google calendar.

    What would happen with the above scenario if an appointment was changed in the google calendar?

    Does it depend on the location of the appointment or from today's date or other criteria?

    Would it help if we instructed our client to only make a single change at a time within the google calendar within a 15 min update window?
    Would this ensure that A+ was synchronised correctly across the 365 day period?

    If not we would appreciate your advice how best to move forward as our client wishes to manage appointments from their google calendar as the main interface.

    Regards
    SteveB

  • pxwm

    Hi Vladislav,

    I appreciate you are busy with A+ 1.3 and all the other plug-ins you own as the developer but it would be great if you could confirm the possible impact of the 500 event limit as I am meeting with our client this week to discuss a way forward.

    I'm still unclear of the impact of a 500 event limit as per my previous two posts.

    If you require any further clarification from me please let me know.

    Regards
    SteveB

  • pxwm

    Hi,

    Is it possible you could forward to Vladislav just in case he isn't in the loop for this thread.

    Hi Vladislav - I would appreciate if you could consider my request in my last three posts as I'm meeting up with my client next week and it would be great to know the actual synchronisation steps and the criteria especially when there are more than 500 events.

    I suppose I'm just looking for confidence that if we have the period set for 365 days and there could be anywhere upwards of 800 active events will A+ and google calendar keep in synch?

    Thanks
    SteveB

  • Vladislav

    Hello,

    The hard limit of 500 events being fetched from GCal is also filterable and, in the attached Beta update, can also be set to an arbitrary value via a define. Here is an example of how you can set it up to a higher value, via a define:

    define('APP_GCAL_MAX_RESULTS_LIMIT', 800);

    Or, if you need a more programatic approach, there's also the "app_gcal_max_results" filter, which is called just before the request is sent. The function bound to this filter can accept a single, integer argument (which is the value of APP_GCAL_MAX_RESULTS_LIMIT), and is expected to return a single integer representing the upper limit of events fetched.

  • Vladislav

    Hi,

    You can set up the filter processing in your functions.php, but the define is better placed in your wp-config.php. Another, perhaps better option for working with both options would be to create a mu-plugin with your customisations - it will be auto-loaded, you'll have all your changes in one place, and they'll be decoupled from your theme. As for the ETA, I can't really give any specific date, but I'm trying to make it release-ready as soon as possible.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.