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

Manage list view #5

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

Manage list view #5

wants to merge 138 commits into from

Conversation

gdrouet
Copy link
Contributor

@gdrouet gdrouet commented Nov 18, 2016

This PR covers the scope of the broadcaster micro service in #4 which allows to deal with a list view.

Introduce a library for Java micro services manipulating common Reactivity POJOs. The fundamental class defined in this commit are ReactivityEntity, which represents a base class for any entity and Event which allows to generate a Reactivity event wrapping an entity.
Add the POJOs that allow to manage a list view with a type defined in an ViewType enumeration. A list view allows to manage artifacts and belongs to an organization.
@gdrouet gdrouet added this to the 0.1.0 milestone Nov 18, 2016
First endpoints returning a Flux typed with Event<? ReactivityEntity> are introduced by this commit to:
- retrieve a mocked organization with a single list view
- subscribe to this mocked organization and receive associated view with its corresponding artifacts
- retrieve some additional artifacts matching a specific period of time

The view selects the 100 newest artifacts when the user subscribes to the organization. A mocked index.html shows how this web service can be called and then retrieve older artifacts based on the last received events.

The endpoints are currently not suspending a SSE connection because Reactor currently broadcast any event to all connections, which is not what we want for this use case. It's plan in a future release of Reactor to provide such capability.

Flux are configured to fallback to an Event<Error> publisher in case of exception or timeout. This mechanism needs to be improved with retry capabilities, including replica usage for couchbase, that meet circuit-breaking capabilities.

There's still a random issue (under investigation) where no artifacts is returned by N1QL query in couchbase the first time a web service is called. Also, log4j2 is raising an exception when called by Reactor through SLF4J and that's why it's not present in this commit.
Repository methods now always return a ReactivityEntity because it can be an Error instead of the targeted type in case of success. This allows to notify the subscriber that an exception occurred instead of raise a timeout and also to not swallow the exception.
@gdrouet gdrouet force-pushed the issue4-sse-couchbase branch 24 times, most recently from 1457f56 to da35b33 Compare November 24, 2016 12:10
@gdrouet gdrouet force-pushed the issue4-sse-couchbase branch 7 times, most recently from 7e92d0a to c0ce314 Compare March 7, 2017 14:59
This commit introduces the spring-rest-docs support.
All EventController endpoinds are documented and generated snippets are pushed to a "doc-snippets" branch that can be used in the reactivity-doc project.
Currently unit tests are mixing MockMvc with webflux module, which works even if a more adapted support for webflux tests has to be considered.
@gdrouet gdrouet force-pushed the issue4-sse-couchbase branch from c0ce314 to 5dd3c59 Compare March 7, 2017 15:18
gdrouet and others added 9 commits March 7, 2017 17:28
Injector.provide to register a new Service

myPolymerElement.requestProvider('mon-service') to inject the service
Non-standard changes have been made to use spring-restdocs with MockMvc as WebClientTest from spring-webflux is currently not supported.
Those changes introduce failures depending of internal changes of spring framework and can't stay activated.
They are disabled from now.
Since WebClientTest won't be supported soon, a true integration test approach should be considered on the short term where spring-restdocs can be leveraged through rest-assured
All text files now have a LF line separator.
@gdrouet gdrouet force-pushed the issue4-sse-couchbase branch from 5b260ba to 7c7007a Compare May 17, 2017 18:27
gdrouet and others added 10 commits May 17, 2017 22:07
This commit removes all snapshots related to spring framework.
Spring boot 2.0.0.M1 version is now used and embeds spring 5.0.0.RC1 version.
Reactor 3.1.0.M1 also now replaces 3.0.x main line and breaking changes have been fixed accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants