[google-appengine] Re: How to server video content fast

2015-07-11 Thread Ankur Jatt
Hello Jim,
Yes you are write main time is spending in loading event. Currently I'm 
using html5's default video player. Could you please suggest me some good 
video players please. Or help me out in finding some good video play code 
etc.

On Saturday, July 4, 2015 at 9:11:25 PM UTC+5:30, Jim wrote:

 It looks like you're losing a half second in the response phase, which is 
 probably network transit time from the app engine server to Mumbai.  Last 
 time I checked the only options for specifying the region for deployment 
 with app engine were US and Europe.  Do you see that same ~500ms latency 
 hit on other types of content coming from the US?

 But your big hit is in the Load Event which I assume is where your video 
 player is loading.  What player are you using?  Could you get better 
 performance from another video player?  Could you pre-load the video player 
 while your user is busy doing something else so that he/she doesn't 
 experience the load time as a delay?




 On Friday, July 3, 2015 at 3:56:07 AM UTC-5, Ankur Jatt wrote:

 Hello Jim,
 Well when I saw the response time from GAE than its same around from 
 15ms-80ms. ANd the response metrics I attached, plz have a look. The main 
 thing is browser is taking too much time to parse content and, as you can 
 see in attached file. But I'm unable to figure out how to solve this 
 problem.


 On Friday, July 3, 2015 at 12:51:22 AM UTC+5:30, Jim wrote:

 Ankur,

 I use that same basic approach to serve thousands of blobs per day in my 
 app, and the average response time in the app engine logs is 15ms.  The 
 blobs I'm serving are text data and they vary in size from a few hundred 
 bytes  to 1MB and larger.  The average size is probably around 200KB.  

 I wonder if anyone can comment on the possibility that the blobstore 
 service takes longer to serve video content than it does text content.  I 
 doubt it, but I suppose it is possible.

 Are you sure that the latency you're seeing is actually in app engine 
 and not perhaps in network transit or even in your browser while it loads a 
 viewer for that mp4 content?

 Jim




 On Thursday, July 2, 2015 at 11:25:23 AM UTC-5, Ankur Jatt wrote:

 Currently I'm using below class to serve videos:

 class VelfieVideoHandler(blobstore_handlers.BlobstoreDownloadHandler):

 def get(self, blobKey):
 blobKey = BlobKey(blobKey)
 blobinfo = blobstore.blobstore.BlobInfo(blobKey)
 self.send_blob(blobKey,content_type=video/mp4)

 But the problem is: its taking atleast 2 seconds to response even 
 though the video size is 100KB.
 I test this code on 4Mbps speed and from Mumbai.

 How can I optimize it?



-- 
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 http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a9ce519d-36fe-4d19-b1e9-2d2bd471%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Wrong data storage in GAE NDB

2015-07-09 Thread Ankur Jatt
Here is the situation
I have a model like

class Content(ndb.Model):
likeCount=ndb.IntegerProperty(default=0)
likeUser  = ndb.KeyProperty(kind=User, repeated=True)

When a new content generate than a new Content object is generated like

content_obj = Content(parent=objContentData.key, #Where ContentData is 
another ndb.Model subclass
 likeUser=[],
 likeCount=0
   )

And when any user like the same content than below function gets called

def modify_like(contentData_key, user_key):
like_obj = Content.query(parent=contetData_key).get()
if like_obj:
like_obj.likeUser.append(user_key)
like_obj.likeCount += 1
like_obj.put()

###Problem#
Now the problem is that when at the same time more than 4 user like the 
same content than this object write wrong data.
So how can I solve this problem

-- 
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 http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/60f107b2-20a8-4bd2-8893-42cca742f0d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: How to server video content fast

2015-07-03 Thread Ankur Jatt
Hello Jim,
Well when I saw the response time from GAE than its same around from 
15ms-80ms. ANd the response metrics I attached, plz have a look. The main 
thing is browser is taking too much time to parse content and, as you can 
see in attached file. But I'm unable to figure out how to solve this 
problem.


On Friday, July 3, 2015 at 12:51:22 AM UTC+5:30, Jim wrote:

 Ankur,

 I use that same basic approach to serve thousands of blobs per day in my 
 app, and the average response time in the app engine logs is 15ms.  The 
 blobs I'm serving are text data and they vary in size from a few hundred 
 bytes  to 1MB and larger.  The average size is probably around 200KB.  

 I wonder if anyone can comment on the possibility that the blobstore 
 service takes longer to serve video content than it does text content.  I 
 doubt it, but I suppose it is possible.

 Are you sure that the latency you're seeing is actually in app engine and 
 not perhaps in network transit or even in your browser while it loads a 
 viewer for that mp4 content?

 Jim




 On Thursday, July 2, 2015 at 11:25:23 AM UTC-5, Ankur Jatt wrote:

 Currently I'm using below class to serve videos:

 class VelfieVideoHandler(blobstore_handlers.BlobstoreDownloadHandler):

 def get(self, blobKey):
 blobKey = BlobKey(blobKey)
 blobinfo = blobstore.blobstore.BlobInfo(blobKey)
 self.send_blob(blobKey,content_type=video/mp4)

 But the problem is: its taking atleast 2 seconds to response even though 
 the video size is 100KB.
 I test this code on 4Mbps speed and from Mumbai.

 How can I optimize it?



-- 
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 http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/7c42c3e8-4324-4aa2-9898-c79880d75843%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] How to server video content fast

2015-07-02 Thread Ankur Jatt
Currently I'm using below class to serve videos:

class VelfieVideoHandler(blobstore_handlers.BlobstoreDownloadHandler):

def get(self, blobKey):
blobKey = BlobKey(blobKey)
blobinfo = blobstore.blobstore.BlobInfo(blobKey)
self.send_blob(blobKey,content_type=video/mp4)

But the problem is: its taking atleast 2 seconds to response even though 
the video size is 100KB.
I test this code on 4Mbps speed and from Mumbai.

How can I optimize it?

-- 
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 http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9c4047fc-c835-4d8b-a549-729aec6d8153%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.