I'm using google app engine for my IOS and Android application's server needs(Storing contents and datas for my applications) And I'm also using app engine to send push notifications to mobile clients. I'm using the below library to send push notifications:https://github.com/GoogleCloudPlatform/solutions-ios-push-notification-sample-backend-java
But when I integrate the above library to my code and deploy it to my google app engine account.GAE shows that there are backends in the code but it doesn't deploy it to any instances.
But after sometimes (after 2-3 hours) it automatically deploys the worker backend to 1 instance and then it starts to work and deliver notifications.But this is unaccaptable for me
So what I want is,my worker backend to start working immediately with the frontend instance and shutdown immediately with the frontend.(So it shouldn't work 7/24 ) Do you know why it may happen? Am I missing something.
You can find my app engine xml files below: AppEngine-Web XML:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>tokyo-analyst-845</application>
<version>1</version>
<threadsafe>true</threadsafe>
<sessions-enabled>true</sessions-enabled>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
<use-google-connector-j>true</use-google-connector-j>
</appengine-web-app>
Backends.XML:
<backends>
<backend name="worker">
</backend>
Queue.XML:
<queue-entries>
<queue>
<name>notification-preprocessing</name>
<rate>200/s</rate>
<bucket-size>100</bucket-size>
</queue>
<queue>
<name>notification-delivery</name>
<mode>pull</mode>
</queue>
<queue>
<name>notification-device-token-cleanup</name>
<rate>10/s</rate>
<bucket-size>20</bucket-size>
<target>default</target>
</queue>
</queue-entries>
Web.XML:
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring-servlet.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>PushNotificationWorkerServlet</servlet-name>
<servlet-class>com.finarapp.pn.controller.PushNotificationWorkerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PushNotificationWorkerServlet</servlet-name>
<url-pattern>/_ah/start</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>PushPreProcessingServlet</servlet-name>
<servlet-class>com.finarapp.pn.controller.PushPreProcessingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PushPreProcessingServlet</servlet-name>
<url-pattern>/admin/push/preprocessing</url-pattern>
</servlet-mapping>
Thanks