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

[SPIKE-43288] Possible GemMQ Performance improvements #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Oct 16, 2019

  • moved _publish method as class method to BarkMQ::Publisher module:
    Example: BarkMQ::Publisher.publish(topic_name, message). Previously it was defined in multiple places async and worker publishers.

  • improved performance of publish method by caching topic_arn instead of
    calling all the time create_topic of aws library. Now BarkMQ.publisher_config contains topic_arns as cached arn names. Introduced the new method BarkMQ.publisher_config.fetch_topic_arn(topic_name) to get or create topic_arn once.

  • verified that create_topic happened only once on BarkMQ::Publisher.publish and it doesn't require to make any enhancement for card SPIKE-40450

Testing Scope:

-Check all the services that are using this gem to make sure all services are working as it used to.

-Open AWS Account & remove previously created SNS topics

-run rspec
(NOTE: async_publisher_spec.rb is failing related to timeout. I haven't changed anything in this area but the test case is still failing locally. Maybe, It requires to run on live CI env. Other specs are passing without any issue. I double checked celluloid usage and it looks good).

-verify new topics which were created

- moved _publish method as class method to BarkMQ::Publisher module:
Example: `BarkMQ::Publisher.publish(topic_name, message)`

- improved performance of `publish` method by caching topic_arn instead of
calling all the time `create_topic` of aws library.
@ghost ghost deleted a comment from oivoodoo Oct 16, 2019
@ghost ghost closed this Oct 16, 2019
@ghost ghost deleted the refactor/SPIKE-43288-duplicate-calls-on-topic-create branch October 16, 2019 22:44
@ghost ghost restored the refactor/SPIKE-43288-duplicate-calls-on-topic-create branch October 16, 2019 22:45
@ghost ghost locked and limited conversation to collaborators Oct 16, 2019
@ghost ghost reopened this Oct 17, 2019
@ghost ghost closed this Oct 17, 2019
@ghost ghost reopened this Oct 17, 2019
@ghost ghost changed the title [SPIKE-43288] Applied performance improvements for async and worker publishers: [SPIKE-43288] Possible GemMQ Performance improvements Oct 17, 2019
@ghost ghost closed this Oct 17, 2019
@ghost ghost reopened this Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant