Giter VIP home page Giter VIP logo

Comments (2)

mcohen01 avatar mcohen01 commented on August 29, 2024 1

So basically it's a matter of efficient utilization of the thread pool. Each Amazon *AsyncCilent (for each different service in the api, e.g. SNS, RDS, EC2, etc.) is going to maintain it's own unbounded thread pool. Likewise, Clojure maintains it's own unbounded thread pool as well, for IO-bound tasks, used for future and send-off calls. The more I think about it, I would guess that any marginally complex application, which might see usage of future and send-off calls in other areas of the application, is going to have a higher probability of reusing a thread from Clojure's unbounded pool before it's 60s TTL has expired and its eviction from the pool. I would guess that the AWS service-specific pool would see less reuse of existing threads from its pool.

from amazonica.

mcohen01 avatar mcohen01 commented on August 29, 2024

What would be the benefit of using the AWS Async api rather than Clojure's built-in async facilities, so to use your example, something like:

(future
  (publish
    cred
    :topic-arn "arn:aws:sns:us-east-1:676820690883:my-topic"
    :subject "test"
    :message (str "Todays is " (java.util.Date.))))

AWS SDK and Clojure would both ultimately run the publish call on a separate thread obtained via Executors.newCachedThreadPool().

from amazonica.

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.