Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract CassandraSession and related classes to a separate library #390

Closed
TimMoore opened this issue Aug 24, 2018 · 11 comments
Closed

Extract CassandraSession and related classes to a separate library #390

TimMoore opened this issue Aug 24, 2018 · 11 comments
Assignees
Labels
3 - in progress Someone is working on this ticket size:l
Milestone

Comments

@TimMoore
Copy link

@WadeWaldron suggested that CassandraSession would be useful in Akka/Lagom services that don't use Akka Persistence. For example, something that consumes events from a Kafka topic and updates a Cassandra table. It offers a better, more consistent API than using the underlying DataStax Java driver directly.

This would require adding a new "session" module, and moving classes to it that don't depend on any Akka Persistence APIs.

@patriknw
Copy link
Member

I agree that CassandraSession would be useful standalone, and that’s why it’s public api in Lagom.

Perhaps it could live in Alpakka Cassandra connector (merging with what is already there)?

@TimMoore
Copy link
Author

Would that mean that Akka Persistence Cassandra would depend on the Alpakka Cassandra connector, or that there would be two separate CassandraSessions?

I think we'd want to retain the SessionProvider as well to make use of automatic service discovery (which we should port from Lagom and base on Akka Service Discovery).

@patriknw
Copy link
Member

It would be ok to depend on Alpakka Cassandra here, but that would require that there is no performance loss or other drawbacks in the Alpakka implementation.

@patriknw patriknw added this to the 1.0 milestone Aug 24, 2018
@WadeWaldron
Copy link

Let me explain what I am looking for here, if that helps.

When I am working with Lagom Read Models, I have access to a Cassandra Session. However, sometimes I want to access a Cassandra Session outside of a read model (eg. consuming from a Kafka topic). In that case I want to be able to use the same Cassandra Session. I want to avoid having to switch between different implementations. I want one implementation everywhere.

However, I don't want that implementation to require me to implement Akka Cluster features or Lagom Persistent Entity features. Cassandra shouldn't require those things. Right now that isn't possible.

I guess at the end of the day what I want is a fairly minimal CassandraSession that provides me with things like non-blocking APIs, simple configuration etc, and can be used consistently across our products.

@patriknw
Copy link
Member

It's clear, I agree.

@TimMoore
Copy link
Author

@ennru and @2m could you comment on whether you think this should be merged into the Alpakka Cassandra connector?

It makes some sense, because it implements queries using a custom graph stage. On the other hand, it also offers non-streaming convenience APIs for queries and updates that are also very commonly used, so that makes me think that Alpakka might not be appropriate.

@ennru ennru self-assigned this Jun 5, 2019
@chbatey chbatey removed this from the 1.0 milestone Oct 29, 2019
@chbatey chbatey added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted size:l labels Oct 29, 2019
@ennru ennru removed their assignment Dec 2, 2019
@chbatey
Copy link
Member

chbatey commented Jan 17, 2020

Put this at the bottom of the Todo list as not to complicate the dev process until we're sure it won't change

@patriknw
Copy link
Member

On the other hand I think @ennru might be eager to use this in Alpakka for building other things for the Cassandra connector there.

@ennru
Copy link
Member

ennru commented Jan 17, 2020

We can start working on it in this repository so that it doesn't disturb the development of APC* things, but get's closer to what we want to offer in Alpakka.
We intend to release Alpakka 2.0 soonish and want to pull this in before.

@patriknw
Copy link
Member

sounds good

@ennru ennru self-assigned this Jan 22, 2020
@patriknw patriknw added 3 - in progress Someone is working on this ticket and removed 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted labels Feb 13, 2020
@ennru
Copy link
Member

ennru commented Mar 13, 2020

Fixed with #736

@ennru ennru closed this as completed Mar 13, 2020
@ennru ennru added this to the 1.0 milestone Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - in progress Someone is working on this ticket size:l
Projects
None yet
Development

No branches or pull requests

5 participants