Document References

Sep 13, 2012 at 5:59 PM

Is there an easy way to link to documents by GUID as apposed to List<> which could be in the 10000's for an application I'm considering using this project for.

Coordinator
Sep 13, 2012 at 6:15 PM

Please elaborate.

Sep 14, 2012 at 12:08 PM
Edited Sep 14, 2012 at 12:11 PM

Let's say we have two document definitions:

 

The relationship between Job and Entries should be (1:N)

 

    public class Job
    {
        public Guid Id { get; set; }
        public DateTime StartedOn { get; set; }
    }

    public class Entry
    {
        public Guid EntryId { get; set; }
        public int SeqId { get; set; }
        public DateTime StartedOn { get; set; }
        public object Result { get; set; } // Should be able to serialize/deserailze to the actual type and able to cast to that type

        public bool Successfull { get; set; }
        public Exception Error { get; set; }
    }

 


I understand I can model this using a List<Entry> Entries in the Job class, however the number of data entries possible could be in the 100,000 or 1,000,000.


The simple question is how would you model this.  I'm currently storing this relationship (using RaptorDB key-value store) using two seperate databases.  This allows me to model a Job with a method (in the simplest case) of IEnumerable<Entry> GetEntries() over the .Enumerate() in the RaptorDB<Guid> backend.


The results of this can be streamed over REST or other consumers without the overhead of passing around List<>.  

This works OK, but has it's limitations.  I was thinking of moving this to a single instance of RaptorDB Document Storeand using several views to store relationships between documents and then extract them out later leveraging the LINQ query support.


So I suppose my question is how would you go about supporting queries and storage of links between documents without the limitation of IList<>.  Or should I stick with my current approach.

Coordinator
Sep 15, 2012 at 12:53 PM

100K to 1million items seems a lot!

You certainly can do what you want with the doc version, it might not be an exact match for your case but it is do-able. You can do client or server side linq queries and generate a list of what you need. [job view, entry view with an id to the job, so you can filter on the job id and get the entries]

Sep 15, 2012 at 3:41 PM
How can I get around

Sent from my iPhone

On Sep 15, 2012, at 8:53 AM, "MGholam" <notifications@codeplex.com> wrote:

From: MGholam

100K to 1million items seems a lot!

You certainly can do what you want with the doc version, it might not be an exact match for your case but it is do-able. You can do client or server side linq queries and generate a list of what you need. [job view, entry view with an id to the job, so you can filter on the job id and get the entries]