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

Add DynamoDB integration with PHPSessions #569

Closed
wants to merge 1 commit into from

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented May 7, 2020

This will fix #527

The PR is currently in draft. We need to update all instances of $this->connection.

@Nemo64 feel free to continue this work if you want to.

@Nemo64
Copy link
Contributor

Nemo64 commented May 8, 2020

Ohh wow. I will definitely look into this. Thanks.

So you are ok with copying the official implementation and just adjusting it, right?

@Nyholm
Copy link
Member Author

Nyholm commented May 8, 2020

Yes. I think the end result will not be super similar. I also think that there are not many ways one could implement this specific interface using DynamoDB.

I added a reference in the readme

@Nemo64
Copy link
Contributor

Nemo64 commented May 9, 2020

I started porting the rest of the SessionHandler but I must admit that I won't have the time to properly implement, test and document it the coming weeks.

Here is what I have so far: https://github.com/Nemo64/aws/tree/feature/sessions/src/Integration/Aws/DynamoDbSession/src

If someone else wants to pick it up I'm for that or it'll need to wait a bit.

I have 2 notes so far:

  • I omitted the entire garbage collection logic from the original. It isn't needed in modern DynamoDB since there now is a TTL feature that should be preferred in any case since it is free and requires no further implementation other than configuring it one time.
  • I'm a bit concerned about the DynamoDB implementation in this library. Wrapping every value into an AttributeValue object is probably a performance problem and it also makes it a lot harder to read values as you normally can just use current($item) to read the value and now you need to know the type to call the right getter. Not a big deal for the session handler but may be for someone seriously using the DynamoDB as main data storage.

@Nyholm Nyholm mentioned this pull request May 11, 2020
10 tasks
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.

Php session handler
2 participants