Does spring-data-cassandra support #PrePersist? - spring-data

Just making sure, does Spring Data Cassandra support #PrePersist? I did not find anything about this in its manual.

Not at this time. Issue is at https://jira.spring.io/browse/DATACASS-106.

Related

Using Sails.js with AWS DynamoDB....not ideal

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?
One of the important plus of vogels is excellent documentation.
Sails-dynamodb adapter based on the vogels, but not all features are implemented in sails-dynamodb adapter. For example, vogels has Expression Filters.
Vogels able to create tables. Adapter can't. An adapter needs duplication table schema in sails files and dynamodb shell.
Vogels has some own types, such as uuid type, StringSet, NumberSet, TimeUUID. (Adapter can use it too, if includes Vogels and Joi lib)
Vogels and adapter have the same query (create, update, delete, find) capabilities.
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
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?

MultiShardQuery on SQL Azure Elastic Scale with Entity Framework

I am new in Azure and I am trying to implement multishard query using Elastic Scale and Entity Framework. Unfortunately I am not able to find any example solutions or good practises to achieve that target. Can anyone help me in this issue? I would be very grateful for some materials to study or hints. Thank you in advance.
Thanks for your question on multi-shard queries with Elastic Scale and EF. Currently, a straight-forward integration like the one you probably saw for data-dependent routing is not available for multi-shard queries. This is an area we are currently investing in, though. Please contact me directly over email at torsteng(at)microsoft(dot)com and we can discuss whether your use case is a good fit and we can get you unblocked.
Thanks,
Torsten
Update for 2015, Having come across similar requirements, I contacted Torsten to see if the situation has changed, kindly he got back to me.
Hi Matt,
If your cross-db querying scenario with EF is limited to read-only access on >the shards, I’d suggest to take a look at Elastic Query for SQL DB – currently >in preview. The best entry points are probably the following documents:
Overview: https://azure.microsoft.com/enus/documentation/articles/sql-database-elastic-query-overview/
Step-by-step tutorial: https://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-query-getting-started/
With Elastic Query set up, you can point an EF DbContext to the external tables >you have defined using the Elastic Query DDL. That DbContext can then be used >for everything that requires cross-db querying. This is a somewhat intricate >mix between code-first and db-first. But, it should get you off the ground.
The instructions seem simple enough, but do involve setting up another database (at the moment premium) in azure. Hope that helps.
Coming back to the thread since now the sample for using elastic database tools (previously known as Elastic Scale) is now available with EF here.
Hope this helps!
Thanks
Silvia Doomra

Driver for Google Cloud SQL

I'm going to use Google Cloud SQL in my application. I'm using Java programming language. I know now it's possible to use 2 drivers to connect to the database - native MySQL JDBC driver and com.mysql.jdbc.GoogleDriver.
Could you please suggest which one is more preferable in terms of stability and performance.
Any suggestions are very appreciated.
Thanks in advance!
Stan
Currently, a Java App Engine app can connect to Google Cloud SQL using two ways:
com.mysql.jdbc.GoogleDriver
com.google.appengine.api.rdbms.AppEngineDriver
The first one was made public on July 15 and it is the recommended way to connect. Under the hood it uses the MySQL Connector/J so it provides excellent API compatibility. The second one is older, it is a Google-specific JDBC API and it might not always behave as MySQL Connector/J.
So, use the com.mysql.jdbc.GoogleDriver.
...

Mongodb document versioning using spring data

I am using Spring Data in my Java application to connect to MongoDb and have a requirement around versioning the documents (basically storing the history).
It seems that its pretty straightforward in Ruby, if one uses Mongoid
I was wondering if spring data has something similar for Java. Or are you better of trying to implement your own.
Yes there is a very good feature in Spring data which is auditing you can refer to the following link
http://www.javacodegeeks.com/2013/11/auditing-entities-in-spring-data-mongodb-2.html
After lot of research I found that https://javers.org/documentation/spring-boot-integration/. This works like rock solid and very easy to implement.
This library helps to store all the history of the changed fields and easy to query over it and it has great support of it. The sample POC shared here: https://nullbeans.com/auditing-using-spring-boot-mongodb-and-javers/

UNQL with COUCHBASE

I am having a requirement that i want to inserted the record into COUCHBASE using UNQL,Can any one suggest me how to connect COUCHBASE using UNQL.
Regards
Pradeep
Unql is an open project and a preview intended to help discussion on use cases for a query language with these newer databases. It's not included in any release of Couchbase at the moment.
See couchbase.com/develop for info on how to insert data, etc.