Giter Club home page Giter Club logo

ais-service-discovery-js's People

Contributors

alanharrisonpeak avatar devangpeak avatar ewanvalentine avatar jamesseanwright avatar joseasouza avatar pearcem0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ais-service-discovery-js's Issues

[Proposal] - update caller to iterate through multiple found instances

Currently, when finding an instance, we just find the first with the given parameters. This isn't as powerful as it could be. If for example we wanted to do more event-driven programming, we could register different Lambda functions under the same instance name. The instance name could be an event name. In order for this to work, we would need to find every instance with that name, and call each one.

This shouldn't be the default behaviour however, as this could cause problems in a traditional request response method. Therefor, I propose we add a new call type:

await Discovery.event('user-created', user);

This isn't the same as the pub/sub methods, which are intended to interface things like SNS, or NATS for example. In this case, it would find every Lambda, across all services, with the registered name 'user-created', it would then call each one with the given params.

We would need to understand whether or not this is scalable, or whether using something like SNS would still be required or not.

The correct behaviour would be to call each function within the given namespace.

We could also introduce different call modes or algorithms for selecting multiple instances of the name name. Things like 'round robin'.

aws-sdk should be a peerDependency

Is your feature request related to a problem? Please describe.
It looks like this library is providing it's own aws-sdk dependency, this means if it's being used in conjunction with other AWS services (which it is in our micro services), because of this we are bundling multiple versions of the aws-sdk into the Lambda, this is going to have an adverse affect on cold starts, deployment times and memory usage.

Describe the solution you would like.
aws-sdk should be in peerDependencies (and devDependencies) and not dependencies.

Additional context
n/a

Thank you for your contribution!

Build fail due to missing path

Running 'npm run build' in examples/infrastructure fails due to missing folder '../lib/infrastructure-stack'
Is there a reason this is missing in the download?

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.