Comments (5)
I have strong reservations against making AWS::Record case-insensitive. Both SimpleDB and DynamoDB are both case-sensitive. For this to work, the ids would have to be always normalized to lower-case strings. As support is added for custom id attributes with AWS::Record, this could cause a number of issues.
Have you considered filtering the incoming data from 3rd parties and normalizing the case as it is received from the source?
from aws-sdk-ruby.
I definitely understand your reservations, and the reasoning makes sense.
I guess my concern is that I am using HashModel, and I don't have easy control over the id. Is it guaranteed to always be lower case? I guess my concern is over this protected method, which I was planning on overriding in a subclass:
def populate_id
@_id = UUIDTools::UUID.random_create.to_s
end
However, I don't like the idea of setting @_id
in my subclass. What if we had a separate protected method, called generate_id
, with the default implementation looks like this, with the populate_id
changed appropriately:
protected
def generate_id
UUIDTools::UUID.random_create.to_s
end
def populate_id
@_id = generate_id
end
This would allow me to override generate_id
in my subclass, ensuring the same case all around?
Would you be amenable to this change?
from aws-sdk-ruby.
The plan was to make id a user-manageable attribute (this has not happened yet). The default randomly generated UUID is meant to simulate how a RDS can create an id, but without being monotonically increasing (this is generally a bad idea in no-sql systems).
The uuids are hexadecimal digits (0-9a-f), so it would be trivial to enforce that they are always lowercase (there is not plan to change this).
from aws-sdk-ruby.
I guess my question is this: does UUIDTools::UUID.random_create.to_s
always return an all lowercase UUID? If not, I need to manage the id on my own (basically, calling @_id = UUIDTools::UUID.random_create.to_s.downcase
in populate_id
), which is not desirable. I can always just .downcase
the incoming UUID from 3rd parties if the generated id is guaranteed to be always be downcased.
If [0-9a-f]
is in fact the class of characters — and not [0-9a-fA-F]
— then downcasing the id from the 3rd party will work. However, I need to be sure that is the case, either through documentation or controlling it on my end. Does this make sense?
from aws-sdk-ruby.
Yes, it will always return a lower case string (it will not return mixed case or upper case). Your concern does make sense. I'm going to go ahead and close this issue for now, as there doesn't appear to be anything that needs to happen in SDK code.
from aws-sdk-ruby.
Related Issues (20)
- s3: Lost metadata after copy_to with multipart_copy option HOT 2
- 429 / too many requests API error reported as missing credentials HOT 8
- URI.parse call too heavy HOT 1
- AWS-SDK-SSM Compilation error during boot time HOT 15
- Accept-Encoding=identity instead of empty value HOT 3
- Kinesis streaming from large feeds - out of memory errors HOT 10
- gem install aws-sdk 3.1.0 / aws-sdk-applicationdiscoveryservice-1.49.0 missing ri file HOT 10
- Include specs in published gems HOT 4
- SESV2 ListContacts breaks with "Content-Length not given and Transfer-Encoding is not `chunked'" HOT 8
- Infer AWS HTTP request payload size HOT 6
- Aws::S3::Presigner #presigned_url to allow a custom hostname HOT 4
- Aws::STS::Errors::InvalidClientTokenId HOT 7
- Feature: Allow QueuePoller to be interrupted from another thread HOT 1
- aws-sdk-s3 fails when downloading file of exactly 20971524 bytes from S3 bucket bug HOT 16
- Feature: Support `stub_responses:` kwarg in InstanceProfileCredentials HOT 4
- Need WorkerId in Mturk Event HOT 2
- Can't decrypt noncurrent versions of files using EncryptionV2 with kms(short issue description) HOT 1
- Can't create S3 presigned URLs HOT 9
- Chime: event_ingestion_url will be nil when use_fips_endpoint is true HOT 4
- Aws:STS:Presigner sometimes sets X-Amz-Expires < 900 HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-ruby.