Various ways to configure things for lightblue...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Various ways to configure things for lightblue...

jewzaam
Administrator
I'm adding maxTimeMS support for the mongo controller and I feel things are a bit of a mess on how we pass the configurations around.  There are two places this can be set:
1) on datasource config in driverOptions
2) on each request in execution options

For the global config, I am following the pattern set by maxResultSetSize, which means a one off API on DocFinder and DocSaver (for the find one command's cursor).

For the execution option, it's passed on the CRUDOperationContext.

I've ended up doing the doc finder different from doc saver because a cursor is not returned by FindOneCommand.

Is there a better way?  I'd like to pass datastore configs in with the context.  Is that reasonable?
Reply | Threaded
Open this post in threaded view
|

Re: Various ways to configure things for lightblue...

bserdar
Ideally, it should be accessible from the LightblueFactory instance.
Configuration is a singleton.

On Tue, Mar 8, 2016 at 12:55 PM, jewzaam [via lightblue-dev]
<[hidden email]> wrote:

> I'm adding maxTimeMS support for the mongo controller and I feel things are
> a bit of a mess on how we pass the configurations around.  There are two
> places this can be set:
> 1) on datasource config in driverOptions
> 2) on each request in execution options
>
> For the global config, I am following the pattern set by maxResultSetSize,
> which means a one off API on DocFinder and DocSaver (for the find one
> command's cursor).
>
> For the execution option, it's passed on the CRUDOperationContext.
>
> I've ended up doing the doc finder different from doc saver because a cursor
> is not returned by FindOneCommand.
>
> Is there a better way?  I'd like to pass datastore configs in with the
> context.  Is that reasonable?
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://dev.forum.lightblue.io/Various-ways-to-configure-things-for-lightblue-tp430.html
> To start a new topic under lightblue-dev, email
> [hidden email]
> To unsubscribe from lightblue-dev, click here.
> NAML