简体   繁体   English

AWS DynamoDB数据映射器NodeJS

[英]AWS DynamoDB-Data-Mapper NodeJS

I am planning to use AWS Dynamo-Data-Mapper for ORM mapping while creating lambda functions in NodeJS with DynamoDB storage. 我计划在具有DynamoDB存储的NodeJS中创建lambda函数时,使用AWS Dynamo-Data-Mapper进行ORM映射。 This library is still under developer preview. 该库仍在开发人员预览中。 Does anyone has experience in using this library and is there a risk of using this library since it is still under developer preview? 有没有人有使用此库的经验,由于仍在开发人员预览中,因此有使用该库的风险吗? Is there any other better NodeJS library to use for ORM with Dynamo DB. 是否还有其他更好的NodeJS库可用于Dynamo DB的ORM。

Personally I code in Java, and the Java DynamoDBMapper is the best DynamoDB SDK by a distance. 我个人使用Java编写代码,而Java DynamoDBMapper是最好的DynamoDB SDK。 It provides object modelling, optimistic locking and more. 它提供了对象建模,乐观锁定等功能。 The only other supported high level SDK at the moment is the .Net Object Persistence Model , which is frankly not even close to being as good as DynamoDBMapper. 目前,唯一受支持的高级SDK是.Net对象持久性模型 ,坦率地说,它甚至不及DynamoDBMapper那样好。

If you are using Lambda I personally wouldn't use Java, the functions take too long to run. 如果您使用的是Lambda,我个人不会使用Java,那么这些函数将花费很长时间才能运行。

The AWS supported Javascript SDK does not provide object modelling. AWS支持的Javascript SDK不提供对象建模。

I've seen a few projects that try and fill the gap for a Javascript DynamoDB object mapping SDK, such as dynamoose and dynogels . 我看到了一些项目,这些项目试图填补Javascript DynamoDB对象映射SDK的空白,例如dynamoosedynogels Personally I wouldn't use these as you simply end up losing functionality offered by DynamoDB. 我个人不会使用这些功能,因为您只会失去DynamoDB提供的功能。 But I'm sure they are good in some circumstances, like prototyping applications rapidly. 但我确信它们在某些情况下会很好,例如快速对应用程序进行原型制作。

I must admit I've not used the new AWS dynamodb-data-mapper (Javascript Object SDK). 我必须承认我没有使用过新的AWS dynamodb-data-mapper (Javascript对象SDK)。 However its being developed by AWS and its pretty clear they are serious about it . 但是,它是由AWS开发的, 很明显,他们对此很重视

Clearly using the SDK depends on your project and appetite to risk. 显然,使用SDK取决于您的项目和冒险的意愿。 I get a huge amount of value using DynamoDBMapper (the equivalent Java SDK). 使用DynamoDBMapper(等效的Java SDK)可以获得巨大的价值。 My code is massively more clean and simple than it would be in a low level SDK. 与低级SDK相比,我的代码更加干净和简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM