Giter Club home page Giter Club logo

components.pedestal's People

Contributors

josefigueroa-nedap avatar jwkoelewijn avatar tcoenraad avatar thumbnail avatar vemv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

reducecombine

components.pedestal's Issues

component/new signature changed

Brief

introduced different behaviour for new

Expected behavior

(satisfies? com.stuartsierra.component/Lifecycle 
            (nedap.components.pedestal.server.component/new))
=> true

Actual behavior

(satisfies? com.stuartsierra.component/Lifecycle 
            (nedap.components.pedestal.server.component/new))
Execution error (NullPointerException) at nedap.components.pedestal.server.component/new (component.clj:50).
null

Reproduction steps

  1. open repl
  2. paste snippet
(require '[nedap.components.pedestal.server.component])
(nedap.components.pedestal.server.component/new)

Suspected cause

554208b
[& {:as opts}] binds nil to opts if no params are provided.

Notice that :or only binds a value to the variable name (hence the need for :keys). it does not assoc the key/value in the map itself.

Environment info

happened while upgrading components.pedestal in nedap/pep-forester.

Possibly ditch the notion of :env

Problem statement

As made evident by #5 (should-start-or-stop? is cumbersome / hard to spec), c.p's notion of an :env tends to be complex.

Apps almost never will map 1:1 with c.p's 3 envs (:dev, :test, :production). there's also :staging, :integration-tests, etc

Proposal

Research if Pedestal's concept of an :env can be ditched; a better approach could be to fully embrace the concept of :defaults-kind (already introduced).

Alternatives and comparison

TBA as the proposal is researched.

Configure http port

Moved from: https://github.com/nedap/modular-playground/issues/10

In Mask, we want to be able to set a webserver port, depending on the environment.

For now, since I'm only having to deal with one environment, I can set it statically, like this:

::service/component (-> (service.component/new {::service/pedestal-options {:env environment                              
                                                                            :io.pedestal.http/port 4000}

But eventually we'll need to be able to support multiple, e.g. staging 4000, production 4100, etc. From what we do at Link, I prefer them myself to be (just) part of the config, in the same sense as hostname is configured (https://github.com/nedap/modular-playground/blob/master/resources/config.edn#L2), but right now there is no support in c-p to deal with this case.

::pedestal.http/join? option must be default false

Problem statement

The option ::pedestal.http/join? tells the web server to block (true) or not (false) after starting.

If the webserver blocks, any system using the server component do not finish the start up, which may mess with any shutdown handler that would use the started system.

Even if we can change this option to false in production for all the applications we have, it is quite difficult to detect the shutdown problem if everything seems to work properly after starting the web server.

Proposal

Set default to false the option ::pedestal.http/join? in the service component.

Setup CI + create a new release

I just added .circleci + ncrw: 3f6bf9f

Now we'd need to create the project in Circle + release a new artifact for delivering #8 .

Feel free to do the releases yourself, aided by ncrw.

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.