Hi Robert,

Thank you very much for your feedback, you've raised my attention on
points I hadn't considered into account.

>> Are all of these entities global or are some or all of them user-specific?
LO will be user specific since their Knowledge attribute will
correspond to a specific user's knowledge of this LO
For tags I had originally thought of creating tags which were user
specific (so users could tag any of their LO whatever way they feel
suits them best) and then have a global Tag which would summarize the
usual LOs tagged with tag T1 and make these common LO/Tag
relationships available to anyone starting and wishing to retrieve
LO's related to a particular tag. So once LO's  from the global tag T1
are imported to a user tag T1, this user can change the membership of
LO's within it's own tag T1 and this won't affect the global
membership T1 tag, unless a large amount of users make the same
change.

>> How often do the entities relationships change, are LOs tagged / untagged 
>> often?
The task of tagging LO's will be performed quite often, however each
LO's will not be tagged/untagged very often. Very similar to emails in
Gmail, tagging emails is done on a regular basis, however each email
will not be tagged/untagged very often

>> Are LOs frequently added and deleted?
Again this is similar to Gmail. New LO will be added regularly (like
new emails received in an inbox), however they should be rarely
deleted.

>> Are deletes or adds more often?
There will be more adds than deletes

>> Same questions for Tags.
Adds are more often

>> Is it important that the Imp values are sequential?
I'm not sure what you mean exactly, but the aim is simply to
prioritise LO to be presented to a user, hence they need to be
ordered, but if for instance 2 LO's had the same sequence number, it
would cause to much problem, unless this happened often.

>> How many Tags would a typical LO have?
Less that 10

>> How many LOs would a typical Tag have?
A lot ! In the order of 1000's

>> Your second option may not be that bad if tag deletes are not that
>> common.  You would be able to use the task queue or something to
>> handle removing the Tag in the background.

For the first option though, I was thinking, since the knowledge value
of a users LO will not change very fast, maybe I could simply have a
cursor which initially goes through the word arraylist in the tag
entity, querying for LO's user knowledge. The cursor would go down the
list look for the next LO's with low knowledge. So whenever another
request for these tagged LO's with low knowledge is sent, the query
just starts at the cursor index (assuming once a LO is learned it
isn't forgotten of course)

>> Depending on the answers to the questions above, you could also
>> denormalize the structures so that you have a LOTag kind.
>> Then you would be able to query that object easily, and if it is heavily
>> denormailized you may not need a lot of additional queries.

Ok so, just to make sure I understand what you mean by LOTag, this
entity for instance would be a tuple of the kind:
LOTag1{LO_Key,TagName, TagOrder}?

Thanks very much for you help :-)









On Mar 22, 4:14 am, Robert Kluin <robert.kl...@gmail.com> wrote:
> Killian,
>    Are all of these entities global or are some or all of them
> user-specific?  How often do the entities relationships change, are
> LOs tagged / untagged often?  Are LOs frequently added and deleted?
> Are deletes or adds more often? Same questions for Tags.  Is it
> important that the Imp values are sequential?  How many Tags would a
> typical LO have?  How many LOs would a typical Tag have?
>
>   Your second option may not be that bad if tag deletes are not that
> common.  You would be able to use the task queue or something to
> handle removing the Tag in the background.
>
>   Depending on the answers to the questions above, you could also
> denormalize the structures so that you have a LOTag kind.  Then you
> would be able to query that object easily, and if it is heavily
> denormailized you may not need a lot of additional queries.
>
> Just some thoughts,
>   Robert
>
> On Mon, Mar 22, 2010 at 4:36 AM, Killian <killian.levac...@gmail.com> wrote:
> > Hi everyone,
>
> > I'm trying to build a (seemingly) relatively simple 'Gmail like' label
> > functionality using the app engine and am concerned about making
> > proper use of app engine specific characteristics as much as possible
> > to avoid fan out issues and make the code scalable.
>
> > Here is the problem:
> > I have a very large number of Learning Object entities LO each
> > possessing a knowledge value K (between 0% and 100%). Each of these LO
> > can be tagged with several tags T (a tag can contain a very large nbr
> > of LO). For the moment this is exactly like gmail labels. The only
> > difference is that each of these tags order their LO differently
> > according to their importance Imp within each tag. So for instance,
> > LO1 could be tagged with T1 and T2 and have importances Imp5 and
> > Imp155 within each tag (an importance of 0 represents the most
> > important learning object)
>
> > Now the query I would like to make is the following: Give me a list of
> > Learning objects tagged with T1 where K<30 and order these by tag
> > importance Imp.
>
> > 1/ So my first idea was simply to create a Tag entity with a
> > List<Key> LO feature ordering each LO. By doing this, getting the LO
> > in Imp order becomes easy (since LO are stored in order) but only
> > getting those with a value of K<30 means I need to query each of these
> > LO to find out if they have the appropriate K value.
>
> > 2/ So then I thought of creating a List<String> tags feature in each
> > LO entity, query for LO's with tag T1 and K<30 and then use the Tag
> > entity to find the correct order. This seems cumbersome, and also, I'm
> > assuming whenever a user needs to delete a Tag, this creates a fan out
> > issue since each LO needs to be accessed to remove T1 from it's list
> > right?
>
> > What is the correct approach to use in this case? Any recomendations?
>
> > I found a talk by Brett Slatkin covering these issues which helped but
> > I'm still having problems getting my head around this problem.
> >http://code.google.com/events/io/2009/sessions/BuildingScalableComple...
>
> > I would really appreciate your input ! :-)
>
> > Thanks in advance
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine" group.
> > To post to this group, send email to google-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

On Mar 22, 4:14 am, Robert Kluin <robert.kl...@gmail.com> wrote:
> Killian,
>    Are all of these entities global or are some or all of them
> user-specific?  How often do the entities relationships change, are
> LOs tagged / untagged often?  Are LOs frequently added and deleted?
> Are deletes or adds more often? Same questions for Tags.  Is it
> important that the Imp values are sequential?  How many Tags would a
> typical LO have?  How many LOs would a typical Tag have?
>
>   Your second option may not be that bad if tag deletes are not that
> common.  You would be able to use the task queue or something to
> handle removing the Tag in the background.
>
>   Depending on the answers to the questions above, you could also
> denormalize the structures so that you have a LOTag kind.  Then you
> would be able to query that object easily, and if it is heavily
> denormailized you may not need a lot of additional queries.
>
> Just some thoughts,
>   Robert
>
> On Mon, Mar 22, 2010 at 4:36 AM, Killian <killian.levac...@gmail.com> wrote:
> > Hi everyone,
>
> > I'm trying to build a (seemingly) relatively simple 'Gmail like' label
> > functionality using the app engine and am concerned about making
> > proper use of app engine specific characteristics as much as possible
> > to avoid fan out issues and make the code scalable.
>
> > Here is the problem:
> > I have a very large number of Learning Object entities LO each
> > possessing a knowledge value K (between 0% and 100%). Each of these LO
> > can be tagged with several tags T (a tag can contain a very large nbr
> > of LO). For the moment this is exactly like gmail labels. The only
> > difference is that each of these tags order their LO differently
> > according to their importance Imp within each tag. So for instance,
> > LO1 could be tagged with T1 and T2 and have importances Imp5 and
> > Imp155 within each tag (an importance of 0 represents the most
> > important learning object)
>
> > Now the query I would like to make is the following: Give me a list of
> > Learning objects tagged with T1 where K<30 and order these by tag
> > importance Imp.
>
> > 1/ So my first idea was simply to create a Tag entity with a
> > List<Key> LO feature ordering each LO. By doing this, getting the LO
> > in Imp order becomes easy (since LO are stored in order) but only
> > getting those with a value of K<30 means I need to query each of these
> > LO to find out if they have the appropriate K value.
>
> > 2/ So then I thought of creating a List<String> tags feature in each
> > LO entity, query for LO's with tag T1 and K<30 and then use the Tag
> > entity to find the correct order. This seems cumbersome, and also, I'm
> > assuming whenever a user needs to delete a Tag, this creates a fan out
> > issue since each LO needs to be accessed to remove T1 from it's list
> > right?
>
> > What is the correct approach to use in this case? Any recomendations?
>
> > I found a talk by Brett Slatkin covering these issues which helped but
> > I'm still having problems getting my head around this problem.
> >http://code.google.com/events/io/2009/sessions/BuildingScalableComple...
>
> > I would really appreciate your input ! :-)
>
> > Thanks in advance
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine" group.
> > To post to this group, send email to google-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to