Thinking about Cassandra's Session and Cluster classes (Java driver) I wonder whats the difference. In Hibernate one creates a session every time and shares the session factory.
From many sources I learned that it is considered to create a single session and share it across many threads.
I do find this a bit curios. I would have expected that I create a session for each thread or ongoing action / task.
- Do I have issues when doing so?
- Whats the performance impact and is session thread-safe?
- Do I run into cursor problems on larger result-sets (or does cassandra has no cursors?)
- Is it safe to assume that Session is thread-safe or are there edge cases I should be aware of?