Been making a list of Http stuff

View: New views
9 Messages — Rating Filter:   Alert me  

Been making a list of Http stuff

by Todd Blanchard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

that is available in the image - seems like we've got six of everything.

Where to begin?  There is a rather nice hierarchy of Url classes for  
the various schemes that include http, file, ftp, etc.  They seem to  
work reasonably well apart from the issue I filed a fix for at http://
bugs.impara.de/view.php?id=2454 .  (I seem only to be able to submit  
bugs, not take ownership of them).

Competing is some classes by Michael Rueger in a package called URI  
which contains a class of the same name.  This package has similar  
interface, however doing 'http://www.yahoo.com' asURI  
retrieveContents results in a walkback as it attempts to call  
HttpClient>>retrieveMIMEDocument: which doesn't exist.  Seems to be  
some mismatch and this brings us to HttpClient.

HttpClient is a grab bag of class methods for doing fetching of files  
over http.  It is used by squeak's network update machinery,  
ProjectLauncher, and HttpServerDirectory.  I wonder if most of what  
it does couldn't be accomplished within the Url hierarchy directly.

There is also a class called HttpLoader - this one seems to try to  
perform async downloads of files over http and has a caching  
variant.  I've given it a few tries and found that some significant  
percentage of the time it ends up getting a timeout response -  
presumably because it doesn't start reading fast enough after opening  
the socket.

It seems to be used by the same code that uses HttpClient.  This code  
doesn't bother me nearly as much as HttpClient (which isn't much of a  
client but just a bunch of functions).  HttpClient seems to be a 1.0  
client BTW.

Looking for Http 1.1 code I find two squeakmap packages.  HC  
HttpClient, and HttpClient (steve waring).  I've tried HCHttpClient  
and gotten walkbacks when downloading files in chunked mode.  I need  
to try the other one and will report when I do.  Both 1.1 clients  
have support for cookies, authentication, and redirection.  Neither  
does caching.

That's what I've been up to.  I realize this is probably working on  
layer above where this team is mostly focused.  I'd like to get more  
involved but am not entirely sure how to proceed.  I have a couple  
personal itches:

SSL - getting an OpenSSL plugin would be useful so we could do https  
fetches and better async loading and caching of documents.  I seem to  
be building the better part of a web browser as well (html parser,  
css parser, html dom, css selector matching, looking for javascript  
implementation) and would be interested in working with someone on  
that as well.

Cheers,
-Todd Blanchard






_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Michael Rueger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Todd Blanchard wrote:
> results in a walkback as it attempts to call  
> HttpClient>>retrieveMIMEDocument: which doesn't exist.  Seems to be  
> some mismatch and this brings us to HttpClient.

The URI stuff is not fully integrated with the services.

> HttpClient is a grab bag of class methods for doing fetching of files  
> over http.  It is used by squeak's network update machinery,  
> ProjectLauncher, and HttpServerDirectory.  I wonder if most of what  it
> does couldn't be accomplished within the Url hierarchy directly.
>
> There is also a class called HttpLoader - this one seems to try to  
> perform async downloads of files over http and has a caching  variant.  

Both these classes origin about 7 years ago from my work at Disney
Online. In hindsight naming HttpClient as such wasn't a good choice. And
basically socket, loader and client classes could be replaced by one
properly implemented client class. Basically what I did in the network
rewrite with ftp client etc.

Michael
_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Cees De Groot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/20/06, Todd Blanchard <tblanchard@...> wrote:
> SSL - getting an OpenSSL plugin would be useful so we could do https
> fetches and better async loading and caching of documents.

That's something we need to leave to the Crypto team, I think. We've
got enough on our plate as it is :-). By the time we have a clean
networking package, I'm sure they'll rush to implement https on top of
it...
_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Todd Blanchard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

URI relates to URL how (why was it written - they have a LOT in common)?

I think it would make sense to rename HttpClient to HttpUtilities and  
bring in one of the two Http 1.1 client packages that do cookies and  
auth and stuff.  Sound good?  If so I'll file a bug and upload a  
changeset.



On Jan 20, 2006, at 1:14 AM, Michael Rueger wrote:

> Todd Blanchard wrote:
>> results in a walkback as it attempts to call  
>> HttpClient>>retrieveMIMEDocument: which doesn't exist.  Seems to  
>> be  some mismatch and this brings us to HttpClient.
>
> The URI stuff is not fully integrated with the services.
>
>> HttpClient is a grab bag of class methods for doing fetching of  
>> files  over http.  It is used by squeak's network update  
>> machinery,  ProjectLauncher, and HttpServerDirectory.  I wonder if  
>> most of what  it does couldn't be accomplished within the Url  
>> hierarchy directly.
>> There is also a class called HttpLoader - this one seems to try  
>> to  perform async downloads of files over http and has a caching  
>> variant.
>
> Both these classes origin about 7 years ago from my work at Disney  
> Online. In hindsight naming HttpClient as such wasn't a good  
> choice. And basically socket, loader and client classes could be  
> replaced by one properly implemented client class. Basically what I  
> did in the network rewrite with ftp client etc.
>
> Michael
> _______________________________________________
> Io mailing list
> Io@...
> http://lists.squeakfoundation.org/mailman/listinfo/io

_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Cees De Groot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/24/06, Todd Blanchard <tblanchard@...> wrote:
> I think it would make sense to rename HttpClient to HttpUtilities and
> bring in one of the two Http 1.1 client packages that do cookies and
> auth and stuff.  Sound good?

Yup

> If so I'll file a bug and upload a changeset.
>
Please fix the thing and publish an .mcz - if you're in the team, no
need to go through Mantis. Just make sure that there are clear
comments on the version so that the 3.9a team can follow what has been
done.
_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Todd Blanchard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, this is looking harder than  I thought.  I mean, I could just  
change the class name and then update all references to it but if you  
want to package that as a MCZ file (which is package based) please  
note that we will touch the following Packages>>Classes

Framework-Download>>HttpClient  (the only class in this category BTW)

System-Support>>AutoStart
System-Support>>Project
System-Support>>ResourceCollector
System-Support>>ResourceManager
System-Support>>SystemVersion
System-Support>>Utilities

System-Download>>HttpLoader
System-Download>>ProjectLauncher

Network-RemoteDirectory>>HttpServerDirectory
Network-RemoteDirectory>>ServerDirectory

ProjectsRepositoryClient>>PRServerDirectory

Which we do not own (do we?).  There's 1-2 methods in each.   I can  
envision the following strategies:

1) Make a changeset

- or -

2) Make a Network-Legacy category for HttpClient (to be named  
HttpUtilities) and when I change each of the methods in the other  
classes make the method category *network-legacy so it becomes part  
of the package I mean to export.

What would you suggest?


On Jan 23, 2006, at 11:00 PM, Todd Blanchard wrote:

> URI relates to URL how (why was it written - they have a LOT in  
> common)?
>
> I think it would make sense to rename HttpClient to HttpUtilities  
> and bring in one of the two Http 1.1 client packages that do  
> cookies and auth and stuff.  Sound good?  If so I'll file a bug and  
> upload a changeset.
>
>
>
> On Jan 20, 2006, at 1:14 AM, Michael Rueger wrote:
>
>> Todd Blanchard wrote:
>>> results in a walkback as it attempts to call  
>>> HttpClient>>retrieveMIMEDocument: which doesn't exist.  Seems to  
>>> be  some mismatch and this brings us to HttpClient.
>>
>> The URI stuff is not fully integrated with the services.
>>
>>> HttpClient is a grab bag of class methods for doing fetching of  
>>> files  over http.  It is used by squeak's network update  
>>> machinery,  ProjectLauncher, and HttpServerDirectory.  I wonder  
>>> if most of what  it does couldn't be accomplished within the Url  
>>> hierarchy directly.
>>> There is also a class called HttpLoader - this one seems to try  
>>> to  perform async downloads of files over http and has a caching  
>>> variant.
>>
>> Both these classes origin about 7 years ago from my work at Disney  
>> Online. In hindsight naming HttpClient as such wasn't a good  
>> choice. And basically socket, loader and client classes could be  
>> replaced by one properly implemented client class. Basically what  
>> I did in the network rewrite with ftp client etc.
>>
>> Michael
>> _______________________________________________
>> Io mailing list
>> Io@...
>> http://lists.squeakfoundation.org/mailman/listinfo/io
>
> _______________________________________________
> Io mailing list
> Io@...
> http://lists.squeakfoundation.org/mailman/listinfo/io

_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Cees De Groot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2/18/06, Todd Blanchard <tblanchard@...> wrote:
> OK, this is looking harder than  I thought.  I mean, I could just
> change the class name and then update all references to it but if you
> want to package that as a MCZ file (which is package based) please
> note that we will touch the following Packages>>Classes
>

One suggestion would be to decide whether all these things belong in
these packages or rather in a Http-oriented package - iow check
whether it makes sense moving them by recategorizing these methods.
_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Parent Message unknown Re: Been making a list of Http stuff

by Michael Rueger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Todd Blanchard wrote:
> They're actually on SqueakMap.
>
> One is called 'HC HttpClient'

Can't download this one, the site is gone and it doesn't seem to be in
the cache.

> The other is called 'HttpClient'

Got this one.

> Since I've got a pretty good fault tolerant html and css parser dom  

Within the Sophie project we did a css implementation as well, we use it
to skin widgets. We'll hopefully officially release the code soon. It is
open source, but we haven't decided on a license yet.
I would be interest to look at your code though, especially the html
parser stuff. We could use it for importing html into Sophie.

> 4) Javascript support (I was gonna do a spidermonkey plugin).

Hmm, that could open some interesting possibilities :-)

Michael
_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io

Re: Been making a list of Http stuff

by Michael Rueger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Todd Blanchard wrote:
> URI relates to URL how (why was it written - they have a LOT in common)?

A never ending discussion ;-)
IMHO URI is a clean implementation and superset of URLs, replacing a
bunch of classes with basically one. Dispatching of services is done by
mapping schemes to client classes.
In our projects we by now exclusively use URIs, also as a replacement
for filenames wherever possible.

Michael
_______________________________________________
Io mailing list
Io@...
http://lists.squeakfoundation.org/mailman/listinfo/io