Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Middleware for Joins

#163

It's something to ponder. It could be very good for logging, profiling, and save points.

Upsides:

  • becoming a more common structure due to rack

Downsides:

  • Would work differently than rack. Rack apps are single objects that persist a long time. Executables are many objects that usually persist only for one call.

Reported by bahuvrihi · February 16th, 2009 @ 10:25 AM

State: resolved
Milestone: none
Assigned to: bahuvrihi bahuvrihi

Activity

  1. bahuvrihi
    bahuvrihi

    Middleware may actually not be a great idea. It may be better to just add in tasks when you need to.

    The structure of tasks truly is different than the web.

    
      a -> b -> c
    

    Vs.

    
      a -> b -> c
        <-   <-
    

    In the case of tasks, b is passed through only once in the workflow. 'middleware' would have to wrap b... we're talking now about wrappers. In the case of the web, the request passes back and forth through b and b truly exists as it's own thing. It's not a wrapper, it's inserted in the middle of the call-return cycle. In effect it wraps what's below, but it stands on it's own feet.

    March 16th, 2009 @ 10:18 AM

  2. bahuvrihi
    bahuvrihi
    • Title changed from Middleware for executables? to Middleware for Joins

    Now as full-fledged objects, Joins are great targets for middleware.

    • Join.use
    • Join.intern (make a block join but with middleware)

    The beauty of using Join in this way is that you can have single-instance middleware if you want, ie use(instance). Also the final product is analogous to Executable/Task where any method can be made into an executable and a Task offers additional benefits. Any block can be a join, but a Join offers middleware, etc.

    March 22nd, 2009 @ 09:50 AM

  3. bahuvrihi
    bahuvrihi
    • State changed from new to resolved
    • Assigned user set to bahuvrihi

    April 17th, 2009 @ 11:56 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.