Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Backport switch to Cowboy from master #18

Merged
merged 24 commits into from
Nov 30, 2016
Merged

Conversation

essen
Copy link
Contributor

@essen essen commented Sep 6, 2016

Part of rabbitmq/rabbitmq-management#236

Can only be merged once the other plugins are updated.

essen and others added 24 commits September 6, 2016 10:36
As part of a push to reduce the number of dependencies from the
RabbitMQ project, the management plugin needed to be converted
from Webmachine to Cowboy REST. This plugin provides a convenient
interface to listeners, which had to be converted from Mochiweb's
to Cowboy's also.

Because Cowboy does not have any logging built-in we keep
Webmachine's access logger for now. It has been adapted to use
data coming from Cowboy, as opposed to Mochiweb. The event handler
for logging has also been moved to web dispatch.

The main breaking change in the interface is that contexts do not
take a fun for the main loop anymore, but instead take a dispatch
list of the routes to be served by that context. Routes must be
compiled using cowboy_router:compile(Routes), and will be served
with the context prefix appended.

Some contexts do not require any code change, including the static
contexts and port redirect contexts.

To serve many applications, we use a Cowboy middleware specific
to RabbitMQ which, when receiving a request, checks in the registry
if there is a matching application, and use its dispatch list for
any subsequent operations.

(cherry picked from commit b8b8c06)
Similar to RabbitMQ-Web-STOMP. Allows users to configure the
management plugin to return compressed responses.

(cherry picked from commit 98589f2)
(cherry picked from commit 11fef3d)
Sync rabbitmq-components.mk with rabbitmq-common to remove automatic
DEPS handling.

[#130086871]
Before this patch, inets was started during the suite setup on the
common_test control node, but we used it on the started broker. This
remained unnoticed while the plugin was based on webmachine and mochiweb
which started inets too.

After the move to Cowboy, inets is not started anymore on the broker so
we need to explicitely start it.
Also, send notification for testcase start/end.
@michaelklishin michaelklishin changed the title DO NOT MERGE Backport switch to Cowboy from master Backport switch to Cowboy from master Nov 30, 2016
@michaelklishin michaelklishin self-assigned this Nov 30, 2016
@michaelklishin michaelklishin merged commit a171af0 into master Nov 30, 2016
@michaelklishin
Copy link
Member

Merged to switch to Cowboy across the board in stable in preparation for rabbitmq-management-236.

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.

5 participants