On 12/08/2009 04:33 AM, Dan Kubb (dkubb) wrote:
> Hi,
>
> I was wondering how many people use the same model with different
> repositories?
>
> I know many people (myself included) use the same model with a
> different repository for testing as opposed to development, but that's
> not really what I mean.  I mean do you persist/retrieve data from a
> specific model using multiple repositories within the same context?
>
> A good way to know if this applies to you is to ask yourself "Do I
> have code that wraps finders or persistence methods in repository()
> blocks?".
>
> I'm just trying to get a handle on how people use DM "in the wild" and
> make sure that the features DM provides are closer inline with
> people's use cases, and gradually move away from approaches that
> aren't being used at all yet clutter up the code to support.  If I had
> to guess I'd say that the ability for a single model to be accessible
> by multiple repositories all at the *same time* is seldom -- if at all
> -- used.
>
> --
>
> Thanks,
>
> Dan
> (dkubb)
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "DataMapper" group.
> To post to this group, send email to datamap...@googlegroups.com.
> To unsubscribe from this group, send email to 
> datamapper+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/datamapper?hl=en.
>
>
>    
Dan,

I use this feature extensively.  I have a central server that acts as a 
failover for multiple other devices.  Each device has its own database, 
a copy of which is kept on the server.  So the server has an arbitrary 
number of databases, all of which have identical schema.  Because the 
server must be able to emulate multiple devices, I use a separate thread 
for each device.  Each thread accesses the database for a particular 
device.  "The
ability for a single model to be accessible by multiple repositories all 
at the *same time*," along with good threading support, is the reason I 
switched from AR to DM.

Earle

--

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


Reply via email to