Sunday, November 12, 2017

[google-cloud-sql-discuss] Re: Migrate from Cloud SQL to DataStore

One more note, since this is the group for Cloud SQL and your questions are more related to Cloud Datastore and App Engine. Both have their own Google groups, where you might find more people that have experience with those products:



On Sunday, 12 November 2017 21:14:59 UTC+1, Azeem Haider wrote:
After your reply I search a lot on shared count. What I understand is that Shared Count is a technique where you divide single entity into multiple entities, Right ?
Pick one of them randomly and update it, When you need to get Count fetch all these entities and sum up values for total count. 

Thing which is confusing me is that if you convert one entity into multiple entities with same parent isn't it inside a single entity group ? If it's a single entity group then you
can't apply more than one write op per sec. 

For example Post1 has two shared count A and B, is post1, A and B in same entity group ? 
OR post1 and A is separate entity group and post1 and B is separate entity group ?

If these are separate entity group then we can also use this technique for comments system, am I right ?

Another thing I don't know I understand it correctly or not.


For getting the post-previews:
You could compute the post preview as one bigger entity (post body including the recent comment-snippets as repeated structured property). For each new comment to a post, you write some data of the comment into the post's recent comments property. However, since many comments to one post could create a hotspot on the post entity, where even exponential backoff might not be sufficient, but you can apply the offsetting/buffering described below.

You said that to create a Post entity with a property of comment which hold list of recent 3 comments ids ? But using this we need to insert entity in comment Kind as well as update comment list id in Post entity.  Please correct me.
 

One more thing which I want to ask, If I access any ancestor entity with id and update it will write op one per sec apply ? 
For example user is parent of post and you have also post_id, You update the post entity using post_id will write op 1 per sec apply ?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/ebf9bdd3-dc01-43f7-affb-564183ef6d6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment