[google-appengine] Re: Laravel deployment using Google App Engine: No such file or directory

2017-06-15 Thread Javier Pedrera
Did you finally solve it? I'm still stuck with this. If you get this 
working please don't forget to include the solution. Thanks.

On Wednesday, June 14, 2017 at 9:51:44 PM UTC+2, George (Cloud Platform 
Support) wrote:
>
> How does your final, corrected app.yaml look like? Does it contain a line 
> similar to the following one? 
>
>  # Ensure we skip ".env", which is only for local development
> skip_files:
>   - .env 
>
> What migration commands did you employ, exactly? 
>
> What is the result of running the "gcloud sql instances describe 
> YOUR_INSTANCE_NAME" command? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/edcd740a-6eac-48f2-8f5b-f80b76b9bf6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Laravel deployment using Google App Engine: No such file or directory

2017-06-15 Thread Javier Pedrera
Did you finally solve it? If so please don't forget to add the solution, 
I'm still stuck into it. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/1090d389-2a63-470c-8ef2-d810c601f7ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Laravel deployment using Google App Engine: No such file or directory

2017-06-15 Thread Javier Pedrera
Did you finally solve it? If so please don't forget to add the solution, 
I'm still stuck into it. THanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ebfe2f22-1f3c-4d3b-9850-adda06212a16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Caching a Cloud Endpoint response

2017-06-15 Thread Andrey Rychkov
Hi,

Could you give me any signs if there is any methods to set caching time of 
endpoints responses? I have several endpoints that return a huge list of 
objects (~1MB) and I need to cache them someway. I tried to cache data in 
memcache, but it didn't help much. 
Am I right that the only method is to create a servlet to set caching 
headers and manually convert data to json ? 
Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a4c5befa-dbbb-4c8c-b59c-e27a7069753d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] appengine datastore model for twitter like showing posts from users followed

2017-06-15 Thread Suresh Jeevanandam


I am working on a web system where a feature is similar to Twitter's 
concept of following a list of users and seeing their posts as a list.

The simple model I came up with requires join operation which is not 
available in datastore.

class Post(Model):
   author = reference to user id
   content = text content
class Following(Model):
   author = reference to user id
   followed_by = reference to user id

The frequent operation is to display a list of posts (sorted in time) from 
users followed by the current user.

With the above model, it can only be done in two steps:

authors = Following.author when Following.followed_by == current_user
posts = Posts with Posts.author in authors

Is there any way to achieve this more efficiently?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9480ad51-6530-4fa6-a23d-88d215d525a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Laravel deployment using Google App Engine: No such file or directory

2017-06-15 Thread Adeel Ahmad
Hi George,

Here are my app.yaml contents:

runtime: php
env: flex

runtime_config:
  document_root: public

skip_files:  
  - .env

env_variables:
  APP_LOG: errorlog
  APP_KEY: base64:BEVs/DqwJFIx+WAhNu/AMgbs3uv4rOyg84kgFgMg81M=
  STORAGE_DIR: /tmp
  CACHE_DRIVER: database
  SESSION_DRIVER: database
  DB_HOST: localhost
  DB_DATABASE: zoho_portal
  DB_USERNAME: root
  DB_PASSWORD: PASS
  DB_SOCKET: "/cloudsql/zoho-portal-159018:us-central1:zoho-portal"

beta_settings:
cloud_sql_instances: "zoho-portal-159018:us-central1:zoho-portal"Enter 
code here...

For migrations, I ran the following commands:


   - *./cloud_sql_proxy -instances=zoho-portal=tcp:3307 
   -dir="/var/run/mysqld/" *(ran this from my '*~*' home directory, used 
   port 3307 as 3306 was busy)
   - *mysql -h 127.0.0.1 -u root -p -e "CREATE DATABASE zoho_portal;"*
   - *php artisan session:table*
   - 
*php artisan migrate --force *

Here is the output of "*gcloud sql instances describe zoho-portal*":

connectionName: zoho-portal-159018:us-central1:zoho-portal
etag: '"S7mq0U3H_YqBSBXO0x5cA9E1UOg/MjI"'
instance: zoho-portal
instanceType: CLOUDSQL_INSTANCE
ipAddresses:
- ipAddress: 104.197.134.245
kind: sql#instance
project: zoho-portal-159018
region: us-central1
serverCaCert:
  cert: |-
