Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Some thoughts on the future direction of Happstack
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 51 - 68 of 68 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
stepcut  
View profile  
 More options Jun 21 2009, 5:40 pm
From: stepcut <jer...@n-heptane.com>
Date: Sun, 21 Jun 2009 14:40:50 -0700 (PDT)
Local: Sun, Jun 21 2009 5:40 pm
Subject: Re: Some thoughts on the future direction of Happstack
On Jun 21, 3:51 pm, Gregory Collins <g...@gregorycollins.net> wrote:

> This is exactly the kind of shim layer I was proposing! Are we on the
> same page yet? :)

I think so. I think part of my confusion is that I imagined that
happstack-fastcgi exercised most of the code in #3, when in probably
exercises none of it :)

In terms of the data types for Request/Response, I think the reason to
prefer hyena's version is that you can implement lazy I/O on top of
left-fold enumeration, but not the other way around. However, I am not
really sure how this would play out in practice.

And, if you are thinking of taking the stuff in SimpleHTTP
(ServerPartT, dir, path, etc), moving it out of happstack-server into
its own package, and generalizing it so that it can work with
happstack-server, hyena, etc, then I am totally in favor of that. I
think the tricky part of doing that right now is that ServerPartT,
dir, path, etc, are pretty tightly integrated with the specific
Request/Response types in happstack-server. So, you either need to add
a type class that abstracts out the type, or get happstack-server and
hyena to use the same type of the Response/Result ? Or, I guess, write
a glue layer than converts between hyena's types and the Response/
Request type (which is what the current happstack-fastcgi does?)

Anyway, it sounds like you have a better handle on this than me, so
I'm all in favor of whatever you propose ;)

- jeremy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Collins  
View profile  
 More options Jun 21 2009, 7:38 pm
From: Gregory Collins <g...@gregorycollins.net>
Date: Sun, 21 Jun 2009 19:38:14 -0400
Local: Sun, Jun 21 2009 7:38 pm
Subject: Re: Some thoughts on the future direction of Happstack

stepcut <jer...@n-heptane.com> writes:
> In terms of the data types for Request/Response, I think the reason to
> prefer hyena's version is that you can implement lazy I/O on top of
> left-fold enumeration, but not the other way around. However, I am not
> really sure how this would play out in practice.

One of the things I wanted to do for Hac Phi was to spend some time
reworking the ServerPartT stuff:

  * it has an awkward name

  * the towering ServerPartT/WebT/FilterT/MaybeT/ErrorT stack is
    unnecessarily complicated, which scares away beginners

  * ServerPartT leaks its internals out all over the place

While we're looking at that, we could spend some time thinking about the
response type also. We've already discussed extending it to support
sendfile(), we could put in iteratee support there also.

The simplest way discussed so far is to add more constructors to the
RqBody type:

data RqBody = Body     ByteString
            | Stream   (StreamG ByteString Word8)
            | SendFile FilePath

> And, if you are thinking of taking the stuff in SimpleHTTP
> (ServerPartT, dir, path, etc), moving it out of happstack-server into
> its own package, and generalizing it so that it can work with
> happstack-server, hyena, etc, then I am totally in favor of that.

That would indeed be what I'd propose.

> I think the tricky part of doing that right now is that ServerPartT,
> dir, path, etc, are pretty tightly integrated with the specific
> Request/Response types in happstack-server. So, you either need to add
> a type class that abstracts out the type, or get happstack-server and
> hyena to use the same type of the Response/Result ? Or, I guess, write
> a glue layer than converts between hyena's types and the Response/
> Request type (which is what the current happstack-fastcgi does?)

To me, ServerPart needs to depend on a particular set of
Request/Response types, so I'd argue for going by the latter route.

G.
--
Gregory Collins <g...@gregorycollins.net>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stepcut  
View profile  
 More options Jun 22 2009, 12:40 pm
From: stepcut <jer...@n-heptane.com>
Date: Mon, 22 Jun 2009 09:40:21 -0700 (PDT)
Local: Mon, Jun 22 2009 12:40 pm
Subject: Re: Some thoughts on the future direction of Happstack
On Jun 21, 6:38 pm, Gregory Collins <g...@gregorycollins.net> wrote:

> One of the things I wanted to do for Hac Phi was to spend some time
> reworking the ServerPartT stuff:

This all sounds great to me.

- jeremy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 22 2009, 5:55 pm
From: Matthew Elder <m...@mattelder.org>
Date: Mon, 22 Jun 2009 14:55:35 -0700
Local: Mon, Jun 22 2009 5:55 pm
Subject: Re: Some thoughts on the future direction of Happstack

Hey Gregory, first of all, I can't wait to see what you guys produce at Hac
Phi. I would love to abstract the "core" http server from the transformer
stack. This would lay the pavement for plugging in the various available
http backends currently available so we can "race them" (stealing anothers
words).

I want to add that I am currently working on the prototype of a small shim
library which exposes a sendfile interface portably. I have windows natively
supported already; I will release version 0.1 once I add Linux native
support. Another nice feature of this lib is that if no native
implementation is available, it seamlessly falls back to a portable haskell
implementation. This hopefully can be worked into http engines such as Hyena
and "happs classic".

If anyone wants to take a look at what I have so far and do some really
early/alpha testing & feedback, please take a look at:

http://patch-tag.com/r/sendfile/home

On Sun, Jun 21, 2009 at 4:38 PM, Gregory Collins <g...@gregorycollins.net>wrote:

--
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Tibell  
View profile  
 More options Jun 23 2009, 2:46 am
From: Johan Tibell <johan.tib...@gmail.com>
Date: Tue, 23 Jun 2009 08:46:50 +0200
Local: Tues, Jun 23 2009 2:46 am
Subject: Re: Some thoughts on the future direction of Happstack

On Mon, Jun 22, 2009 at 11:55 PM, Matthew Elder <m...@mattelder.org> wrote:
> I want to add that I am currently working on the prototype of a small shim
> library which exposes a sendfile interface portably. I have windows natively
> supported already; I will release version 0.1 once I add Linux native
> support. Another nice feature of this lib is that if no native
> implementation is available, it seamlessly falls back to a portable haskell
> implementation. This hopefully can be worked into http engines such as Hyena
> and "happs classic".

Cool. Would you consider merging this into network-bytestring which already
has sendfile support for unixes?

Cheers,

Johan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 24 2009, 2:39 am
From: Matthew Elder <m...@mattelder.org>
Date: Tue, 23 Jun 2009 23:39:31 -0700
Local: Wed, Jun 24 2009 2:39 am
Subject: Re: Some thoughts on the future direction of Happstack
My only problem with this is that bytestring really has nothing to do
with sendfile, and more to do with network. If anything I would merge
it into network. For now I am releasing on hackage to stabilize it,
though.

On 6/22/09, Johan Tibell <johan.tib...@gmail.com> wrote:

--
Sent from my mobile device

Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Tibell  
View profile  
 More options Jun 24 2009, 3:14 am
From: Johan Tibell <johan.tib...@gmail.com>
Date: Wed, 24 Jun 2009 09:14:12 +0200
Local: Wed, Jun 24 2009 3:14 am
Subject: Re: Some thoughts on the future direction of Happstack

On Wed, Jun 24, 2009 at 8:39 AM, Matthew Elder <m...@mattelder.org> wrote:

> My only problem with this is that bytestring really has nothing to do
> with sendfile, and more to do with network. If anything I would merge
> it into network. For now I am releasing on hackage to stabilize it,
> though.

Yes, it probably fits better in network. There's an open ticket for merging
network-bytestring into network:

http://trac.haskell.org/network/ticket/15

-- Johan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 24 2009, 3:27 am
From: Matthew Elder <m...@mattelder.org>
Date: Wed, 24 Jun 2009 00:27:42 -0700
Local: Wed, Jun 24 2009 3:27 am
Subject: Re: Some thoughts on the future direction of Happstack

> The simplest way discussed so far is to add more constructors to the
> RqBody type:

> data RqBody = Body     ByteString
>            | Stream   (StreamG ByteString Word8)
>            | SendFile FilePath

Gregory, didn't you mean Response?

Here is what I plan to commit, instead of returning a Response, you can
return a SendFile:

data Response  = Response  { rsCode    :: Int,
                             rsHeaders :: Headers,
                             rsFlags   :: RsFlags,
                             rsBody    :: L.ByteString,
                             rsValidator:: Maybe (Response -> IO Response)
                           }
               | SendFile  { rsCode    :: Int,
                             rsHeaders :: Headers,
                             rsFlags   :: RsFlags,
                             rsPath    :: String,
                             rsValidator:: Maybe (Response -> IO Response)
                           }
               deriving (Show,Typeable)

Then I will teach the handler how to plug this into my new sendfile library
: )


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Collins  
View profile  
 More options Jun 24 2009, 4:27 am
From: Gregory Collins <g...@gregorycollins.net>
Date: Wed, 24 Jun 2009 04:27:51 -0400
Local: Wed, Jun 24 2009 4:27 am
Subject: Re: Some thoughts on the future direction of Happstack

Matthew Elder <m...@mattelder.org> writes:
>     The simplest way discussed so far is to add more constructors to the
>     RqBody type:

>     data RqBody = Body     ByteString
>                | Stream   (StreamG ByteString Word8)
>                | SendFile FilePath

> Gregory, didn't you mean Response?

...yeah, I guess I did. Sorry, I mucked up Request (which has that
RqBody type) and Response (which just uses a plain bytestring now.)

Note that between Response and the new SendFile constructor you're
planning on introducing, the only difference is the body type; maybe we
should think about moving SendFile / left-fold (if we do that) down into
the body type?

Either way would be fine, of course, it's an aesthetic decision.

G.
--
Gregory Collins <g...@gregorycollins.net>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 24 2009, 7:18 am
From: Matthew Elder <m...@mattelder.org>
Date: Wed, 24 Jun 2009 04:18:57 -0700
Local: Wed, Jun 24 2009 7:18 am
Subject: Re: Some thoughts on the future direction of Happstack
That would work, yeah, let me sleep on that. (Just changed violet's diapers)

-- oh, and that code is what was in the current source, which is still
lazy it seems.. L.ByteString.

On 6/24/09, Gregory Collins <g...@gregorycollins.net> wrote:

--
Sent from my mobile device

Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Collins  
View profile  
 More options Jun 24 2009, 9:05 am
From: Gregory Collins <g...@gregorycollins.net>
Date: Wed, 24 Jun 2009 09:05:13 -0400
Local: Wed, Jun 24 2009 9:05 am
Subject: Re: Some thoughts on the future direction of Happstack

Matthew Elder <m...@mattelder.org> writes:
> That would work, yeah, let me sleep on that. (Just changed violet's
> diapers)

It'd be a backwards-incompatible change, so let's save it for the
upcoming ServerPart refactoring.

G.
--
Gregory Collins <g...@gregorycollins.net>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 24 2009, 10:49 am
From: Matthew Elder <m...@mattelder.org>
Date: Wed, 24 Jun 2009 07:49:41 -0700
Local: Wed, Jun 24 2009 10:49 am
Subject: Re: Some thoughts on the future direction of Happstack
Right.

On 6/24/09, Gregory Collins <g...@gregorycollins.net> wrote:

> Matthew Elder <m...@mattelder.org> writes:

>> That would work, yeah, let me sleep on that. (Just changed violet's
>> diapers)

> It'd be a backwards-incompatible change, so let's save it for the
> upcoming ServerPart refactoring.

> G.
> --
> Gregory Collins <g...@gregorycollins.net>

--
Sent from my mobile device

Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John MacFarlane  
View profile  
 More options Jun 24 2009, 12:44 pm
From: John MacFarlane <fiddlosop...@gmail.com>
Date: Wed, 24 Jun 2009 09:44:51 -0700
Local: Wed, Jun 24 2009 12:44 pm
Subject: Re: Some thoughts on the future direction of Happstack
+++ Gregory Collins [Jun 21 09 03:25 ]:

Jinjing Wang has already had some success getting a happstack app
(gitit) running through his 'hack' (a rack-like middleware layer):
http://groups.google.com/group/gitit-discuss/browse_thread/thread/829...

He was even able to run gitit on hyena this way, though he needs some
help with the hyena interface.

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Elder  
View profile  
 More options Jun 24 2009, 1:06 pm
From: Matthew Elder <m...@mattelder.org>
Date: Wed, 24 Jun 2009 10:06:16 -0700
Local: Wed, Jun 24 2009 1:06 pm
Subject: Re: Some thoughts on the future direction of Happstack

yeah i noticed that, very interesting indeed! this will be invaluable
to those who are not experienced with application server interfaces.

On Wed, Jun 24, 2009 at 9:44 AM, John MacFarlane <fiddlosop...@gmail.com>wrote:

--
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Creighton Hogg  
View profile  
 More options Jun 25 2009, 3:07 pm
From: Creighton Hogg <wch...@gmail.com>
Date: Thu, 25 Jun 2009 12:07:00 -0700
Subject: Re: Some thoughts on the future direction of Happstack

On Wed, Jun 17, 2009 at 5:47 PM, stepcut<jer...@n-heptane.com> wrote:

> Oh, I also wanted to add that I think happstack will have achieved
> ultimate success when it no longer exists.
<snip>
> Hence, at some future date, happstack could be merely a concept that
> builds on top of a number of existing libraries. In the same way that
> we don't think of mtl or stm as being an explicit part of happstack,
> we might some day not think any of the current components as belonging
> exclusively to happstack.

> At that point, happstack will be more of a philosophy of how to build
> a highly scalable, stable website rather than any specific
> implementation of code.

Getting in late on this discussion as I was busy
packing/moving/unpacking, but I strongly second this sentiment.
Also, I saw that there was a bit of discussion about future work on
Happstack-State, multimaster, & sharding.  To be honest, my main
interest in the Happstack project is working on the persistence model
& backend so I'm more than willing to take lead on any effort to
rewrite the macid implementation if no one is chomping at the bit.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stepcut  
View profile  
 More options Jun 25 2009, 4:08 pm
From: stepcut <jer...@n-heptane.com>
Date: Thu, 25 Jun 2009 13:08:43 -0700 (PDT)
Local: Thurs, Jun 25 2009 4:08 pm
Subject: Re: Some thoughts on the future direction of Happstack
On Jun 25, 2:07 pm, Creighton Hogg <wch...@gmail.com> wrote:

> Also, I saw that there was a bit of discussion about future work on
> Happstack-State, multimaster, & sharding.  To be honest, my main
> interest in the Happstack project is working on the persistence model
> & backend so I'm more than willing to take lead on any effort to
> rewrite the macid implementation if no one is chomping at the bit.

What do you mean by rewrite? The current code is largely undocumented,
the multimaster code is incomplete, and sharding has not yet been
started. On the other hand, for a single server system, it seems
pretty stable. I have looked at the code extensively and the code
looks pretty good. And it seems like it should be possible finish
multimaster and add sharding to the current code base.

But, rewrite makes it sound like you want to start over, perhaps with
a different approach? If so, why do you feel the current code is not
suitable, and what do you plan to do differently?

- jeremy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Creighton Hogg  
View profile  
 More options Jun 25 2009, 4:13 pm
From: Creighton Hogg <wch...@gmail.com>
Date: Thu, 25 Jun 2009 13:13:08 -0700
Local: Thurs, Jun 25 2009 4:13 pm
Subject: Re: Some thoughts on the future direction of Happstack

Sorry, I made an awful word choice.  I meant 'revise', as in stream
line, polish, & finish.  Regardless of my linguistic handicap, I think
we're on the same page.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stepcut  
View profile  
 More options Jun 25 2009, 8:49 pm
From: stepcut <jer...@n-heptane.com>
Date: Thu, 25 Jun 2009 17:49:19 -0700 (PDT)
Local: Thurs, Jun 25 2009 8:49 pm
Subject: Re: Some thoughts on the future direction of Happstack
On Jun 25, 3:13 pm, Creighton Hogg <wch...@gmail.com> wrote:

> Sorry, I made an awful word choice.  I meant 'revise', as in stream
> line, polish, & finish.  Regardless of my linguistic handicap, I think
> we're on the same page.

Sweet!

If you are looking for a good place to start, you might try debugging
the happstack-state test that fails randomly.  Namely,

### Failure in: happstack-state:1:checkpointProperties:
4:prop_runRestoreCongestion

Mae and I looked at it briefly a while ago, and it looked like the
event right after the checkpoint was sometimes lost. If this is a real
bug, then it would be great to squash it. And, in the process, you
should get a clear understanding of how happstack-state works under
the hood (assuming you don't already).

- jeremy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »