-
Notifications
You must be signed in to change notification settings - Fork 288
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
Multiple listeners #44
Multiple listeners #44
Conversation
…into multiple_listeners
controller header should be: -module(myapp_mycontroller_controller, [Instance, Req]). -module(myapp_mycontroller_controller, [Instance, Req, SessionID]).
… multiple_listeners Conflicts: src/boss/boss_web_controller.erl
You still have not answered my question. Why can't we just use the Req object to distinguish SSL and non-SSL traffic? Using the server name defined in the configuration seems like bad design because it reduces application re-usability. As for the mochiweb change: Did you send this patch upstream? I am generally hesitant to change non-Boss code unless I know exactly what is going on. I would want feedback from the mochiweb team because there might be a good reason for using a timeout in the accept loop. Finally if we go with the "servers" block we may want to eliminate the port/host/ssl options from the root config, but this can wait. PS- I like the "engine" name! |
@@ -393,13 +407,17 @@ process_result(_, {ok, Payload, Headers}) -> | |||
{200, [{"Content-Type", proplists:get_value("Content-Type", Headers, "text/html")} | |||
|proplists:delete("Content-Type", Headers)], Payload}. | |||
|
|||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trees not merged?
@kotedo Regular port and server options are for 'backward compatibility', They are ignored when 'servers' list is defined. @evanmiller: |
Hmm. Perhaps ALL configuration should be server-specific? So automatically we get "allowed listeners" because applications are listener-specific. Then we could provide an API like boss_env:get_server_env('server_name') if you really want to get the server name (or other user-defined config variables). Then you could also have two instances of the same application running with independent data stores as long as they were hosted on different listeners. But then perhaps servers could be associated with domain names and not IP addresses; the Nginx configuration model could be a good example to follow. I need to think about this some more. |
i dont like idea of CB becoming platform for virtual servers hosting, it is a bit too far IMO. |
Hi.
There is a complete (IMO) multiple_listeners patch.
It introduces a bit of incompatibility as it introduces new module parameter for controllers, but IMO this approach is easier to understand for users, easier to use and much cleaner in implementation.
'Instance' variable holds atom 'default' when multiple listeners configuration is not used.