Giter VIP home page Giter VIP logo

notifier's People

Contributors

aaramg avatar biacode avatar danielyan11vazgen avatar dependabot[bot] avatar dilanyanruben avatar dnavre avatar hrant2001 avatar louisdega avatar mikron avatar mkrtchyanh avatar nazaretyan avatar progbox888 avatar rubvardanyan avatar syuziko avatar thetealover 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

notifier's Issues

Update Spring Boot to version 2

Currently, we're using spring boot version 1.5.9 we need to update this to spring boot version 2.

It would be best if we did this update before doing major changes/writing major features. As a significant portion of the newly written code will have to be reworked to comply or use new features offered in Spring Boot 2.

Support client OAuth authentication

Notifier should support authentication API callers via oath authentication tokens. An example use case is an environment where users are authenticated via an IdP such as Keycloak.

This should be an optionally enabled and configured feature.

Decouple notification service provider from the core of notifier

Currently, the core of the project, namely maven's core-services-impl artifact has a direct maven dependency on specific integration providers such as mandrill.

I propose to create an SPI integration module under /infra. For example infra-plugin-api or infra-plugin-spi. The module should contain interfaces for future SMS, email & push notification plugins.

The dependencies to concrete implementations should be removed from the core module. The integrations themselves should identify themselves and register with the notification processor.

This will also allow in the future easy addition of external plugins by 3rd parties without any modification of the main codebase.

Failed to configure datasource

I am working with version 1.7.0 and set up both Postgres and Rabbit as specified on the readme file. I am getting the following error and as no other documentation is available can someone point me in the right direction.

notifier-api_1     | 
notifier-api_1     | Failed to configure a DataSource: no embedded datasource could be configured.
notifier-api_1     | 
notifier-api_1     | Reason: Failed to determine a suitable driver class```

Inconsistent api client library resource urls.

EmailNotificationResourceClientImpl,PushNotificationResourceClientImpl,SmsNotificationResourceClientImpl uses different urls when configuring rest client in case when context path set to :
server.servlet.context-path=/*
For example:
EmailNotificationResourceClientImpl => "notification/email/create"
SmsNotificationResourceClientImpl => "rest/notification/sms/create". Also

Support secure data fields

It should be possible to send data fields through notifications in a manner where the data of the said fields is not saved anywhere in notifier. Examples of usage are password reset, email confirmation tokens.

Update the README.md

The README.md file should contain:

  • Explanation of how to start the microservice with a typical configuration
  • Usage examples with simple cURL commands
  • Usage example for a java application

Exception occurs when trying to deserialize error response model

javax.ws.rs.client.ResponseProcessingException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.sflpro.notifier.api.model.common.result.ErrorResponseModel` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 13] (through reference chain: com.sflpro.notifier.api.model.common.result.ResultResponseModel["errors"]->java.util.ArrayList[0])

Change notification content column type.

it will be better to change notification.content column type from varchar to text, to except issues like org.postgresql.util.PSQLException: ERROR: value too long for type character

Upgrade to OpenJDK 11

Many products have already discontinued support for JavaSE 8. SonarCloud does not support it anymore, and it can only be enabled by triggering a special old compatibility mode. As part of this issue, the following activities should be carried out:

  • Docker container should be set to OpenJDK 11
  • Sonar scanner's option for compatibility mode should be switched off
  • TravisCI build image should use OpenJDK 11
  • Testing should be carried out of notifier built with OpenJDK 11

Support for different configurations

Notifier should support different configurations when sending out emails. There are cases when one application has to use different SMTP credentials when sending out different types of emails or even different SMTP servers.

It should be possible to specify a default configuration for a given notification type and to override it with another configuration when sending out a specific email by providing the overriding configuration ID.

Information about used configurations should be persisted into the database.

Add attachments for emails

Mail creation request should support list of attachments requests

fileName
mimeType
fileUrl

Should be implemented for all supported email channels - SMTP and MailChimp.
For now, we will support only publicly available URLs

Change DB emulation to an actual database engine

Currently, H2 is used to emulate the database during integration tests but in production PostgreSQL and MySQL are supported.

It would be best that during integration tests PostgreSQL is upped via docker flyway is ran to populate the database in a way similar to production deployment. Then the tests can run on an actual database.

The test environment will be much closer to actual production deployment this way.

Combine notifier and notifier-worker into one application

At the moment one has to deploy both the API and worker projects of the notifier as two separate applications. This is unnecessarily complex to use and configure. Instead, I propose to merge the 2 applications into one and make the whole queueing an optional feature.

A list of ToDos to make the above possible:

  • Merge the 2 projects (worker & API) into one runnable spring boot application
  • Provide a configuration toggle to enable worker functionality. Something like notifier.role.processor= true. Maybe useful for bigger/redundant/scaled setups.
  • An option when sending a notification to queue it. Should produce an error message if a queue is not configured.
  • A request to send a notification without queueing should immediately try to send the notification and produce an error if the attempt was unsuccessful.

Fix ignored integration tests

A number of integration/unit tests are ignored for long forgotten reasons. Each one has to be evaluated separately and either fixed or deleted.


Description added by Yervand Aghabayan

Fix Amazon SNS Integration tests

Amazon SNS integration tests require an access key to be performed during project build. Currently, no such keys are supplied to the Travis build job and hench these tests are ignored in the main development branch.

Suitable keys should be provided and the tests should be enabled.

Extend template resolving logic

When using templated notification providers, it force to have templates with _subject and _content name prefixes, which is not useful when for example trying to send PUSH notification, which not required _subject.

Fix mysql migration scripts

MySQL Flyway migration scripts are broken. As the project has close to no use on MySQL as of this moment the script can be directly modified.

Support querying old, sent notifications by labels

Support querying sent notifications. This may be useful for viewing emails sent to particular users for historical references, etc..

It should be possible to query notifications based on:

  • Labels
  • Sent date
  • Content of data fields

Run integration tests on 2 databases

After completing enhancement #28 and the tests being run on PostgreSQL docker. Add an additional integration test run on MySQL so both supported database engines are thoroughly tested in the integration test phase.

This basically means that each integration test will be run twice: once on PostgreSQL and afterward once more on MySQL.

I this the execution should go in the following steps.

  1. Postgre is started
  2. All integration tests are run on Postgre (no need to run unit tests)
  3. Postgre is stopped
  4. MySQL is started
  5. Continues as described above.

Basically, I want to avoid both engines being up at the same time.

A possible problem are conflicts in the junit test report. All should work and be properly reported to sonar. The test cycles should not override each other's results.

Migrate to java 11

The application now only supports Java 8. Codebase should be transferred to Java 11. Also, travis job and dockerfile should be updated to contain java 11.

Issuing while accessing Swagger

Can you please specify that what is the URL for accessing swagger? or any other where i can read API's information or documentation?

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.