1

I started working on a small POC and decided to give Sails.js a try :)

Part of the POC we wanted to use DynamoDB since the project will eventually involve high scalability and we're not looking to hire full-time MongoDB expert at this point.

We used the module: https://github.com/gadelkareem/sails-dynamodb

Problem is there is no documentation and the module does not even work...

It seems the sails ORM is not ideal for DynamoDB and requires writing custom DB services. Does anyone have experience with this?

I was very excited to come across Sails but if it won't let us play nice with DynamoDB then it might very well be out as an option to us....

Anyone have experience with this or maybe something I'm missing?

Aaron
  • 2,672
  • 10
  • 28
  • 45

2 Answers2

2
  1. One of the important plus of vogels is excellent documentation.
  2. Sails-dynamodb adapter based on the vogels, but not all features are implemented in sails-dynamodb adapter. For example, vogels has Expression Filters.
  3. Vogels able to create tables. Adapter can't. An adapter needs duplication table schema in sails files and dynamodb shell.
  4. Vogels has some own types, such as uuid type, StringSet, NumberSet, TimeUUID. (Adapter can use it too, if includes Vogels and Joi lib)
  5. Vogels and adapter have the same query (create, update, delete, find) capabilities.
  6. Adapter allows without changing the code switch to another data base. Adapter encapsulates establishment of connection to database.

Conclusion - for most purposes this adapter is suitable for the work and do not need to work directly with the Vogels

0

Sails comes loaded with an ORM called "Waterline". There are some official waterline plugins such as mongodb, postgresql, mysql and then there are some unofficial ones created by the community. I'd assume right now that Dynamo is in the latter category since I have not come across it before. However, with that being said I would not take this experience as a reason to ditch Sails.js.

Sails.js is built with the intention that all of its components can be swapped out, this means you are not tied to a specific template engine, authentication libraries etc. and including your ORM choice.

Waterline is still being actively developed but it is sat at v0.12.1 as of writing this response. It isn't fully there yet so there will be the odd issues still around!

My recommendation? Take a look at swapping out waterline for a different ORM. Keep the flexibility Sails gives you and change out the component that doesn't meet your criteria. There are still many benefits to Sails you can utilise.

Vogels might be worth checking out: https://github.com/ryanfitz/vogels

Turning off waterline: Is there a way to disable waterline and use a different ORM in sails.js?

Community
  • 1
  • 1
munkee
  • 759
  • 1
  • 9
  • 23
  • Thank you for your detailed reply. It makes sense that swapping out waterline might be the best option so we can still retain the flexibility which Sails.js offers. – Aaron May 24 '16 at 08:18