Play! Framework + DynamoDB - amazon-web-services

Being new with the Play Framework, I'm wondering if it's easier than I think, but is it possible to use DynamoDB with the Play Framework?

As DynamoDB is a NoSQL database, I expect that you would need to use a specific module, which as Dynamo was only recently announced, a module does not exist.
If you are interested in writing your own module, then using Mongo (http://www.playframework.org/modules/mongo-1.3/home) as a starting point (also NoSQL), will give you a good guide on how this has been achieved in other implementations.

Yes, you can use DynamoDB with this library https://github.com/seratch/AWScala It seems to be pretty well

Related

Using DynamoDB from CakePHP 3 installed to Elastic Beanstalk

I have installed CakePHP 3 using directions from this tutorial:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-cakephp-tutorial.html
It is working perfectly and actually installation was quite easy. There is PHP, CakePHP, MySQL working and also I noticed that the newest AWS SDK as whole is installed in vendor directory. So I am fully set to use also DynamoDB as my data source. You might ask why I should use DynamoDb since I am already using MySQL/MarianDB, this is because we have an application that is already in production and it is using DynamoDB. But we should be able to write admin application using CakePHP in top of DynamoDB. This is not technical decision but coming from business side.
I found good tutorial written by StarTutorial how to use DynamoDB as session handler in CakePHP 3:
https://www.startutorial.com/articles/view/using-amazon-dynamodb-as-session-handler-in-cakephp-3
Well, there is not long way to using DynamoDB for putting data, getting data and doing scans, isn't there? Do you have any simple example how to do it, how to write data to DynamoDB or do scan?
I have also read the article:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.PHP.html
and this is working fine, no problem. But I would like to all the advantages of the CakePHP 3, templating, security and so on, thousands of hours time saved with well written code and very fast to start coding for example admin console :)
Thank you,
You could create a Lambda function (in case you want to go serverless) or any other microservice to abstract communication with your DynamoDB. This will definitely simplify your PHP code. You may call Lambda functions directly (via API Gateway), or post messages to SQS for better decoupling. I would recommend the use of SQS -- you'll need some kind of microservice anyway to consume messages and deal with your DynamoDB in a CQRS fashion. Hope it helps!
Thank you for your answer, I was looking for a example how to use the AWS SDK for DynamoDB without creating more complexity to this environment as it is. This way I would have to create yet another layer without using the SDK that already exists. Can you please give wokring example how AWS SDK is used from CakePHP 3 so that it can use DynamoDB as a data source for its applications without losing it´s own resources an capabilities (MVC, security etc).
Thank you,
After a hard debug and found bugs I was able to get it working with only using AWS SDK in CakePHP 3.

Google Authentication with Dynamodb instead of mongoose

I have been following this tutorial and it has given me great insight into linking up a mongodb and getting back google authentication. However, I want to use dynamodb, and I found this to hook up a localhost dynamodb to test out my theories, but I am not sure how to swap out mongoose - because I don't want it linking to a mongodb, or can I use mongoose for the schema and tell it to write to a dynamodb? Not sure. Thanks for any guidance in advance. I'm new to aws if you can't tell.
Mongoose is a library for connecting to MongoDB. I believe your question title should be "DynamoDB instead of MongoDB".
You can't use Mongoose to connect to DynamoDB. There are many differences between MongoDB and DynamoDB. If you want to use DynamoDB with your NodeJS application you should look into using the AWS SDK for NodeJS.
Please be aware that there are major differences between MongoDB and DynamoDB. It's not going to be trivial to take a MongoDB tutorial and modify that to work with DynamoDB. I highly recommend you read up on DynamoDB and understand its restrictions and limitations before committing to using it.

Django supported alternative to noSQL

We need a reasonable insert and query speed over huge tables so I considered using some noSQL adapter with Django. Unfortunately:
Django does not provide official support for noSQL databases.
In our original schema some Big Data are relational to other Big Data making the data duplication unacceptable.
Project deadlines are enemies of hot stuff like this.
So, as far I can see, PostgreSQL should be the way to go for this scenario, right?!
Please let me know any other detail that may be relevant to this question!
Bonus to anyone that can point out some useful database techniques like database sharding...
Well, there is a fork of django project that uses MongoDb as the backend.You can read about it here . The Code on GitHub is here.You give some heads up, MongoDB is a NOSQL db that does support sharding and replication. So i think this might something that you are looking for.

Clojure: run Datomic with Caribou framework

What do I need to do to run Datomic with Caribou framework, both for dev and prod servers?
In other words, how can I hack Caribou to make it happen?
Hope it makes sense! Thanks you!
I'm one of the the caribou devs.
We use a db protocol to abstract over the differences between databases. I have a long term plan to expand the protocol so that we can use storage that is not sql. Datomic in particular (as well as neo4j). We avoid sql in the model namespace itself, so most of the changes would be on the db adapter protocol. Though the protocol would need to be expanded, and some existing operations would need to be swapped out for the protocol.
If you want to contribute to this, I would be happy to provide some guidance, but the above is a rough outline of what would be needed.
I'm not a Caribou expert, but for what I've seen browsing the source code I don't think it's currently designed for Datomic plug&play.
Most of the critical model querying functions are straight up sql, the same for model creation.
So you could try rewriting the complete model.clj with the same API, which would be difficult, or you can try using model hooks, but that would be a real hack.
I'm not Caribou maintainer, but I think currently it's not designed with Datomic nor any other NoSQL database in mind, as you see by current supported database adapters.

Best database solution for Django on AWS

Good morning,
I am currently looking at deploying a Django app on a EC2 instance, but everything is getting too confusing for me! I understand that Django has built-in implementation for MySQL, PSQL, and SQLite. Now, Amazon has RDS (MySQL), SimpleDB and DynamoDB. Do you guys have any recommendation on what should be used? I want something that is scalable for the future and bullet-proof. AWS provides a python API for its SimpleDB and DynamoDB. Will that work nicely with Django?!
Thanks a lot!
EDIT: I would rather be focusing on an overall solution that will be bulletproof, efficient and fast, and not too complicated. As I plan for more people to work on the system, I don't really want something that is complicated and hard to maintan. I would rather spend more time implementing and installing things, but at the end, the solution will be faster and easy to understand and work with. (IE.: Querying the DB will be straight-forward and no hacks around).
SimpleDB and DynamoDB are NoSQL so you'll need django-nonrel to deal with it and have no guarantees if everything will work fine. But if you need to use NoSQL - there is some 3rd-party modules for Django.
RDS is MySQL so you can use Django's default MySQL driver, and ORM, and admin and so on. It seems a good solution but you can't tweak or update these MySQL instances.
If your DB is not big and heavy yet, you can set up a local mysql instance on your EC2 and move it to RDS if you will need to grow.