Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Created separate recipe for cassandra write and postgres read side #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marvinmarnold
Copy link

No description provided.

@lightbend-cla-validator

Hi @marvinmarnold,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@marvinmarnold
Copy link
Author

CLA now signed

UserGreetingRecord record = new UserGreetingRecord();
record.setId(greetingMessageChanged.getName());
record.setMessage(greetingMessageChanged.getMessage());
entityManager.persist(record);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment a left-over?

Also, does PGsql merge records when inserting data for the same PK? The commented code does a find first to update if the record is already there, but the new code doesn't.

If that's the case I think it's a very important difference compared to H2 worth mentioning in the README.

// return entityManager
// .createQuery(SELECT_ALL_QUERY, UserGreeting.class)
// .getResultList();
// }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The meat of the sample is commented out. :-(

@ihostage
Copy link
Contributor

@marvinmarnold What a key difference with the recipe for H2? It's very difficult to find her manually 😞

@ignasi35
Copy link
Contributor

@marvinmarnold What a key difference with the recipe for H2? It's very difficult to find her manually 😞

It's on the README. I actually liked that the README states a starting point and details the necessary changes focusing the user attention.


The key changes are in [`application.conf`](hello-impl/src/main/resources/application.conf) and [`HelloModule`](hello-impl/src/main/java/com/lightbend/lagom/recipes/mixedpersistence/hello/impl/HelloModule.java).

Specifcally, `JdbcPersistenceModule` is explicitly disabled:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Specifcally, `JdbcPersistenceModule` is explicitly disabled:
Specifically, `JdbcPersistenceModule` is explicitly disabled:

@ihostage
Copy link
Contributor

It's on the README. I actually liked that the README states a starting point and details the necessary changes focusing the user attention.

Thank you, @ignasi35 ! I found it 😄

@octonato
Copy link
Member

@marvinmarnold, we are planning to reduce the number of recipes/samples we have to maintain.

One of the recipes we plan to keep is the mixed persistence, but I don't think it's worth having another mixed-persistence recipe that is basically the same but only changing the underlying RDBMS. This will only increase the surface of things we need to maintain.

On the other hand, we want to have a place where community members can publish their samples/recipes projects. With that in mind, the upcoming lagom-samples project will contain a section on its README.md pointing to community supported samples/recipes and we would prefer to have this recipe living on your repo and we link to it, instead of merging it here.

Would that be a good solution for you?

@marvinmarnold
Copy link
Author

@renatocaval yea that sounds like a good idea. I'll try to go through the other comments soon and make some final improvements in the meantime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants