This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm in the middle of doing some linq calls using simpleDB in C#. At some point, amazon allows the ability to perform a consistent read while doing a query, how can i utilize that option? |
|
|
Hello Russ, Sorry for the slow reply. We don't currently support the consistent read option, but I'll try to take a look at implementing it this week. |
|
|
Russ, in order to keep the user interface simple, I'm thinking of just making the management tool always do consistent reads. I don't see any value in using "eventually consistent" reads except performance, and I don't think that's a significant consideration for the management tools (obviously it is a concern in a user-facing environment where you may be carrying out a large number of reads, but the management tools don't fall into that category). Is there any circumstance in SimpleDB Management Tools where you would *not* want consistent reads? |
|
|
Consistent reads on SimpleDB management tools at all times would easily serve our purposes.
But the question remains, how about using Consistent Reads from within lightspeed? Is that something that can be set per query (or Linq Queryable?)
|
|
|
Thanks Russ. I've implemented this in SimpleDB Management Tools and it will be in the next drop (we should be getting nightly builds going from today so this should be available for download within 24 hours at the latest -- will let you know). For LightSpeed I was thinking this could be an option on the connection string, because it's basically a policy setting about how you talk to SimpleDB. Would you need to be able to control it on a per-query basis? If so, could you say a bit about your use case? Thanks! |
|
|
Will the SimpleDB management tools be compatible with VisualStudio 2010? We just upgraded here, and the only reasons we are keeping 2008 around at all is for the SimpleDB management tools and the UI of lightspeed. (Which I know that the UI update is in the works, but I'd like to know when you expect that also)
As for our application, we have a cache server that keeps current data, and we use simpleDb for long term storage, and when something is not found in the cache. This compensates for the consist read functionality while still giving us the lightning fast results from simple db. However, certain things do come up that require a consistent read. We could have these on separate connections, but it would be better if it was something we could set per query.
|
|
|
Yes, there is a VS2010 version of SimpleDB Management Tools. You can get it from the store, or from the downloads page (http://www.mindscape.co.nz/products/simpledbtools/download.aspx) if you're using the free version. For nightly builds (which you'll need for consistent reads), I'm told that nightly builds of the VS2008 version are available in the store now, and we're working on making nightly builds of the VS2010 version available too. LightSpeed VS2010 integration is now available and is included in current nightly builds of LightSpeed. Thanks for the feedback on per-query consistent reads. I'll need to have a think about how we can implement it, but hopefully we'll be able to get it to you soon. |
|
|
Okay, the latest LightSpeed nightly build now includes support for consistent reads. To enable consistent reads, set the ProviderOptions property on your Query object: query.ProviderOptions = new AmazonSimpleDBProviderOptions { ConsistentRead = true }; (The options class is in the Mindscape.LightSpeed.Data namespace, so you'll need to add a using statement.) In LINQ, use the new WithProviderOptions extension method: uow.Products.WithProviderOption(...).... I'm not entirely comfortable with this for a couple of reasons -- first, I found it rather inconvenient having to specify this option all the time, especially on queries that were previously just QueryExpressions rather than Query objects; and second, it's not possible to specify it for FindById or for implicit queries such as loading associations. So I'm thinking I may add a connection string option or a context-level provider options setting to specify the default, then allow you to use Query.ProviderOptions to override it on a per-query basis. Thoughts? |
|
|
What you are thinking is almost exactly what I was going to suggest. This allows us to update to this new lightspeed build with very little effort; without having to change queries all over our project.
|
|
|
Okay, from the 1 May nightly you will be able to set the consistent read option at the connection level, using a new "Consistent Read" (note the space) connection string option, e.g.: Access Key=...;Secret Access Key=...;Consistent Read=True Consistent Read may be true or false, and defaults to false (i.e. "eventually consistent" reads) if omitted. It can be overridden on a per-query basis using Query.ProviderOptions: the per-query option is now nullable, with a null indicating "use the setting from the connection string" (as if you hadn't set ProviderOptions at all), and a non-null value overriding the setting from the connection string. The new build will be available from about 1500 GMT. |
|