-BEGIN CERTIFICATE-
MIIDITCCAgmgAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMSMwIQYDVQQDExpHb29n
bGUgQ2xvdWQgU1FMIFNlcnZlciBDQTEUMBIGA1UEChMLR29vZ2xlLCBJbmMxCzAJ
BgNVBAYTAlVTMB4XDTE3MDIyMTE2NTgyM1oXDTE5MDIyMTE2NTkyM1owSDEjMCEG
A1UEAxMaR29vZ2xlIENsb3VkIFNRTCBTZXJ2ZXIgQ0ExFDASBgNVBAoTC0dvb2ds
ZSwgSW5jMQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKCPDkQPGuLW+zyms2m5FrqoNmRPwZ5NhfNnvkoEHTsXuOSO9xHULJ8NEVFi
C5LECS/Xasnn4OLWtBa1YoRVjDpK2/oXKJCJpp8O53S56wRrasw4LhrUAL28jpOA
Yp0YRXUX23Awaj2fqIsAg/8FxN+dkvJ/mH2PP6U987Jcdf4I/7nzL8uR4L3oxK+q
hLjIL7t5Dtgypw0zXljcTfU58c74mogOBsxGvzysTuI6u+ajqEufIK2iHBGJtX7B
BNz5exUT2bywun25zzyKkR8iHr8y19C0FnjAjfoJBrbxUzq3NUyTQt39bALJZer2
7sHYOGmsa/4KU8pKLxI0dnGHhCUCAwEAAaMWMBQwEgYDVR0TAQH/BAgwBgEB/wIB
ADANBgkqhkiG9w0BAQUFAAOCAQEAHY6KDZLi7ZgjNPXe+j1H+e7aWzHkyP5F9bYI
KyRnsH9TNSHWz6N2W4U3kyYUyg3SgXmQ9r+tuBWVcOsnUDT6Ft87yNz4hWqmTODp
HR24FmU+M69MmvRUz0zYJVklBZmsjlyIjg7HjccUmr1tsY+//e7Knmb2S13DdDFO
e90qtLJ/qEhJmMA+34CZLy7zAcvhyivWKpQzc9g5/gFgy9STTWrraPYM2FIs8BNH
UBqFenNltiaeUAM71Qm7EGPuqBKzCghZkqc5i36rib3nNAIrcmltteW+R9XAO9dJ
18A0cmDzconCmCM1nC2IMe0p8sq8Q4XAe6ZlHiSqq2SyFbCTpA==
-END CERTIFICATE-
  certSerialNumber: '0'
  commonName: C=US,O=Google\, Inc,CN=Google Cloud SQL Server CA
  createTime: '2017-02-21T16:58:23.901000+00:00'
  expirationTime: '2019-02-21T16:59:23.901000+00:00'
  instance: zoho-portal
  kind: sql#sslCert
  sha1Fingerprint: f9542f8127049fbd53fc7fd31bd354d4d193b342
serviceAccountEmailAddress: cf7gohcs4bai7ifkuygjlj2qgq@speckle-umbrella-
7.iam.gserviceaccount.com
settings:
  activationPolicy: ALWAYS
  backupConfiguration:
  - binaryLogEnabled: true
enabled: true
id: 2c4b4c97-96e8-45e2-8f84-0f799259c262
kind: sql#backupConfiguration
startTime: 08:00
  ipConfiguration:
enabled: true
kind: sql#ipConfiguration
  kind: sql#settings
  pricingPlan: PER_USE
  replicationType: SYNCHRONOUS
  settingsVersion: '22'
  tier: db-f1-micro
state: RUNNABLE


On Thursday, June 15, 2017 at 12:51:44 AM UTC+5, George (Cloud Platform 
Support) wrote:
>
> How does your final, corrected app.yaml look like? Does it contain a line 
> similar to the following one? 
>
>  # Ensure we skip ".env", which is only for local development
> skip_files:
>   - .env 
>
> What migration commands did you employ, exactly? 
>
> What is the result of running the "gcloud sql instances describe 
> YOUR_INSTANCE_NAME" command? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/28cdb9c3-3dcb-4432-b410-c653ab9d755a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: there is somthing wrong in console

2017-06-15 Thread 'Yannick (Cloud Platform Support)' via Google App Engine
Hello. Problems like this very rarely occur and are usually temporary. Is 
this problem still occurring? If so you should create a new Cloud Console 
issue 
 with 
the following information:

1) Screenshots of the pages that fail to load properly
2) A HAR Capture  of the 
page as it loads to capture the HTTP headers.
3) Is your App Engine application still functioning properly?

On Wednesday, June 14, 2017 at 11:42:45 PM UTC-4, saintthor wrote:
>
> it always show me 'Failed to load' in every item of this page:  
> https://console.cloud.google.com/appengine?src=ac
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/255ec98d-5f12-4688-a32f-cc66512ae400%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Caching a Cloud Endpoint response

2017-06-15 Thread 'George (Cloud Platform Support)' via Google App Engine
Hello Andrey, 

You could use the Author's own solution to his "How to cache the response 
in google cloud endpoint?" question 

 
in stackoverflow. A cache dedicated servlet does not seem necessary. 

This forum is meant for general discussions related to the App Engine, 
trends and the like. For coding-specific problems you are better served 
posting in stackoverflow or similar forums, where programmers are ready to 
help with expert advice.  

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/dccb95a7-b58b-4244-b032-c7ca470d4c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: appengine datastore model for twitter like showing posts from users followed

2017-06-15 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
You are correct, performing the two separate queries is the correct way of 
retrieving the Post entities made by the authors who are followed by 
current_user. 

A JOIN operation is actually the same thing, just in SQL syntax. The first 
step would be to JOIN all 'Post' entities with 'Following' entities where 
'author' is equal. This would then produce a new table containing combined 
rows of the two kinds on 'author'. Once you have the JOINed result, you 
would then perform another query for all 'followed_by' equal to 
'current_user', and you would get your Posts.

So you can see how your current implementation is the most optimized. If 
anything, you could do a projection query 

 on 
the first Following query to only receive the list of 'author's IDs instead 
of the entire Following objects. This would save you a bit of networking 
time and costs.  

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/45728c3d-4908-439e-b5db-4b1775bcc0c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] appengine datastore model for twitter like showing posts from users followed

2017-06-15 Thread 'Alex Martelli' via Google App Engine
I would recommend denormalizing your data model -- a common optimization in
non-relational DBs (like the datastore) and frequently useful in relational
DBs as well. Just have user entities, with the user id as their key's name,
containing a list of the authors the user follows. This will make
adding/removing a follower relationship minutely slower, but surely that's
a far rarer operation than displaying appropriate lists of posts.

For more on denormalization, start e.g. from
https://en.wikipedia.org/wiki/Denormalization .


Alex

On Thu, Jun 15, 2017 at 4:19 AM, Suresh Jeevanandam 
wrote:

> I am working on a web system where a feature is similar to Twitter's
> concept of following a list of users and seeing their posts as a list.
>
> The simple model I came up with requires join operation which is not
> available in datastore.
>
> class Post(Model):
>author = reference to user id
>content = text content
> class Following(Model):
>author = reference to user id
>followed_by = reference to user id
>
> The frequent operation is to display a list of posts (sorted in time) from
> users followed by the current user.
>
> With the above model, it can only be done in two steps:
>
> authors = Following.author when Following.followed_by == current_user
> posts = Posts with Posts.author in authors
>
> Is there any way to achieve this more efficiently?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-appengine/9480ad51-6530-4fa6-a23d-
> 88d215d525a1%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAE46Be8rOX-g3gTo8QH6S0kA-2Tk6NsVQ-mxDeNCaKkVOvFhKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Task rate limits?

2017-06-15 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
The limits on Task Queue calls can be found on the Quota page 
, specifically the 
'Queue execution rate' being of importance. 

Too many tasks being executed on a single queue will inevitably result in 
underlying contention. This leads to the slow down of task execution (aka 
exponential-backoff retry) while tasks wait for resources to handle them. 
It is recommended to instead shard your tasks across multiple queues to get 
around this limit. You can also tweak your queue.yaml  

*'max_concurrent_requests'* setting to prevent any single queue from 
hitting this limit. 

Additionally, it is always good to check your logs to ensure that you 
didn't see any errors during the gap, as you could be hitting other quotas 
limits (which would require time to refill).

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/308b61be-732f-4b05-8fe2-925ac46c0874%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Task rate limits?

2017-06-15 Thread Emlyn
Thanks for that feedback Jordan, that's potentially really useful.

So maybe you are proposing that something like this is happening:

- I enqueue a massive amount of tasks very quickly (and those tasks enqueue
more tasks etc).
- Inevitably, there is less capacity available (instances) than necessary.
So some tasks get *individually* delayed (they fail to be handled, and go
into exponential backoff).
- AppEngine keeps spinning up instances until the contention goes away
- But, some tasks may have failed to be scheduled enough times in the
interim that they now appear "stuck" for a little while. What's actually
going on is that they've been "backed off", and have a timestamp in the
future when they will try to run.

So, it'll look like some tasks are getting stuck.

Is that right?

Further, and crucially to me, is this invisible via the console? ie: would
these tasks be sitting there and not running, but I can't see any evidence
of why? I'm asking this because this isn't, for instance, affecting the
task's ETA (it might say something like "8 mins ago").




On 16 June 2017 at 06:21, 'Jordan (Cloud Platform Support)' via Google App
Engine  wrote:

> The limits on Task Queue calls can be found on the Quota page
> , specifically the
> 'Queue execution rate' being of importance.
>
> Too many tasks being executed on a single queue will inevitably result in
> underlying contention. This leads to the slow down of task execution (aka
> exponential-backoff retry) while tasks wait for resources to handle them.
> It is recommended to instead shard your tasks across multiple queues to get
> around this limit. You can also tweak your queue.yaml
> 
> *'max_concurrent_requests'* setting to prevent any single queue from
> hitting this limit.
>
> Additionally, it is always good to check your logs to ensure that you
> didn't see any errors during the gap, as you could be hitting other quotas
> limits (which would require time to refill).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-appengine/308b61be-732f-4b05-8fe2-
> 925ac46c0874%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Emlyn

https://medium.com/the-infinite-machine - A publication about Google App
Engine
sutllang.com - My language sUTL
https://plus.google.com/u/0/100281903174934656260 - Google+

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAMp1VPBojegLPJqbXSKrCPcf9Ma5u1rtAxPko%3DC_17_Se2f_vQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.