Giter Site home page Giter Site logo

Comments (5)

adamw avatar adamw commented on July 18, 2024

Hello,

the schedule method is used to schedule an action to be run in the background after the given amount of time. It is used to remove a used token after a (configurable) period of time. The token cannot be removed immediately as there might be multiple concurrent requests and this would cause some of them to fail (race condition).

You are right that after should probalby be a FiniteDuration. Maybe you can submit a PR fixing that?

As for docs, @kijanowski is working on a more docs/faq, see: https://github.com/softwaremill/akka-http-session-faq

from akka-http-session.

epifab avatar epifab commented on July 18, 2024

Hello!

Thanks for taking the time to answer.
It's great that someone is working on the docs, I believe this is vital to get more people involved.
Please note that the page you linked is currently 404ing for me.

I understand the reason behind the schedule method now. However, I'm wondering if that could be achieved in a different way, for example by requiring an implicit Scheduler.
My point is that the schedule method is an implementation detail and should probably be transparent to the end user.

from akka-http-session.

adamw avatar adamw commented on July 18, 2024

Ah yes, just noticed it's a private temporary repository, we'll be publishing that soon :)

As for schedule... well I'm not very happy about it as well, but I didn't have a better idea at that time :). I suppose in all environments akka will be used anyway, so maybe it would be possible to provide a default implementation that uses the underlying http's actor system?

from akka-http-session.

epifab avatar epifab commented on July 18, 2024

Yeah, I believe so. I'm happy to work on a PR to improve this

from akka-http-session.

adamw avatar adamw commented on July 18, 2024

@epifab Sounds good, waiting for the code! :)

from akka-http-session.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.