Skip to content

Conversation

emreyigit
Copy link
Collaborator

@emreyigit emreyigit commented Feb 3, 2023

Async extensions and documentation added for ISession interface.

@emreyigit emreyigit changed the title Session State Provider Session State Provider [API-83] Feb 3, 2023
@emreyigit emreyigit added this to the 5.3.0 milestone Feb 8, 2023
@emreyigit emreyigit marked this pull request as ready for review February 8, 2023 09:34
@emreyigit emreyigit requested a review from zpqrtbnk February 8, 2023 09:34
@zpqrtbnk
Copy link
Contributor

zpqrtbnk commented Mar 3, 2023

So just to be sure - the simple fact that we register our own IDistributedCache implementation for the web app cache, means that sessions will rely on it, and load/store themselves from it, all magically? That's great. Have you tested that it works with a sample web app?

And then, the few extension methods that you provide are for providing asynchronous access to the session, right? Because the default mode is synchronous and can cause threading issues, right?

zpqrtbnk
zpqrtbnk previously approved these changes Mar 3, 2023
Copy link
Contributor

@zpqrtbnk zpqrtbnk left a comment

Choose a reason for hiding this comment

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

Commented

@codecov-commenter
Copy link

Codecov Report

Merging #786 (535f7e6) into master (961e379) will decrease coverage by 0.08%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #786      +/-   ##
==========================================
- Coverage   84.77%   84.69%   -0.08%     
==========================================
  Files         885      885              
  Lines       20908    20919      +11     
==========================================
- Hits        17724    17717       -7     
- Misses       3184     3202      +18     
Impacted Files Coverage Δ
src/Hazelcast.Net/HazelcastOptionsBuilder.cs 25.00% <0.00%> (-75.00%) ⬇️
src/Hazelcast.Net/HazelcastOptionsBuilderBase.cs 83.72% <0.00%> (-8.59%) ⬇️
src/Hazelcast.Net/Clustering/ClusterConnections.cs 79.62% <0.00%> (-1.24%) ⬇️
...c/Hazelcast.Net/Networking/SocketConnectionBase.cs 99.23% <0.00%> (-0.77%) ⬇️
src/Hazelcast.Net/Clustering/ClusterMembers.cs 77.90% <0.00%> (-0.75%) ⬇️
src/Hazelcast.Net/Core/Symbols.cs 16.66% <0.00%> (ø)
src/Hazelcast.Net.Linq.Async/MapEntry.cs 62.50% <0.00%> (ø)
src/Hazelcast.Net.Linq.Async/HMemberInfo.cs 87.50% <0.00%> (ø)
src/Hazelcast.Net/Serialization/HeapData.cs 61.22% <0.00%> (ø)
src/Hazelcast.Net/Clustering/ClusterMessaging.cs 97.53% <0.00%> (ø)
... and 12 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@emreyigit
Copy link
Collaborator Author

So just to be sure - the simple fact that we register our own IDistributedCache implementation for the web app cache, means that sessions will rely on it, and load/store themselves from it, all magically? That's great. Have you tested that it works with a sample web app?
And then, the few extension methods that you provide are for providing asynchronous access to the session, right? Because the default mode is synchronous and can cause threading issues, right?

Yes. It's exactly as you described. We only provide async extensions to be compatible nature of Hazelcast client. Also, I've tested with in an ASP.NET Core project, and it works :) . Only thing you need to do use session app.UseSession(); after adding Hazelcast cache into services.

Copy link
Contributor

@zpqrtbnk zpqrtbnk left a comment

Choose a reason for hiding this comment

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

approved

@emreyigit emreyigit merged commit fe4e354 into hazelcast:master Mar 8, 2023
@emreyigit emreyigit deleted the session-provider branch July 4, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants