[squeak-dev] Re: [Pharo-project] A point a.k.a excuse to you

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: [Pharo-project] A point a.k.a excuse to you

keith1y
Michael Roberts wrote:

> Keith, your email implies that you believe Pharo should be backwards
> compatible at some level with Squeak.  Part of the Pharo manifesto is
> not to be compatible.  So if you want to write code or have apis that
> work in a backwards direction from Pharo to Squeak, that's great.  I
> don't believe it's a goal for Pharo though.  The pharo process doesn't
> need a rethink at all as far as I'm concerned.
>
> thanks,
>
> Mike
>  
No that is not what I am saying at all. Perhaps examples would help.

Take Rio. Rio was designed from ground up to be a replacement for a the
present non-modular kernel facility FileDirectory. It is a discrete
loadable module.

Wild and horrible uses of FileDirectory are spread around the image in
lots of places, so one thing that Rio tries to do is to anticipate use
cases, so that the users of Rio dont have to implement File handling
code in their stuff, and so we help to keep the module boundary clear.
For example you can ask Rio to get you the next version of a file -
'myfile.2.txt' asFile nextVersion = 'myFile.3.txt. That facility in
itself potentially lightens SmalltalkImage.  If you want to read Xml
files, you can subclass File, with FileXML, define the #validExtensions
that it handles, and implement contents/contents: This means that your
code only needs to send, 'myfile.xml' asFile contents, to get the model.
There are all sorts of things like that.

With Rio as a front end to File and Socket streams it is perfectly
possible to innovate on them without users of Rio being any the wiser.
If I do 'myFile.3.txt' asFile contents, it wouldn't care whether it was
Squeak streams Nile or Flow behind the scenes. 'http://www.google.com'
asFile contents, now means that I dont have to care about whether
HttpSocket is doing the work with a RWBinaryOrTextStream in 3.7 or
HTTPClient returning a MultiByteStream thingy in 3.8 or some other new
facility.

So, Rio demonstrates that it is possible to innovate, on a kernel
module, and you dont need to break anything to do it. Secondly by
thinking about APIs and module interface abstractions in this way, you
can define specific interfaces and bottlenecks, that potentially turn
the ball of tangled string into something designed and architected.
There are perhaps hundreds of other modules that could use the same
treatment.

Rio loads into all squeak images I have tried it in, so this then means
that any of my file handling code will work in all images. This benefit
comes from managing Rio as module external to the main image. Rio also
comes in two sizes, a Rio-Kernel, and a Rio-Base, with smaller images in
mind.

Having done this, the question of moving the kernel over to make use of
the new code arises, this also can be achieved without breaking anything
for users that have had Rio available for 2 years in every image that
their code was running in. I.e. Sophie, Croquet, Seaside, Gjallar,
Magma, Etoys, can all migrate their file handling code to the new Rio
API now, even if they are using Squeak 3.7/3.8, without having to
upgrade to the latest squeak. When they do update, they will be pleased
to find that their file handling code works, as well as their
gzipping/archiving/remote file handling/and website accessing code.

Installer follows the same principles, abstracting an api, freeing the
backend to be either old code or new code. If you dont have Universes
loaded, then defining Installer>>#universes to call #sake as a fall back
would use Sake/Packages and get identical results, your users would be
none the wiser. If you dont have SqueakMap loaded, then defining
Installer>>#squeakmap to call #websqueakmap instead, would again give
your users identical results. and you thought that Installer was just
for loading things. Edgar has pointed out that you could use CodeLoader
for that, but thats not the point of installer, Installer is providing a
DSL for loading things that provides an architectural layer of
isolation, and thus both inherrent forward and backward compatibility. I
expect my image building scripts to work identically with Monticello2 in
squeak 3.16 as they do now with Monticello 1.5 in Squeak 3.7.

Scripter (who here even knows that Scripter exists?) does the same, if
you want to write code to close or tile all the windows, after the
installing process has left a mess. Scripter can be the interface to
whatever backend GUI there happens to be whether it is
ToolBuilder/Tweak/Morphic.

Same again with Logging, is a front end abstraction to all of the three+
logging backends out there. I can remove the hardwired calls to
Transcript that scatter the image and replace them with a single api to
multiple backends, both past (Transcript) present (Syslog) and future
(seaside per-user session logging framework).

Oh, and again with Sake/Packages.... why does Sake/Packages define class
tasks? You can write a task that depends upon a task which removes
certain method selectors. You could just call Behaviour direct. Its
another  architectural layer, that frees up the back end to be old or
new code as far as Sake task writers are concerned. I can write a task
that says, "if you find this Class with a method categorised as so, then
it needs to be recategorised as such", in such a way as this task would
run in all images.

Oh and again SystemEditor... another layer of abstraction for compiling
and loading code atomically.

So if you think about it, those who know about the compiler could be
considering how to write their stuff, so that it logs to the Kernel
Logging API (which is valid even if Logging isnt Loaded). They might
consider connecting to SystemEditor in preference to providing a direct
api, and another abstracted pluggable Module is needed to handle source
code files (replacing RemoteString/ChangeSets etc), with Rio as the
local/remote file API.

Do you get the idea now?

For the same treatment to be available for more significant chunks of
squeak, we would need atomic loading to work. Now the code to provide
atomic loading for everyone has been available for over a year, and it
works if you dont use traits. So where is the expertise to really get it
working for everyone with traits?

The only difficulty with this approach is that you might need slightly
different bits to make your NEW code load into older images. This
problem is reasonably easily addressed with Installer-Scripts
(LevelPlayingField+) and Sake/Packages.

I fully agree with Matthew about core packages like Collections. BUT and
this is the big but. If you are going to do that kind of thing, you need
to think about it, plan it, and create and participate in a process that
supports everyone is diverse images using and testing that package. From
what I have seen there is only one person on the Pharo team that
understands what LevelPlayingField is for, and how to use it.

The biggest risk to this approach is if some other folks decide to fork
some significant architectural component in a completely incompatible
manner, without thinking about any bigger picture at all.

Matthew's comment about how our tools are only just getting there isnt
that relevant to the point that I am making. I didnt need a test and
build server to innovate Rio for everyone rather than just for the image
I am using (trouble was I was using 3 different images), all I needed
was an inclusive attitude rather than an exclusive attitude.

cheers

Keith










Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: [Pharo-project] A point a.k.a excuse to you

keith1y

> build server to innovate Rio for everyone rather than just for the image
> I am using (trouble was I was using 3 different images), all I needed
> was an inclusive attitude rather than an exclusive attitude.
>  
Dear All,

I was trying to implement FileHttpExecutive in Rio today, I wanted to
perform a GET, and have Rio informed of the File size as soon as the
headers have been downloaded. As an alternative it would also be nice to
be able to send a HEAD request prior to getting the whole file. I also
want to read the stream as it is coming in, since Rio already can buffer
ftp reads direct to a file, or other destination.

About 5 minutes looking at the code showed me that this was pretty
impossible. There was no clean way to subclass HTTPSocket and have it
hold a handle on my file instance and report that information to me,
since most of the business is performed on the class side (why do people
do that?) My only option is probably to subclass HTTPSocket, inserting
some Notifications in there, and use exception handlers to collect the data.

So... would anyone out there be willing to rewrite HTTPSocket/Client
from scratch so that it is well designed and so on from the ground up?
Assuming that Socket will remain common between Squeak/Pharo etc, it
could also provide an abstraction onto the Curl plugin as well. This new
module would of course be for the benefit of all.

Has anyone done/is anyone doing this already?

thanks in advance

Keith


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] A point a.k.a excuse to you

Igor Stasenko
In reply to this post by keith1y
2009/3/3 Keith Hodges <[hidden email]>:

> Michael Roberts wrote:
>> Keith, your email implies that you believe Pharo should be backwards
>> compatible at some level with Squeak.  Part of the Pharo manifesto is
>> not to be compatible.  So if you want to write code or have apis that
>> work in a backwards direction from Pharo to Squeak, that's great.  I
>> don't believe it's a goal for Pharo though.  The pharo process doesn't
>> need a rethink at all as far as I'm concerned.
>>
>> thanks,
>>
>> Mike
>>
> No that is not what I am saying at all. Perhaps examples would help.
>
> Take Rio. Rio was designed from ground up to be a replacement for a the
> present non-modular kernel facility FileDirectory. It is a discrete
> loadable module.
>
> Wild and horrible uses of FileDirectory are spread around the image in
> lots of places, so one thing that Rio tries to do is to anticipate use
> cases, so that the users of Rio dont have to implement File handling
> code in their stuff, and so we help to keep the module boundary clear.
> For example you can ask Rio to get you the next version of a file -
> 'myfile.2.txt' asFile nextVersion = 'myFile.3.txt. That facility in
> itself potentially lightens SmalltalkImage.  If you want to read Xml
> files, you can subclass File, with FileXML, define the #validExtensions
> that it handles, and implement contents/contents: This means that your
> code only needs to send, 'myfile.xml' asFile contents, to get the model.
> There are all sorts of things like that.
>
> With Rio as a front end to File and Socket streams it is perfectly
> possible to innovate on them without users of Rio being any the wiser.
> If I do 'myFile.3.txt' asFile contents, it wouldn't care whether it was
> Squeak streams Nile or Flow behind the scenes. 'http://www.google.com'
> asFile contents, now means that I dont have to care about whether
> HttpSocket is doing the work with a RWBinaryOrTextStream in 3.7 or
> HTTPClient returning a MultiByteStream thingy in 3.8 or some other new
> facility.
>
> So, Rio demonstrates that it is possible to innovate, on a kernel
> module, and you dont need to break anything to do it. Secondly by
> thinking about APIs and module interface abstractions in this way, you
> can define specific interfaces and bottlenecks, that potentially turn
> the ball of tangled string into something designed and architected.
> There are perhaps hundreds of other modules that could use the same
> treatment.
>
> Rio loads into all squeak images I have tried it in, so this then means
> that any of my file handling code will work in all images. This benefit
> comes from managing Rio as module external to the main image. Rio also
> comes in two sizes, a Rio-Kernel, and a Rio-Base, with smaller images in
> mind.
>
> Having done this, the question of moving the kernel over to make use of
> the new code arises, this also can be achieved without breaking anything
> for users that have had Rio available for 2 years in every image that
> their code was running in. I.e. Sophie, Croquet, Seaside, Gjallar,
> Magma, Etoys, can all migrate their file handling code to the new Rio
> API now, even if they are using Squeak 3.7/3.8, without having to
> upgrade to the latest squeak. When they do update, they will be pleased
> to find that their file handling code works, as well as their
> gzipping/archiving/remote file handling/and website accessing code.
>
> Installer follows the same principles, abstracting an api, freeing the
> backend to be either old code or new code. If you dont have Universes
> loaded, then defining Installer>>#universes to call #sake as a fall back
> would use Sake/Packages and get identical results, your users would be
> none the wiser. If you dont have SqueakMap loaded, then defining
> Installer>>#squeakmap to call #websqueakmap instead, would again give
> your users identical results. and you thought that Installer was just
> for loading things. Edgar has pointed out that you could use CodeLoader
> for that, but thats not the point of installer, Installer is providing a
> DSL for loading things that provides an architectural layer of
> isolation, and thus both inherrent forward and backward compatibility. I
> expect my image building scripts to work identically with Monticello2 in
> squeak 3.16 as they do now with Monticello 1.5 in Squeak 3.7.
>
> Scripter (who here even knows that Scripter exists?) does the same, if
> you want to write code to close or tile all the windows, after the
> installing process has left a mess. Scripter can be the interface to
> whatever backend GUI there happens to be whether it is
> ToolBuilder/Tweak/Morphic.
>
> Same again with Logging, is a front end abstraction to all of the three+
> logging backends out there. I can remove the hardwired calls to
> Transcript that scatter the image and replace them with a single api to
> multiple backends, both past (Transcript) present (Syslog) and future
> (seaside per-user session logging framework).
>
> Oh, and again with Sake/Packages.... why does Sake/Packages define class
> tasks? You can write a task that depends upon a task which removes
> certain method selectors. You could just call Behaviour direct. Its
> another  architectural layer, that frees up the back end to be old or
> new code as far as Sake task writers are concerned. I can write a task
> that says, "if you find this Class with a method categorised as so, then
> it needs to be recategorised as such", in such a way as this task would
> run in all images.
>
> Oh and again SystemEditor... another layer of abstraction for compiling
> and loading code atomically.
>
> So if you think about it, those who know about the compiler could be
> considering how to write their stuff, so that it logs to the Kernel
> Logging API (which is valid even if Logging isnt Loaded). They might
> consider connecting to SystemEditor in preference to providing a direct
> api, and another abstracted pluggable Module is needed to handle source
> code files (replacing RemoteString/ChangeSets etc), with Rio as the
> local/remote file API.
>
> Do you get the idea now?
>
> For the same treatment to be available for more significant chunks of
> squeak, we would need atomic loading to work. Now the code to provide
> atomic loading for everyone has been available for over a year, and it
> works if you dont use traits. So where is the expertise to really get it
> working for everyone with traits?
>
> The only difficulty with this approach is that you might need slightly
> different bits to make your NEW code load into older images. This
> problem is reasonably easily addressed with Installer-Scripts
> (LevelPlayingField+) and Sake/Packages.
>
> I fully agree with Matthew about core packages like Collections. BUT and
> this is the big but. If you are going to do that kind of thing, you need
> to think about it, plan it, and create and participate in a process that
> supports everyone is diverse images using and testing that package. From
> what I have seen there is only one person on the Pharo team that
> understands what LevelPlayingField is for, and how to use it.
>
> The biggest risk to this approach is if some other folks decide to fork
> some significant architectural component in a completely incompatible
> manner, without thinking about any bigger picture at all.
>
> Matthew's comment about how our tools are only just getting there isnt
> that relevant to the point that I am making. I didnt need a test and
> build server to innovate Rio for everyone rather than just for the image
> I am using (trouble was I was using 3 different images), all I needed
> was an inclusive attitude rather than an exclusive attitude.
>
> cheers
>
> Keith
>

Keithy, your description shows that Rio is a truly modular by design.
I would really like to see more and more packages like that in
Squeak/Pharo :
- non obtrusive/intrusive
- self sufficient
- with well defined protocols interfacing with other players on field
- easy to use
- easy to extend
- easy to plug-in/plug-out

--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Phil B
In reply to this post by keith1y
On Mar 2, 2009, at 9:16 PM, Keith Hodges wrote:

>
>> build server to innovate Rio for everyone rather than just for the  
>> image
>> I am using (trouble was I was using 3 different images), all I needed
>> was an inclusive attitude rather than an exclusive attitude.
>>
> Dear All,
>
> I was trying to implement FileHttpExecutive in Rio today, I wanted to
> perform a GET, and have Rio informed of the File size as soon as the
> headers have been downloaded. As an alternative it would also be  
> nice to
> be able to send a HEAD request prior to getting the whole file. I also
> want to read the stream as it is coming in, since Rio already can  
> buffer
> ftp reads direct to a file, or other destination.
>
> About 5 minutes looking at the code showed me that this was pretty
> impossible. There was no clean way to subclass HTTPSocket and have it
> hold a handle on my file instance and report that information to me,
> since most of the business is performed on the class side (why do  
> people
> do that?) My only option is probably to subclass HTTPSocket, inserting
> some Notifications in there, and use exception handlers to collect  
> the data.
>
> So... would anyone out there be willing to rewrite HTTPSocket/Client
> from scratch so that it is well designed and so on from the ground up?
> Assuming that Socket will remain common between Squeak/Pharo etc, it
> could also provide an abstraction onto the Curl plugin as well. This  
> new
> module would of course be for the benefit of all.
>

I too am looking for a better solution but haven't found one yet.  I  
am interested in looking at anything better if it exists and am  
willing to lend a hand to helping work on such an effort as well.

As I haven't found a solution yet, I have started to implement my own  
HTTPRequest and HTTPResponse classes which will (for now) be used as a  
front-end to a hacked up HTTPSocket.  The idea is that you would still  
have HTTPRequest get:, for example, but it wouldn't have the  
intermingled request/response handling code that HTTPSocket currently  
does and would provide more granular control of request servicing,  
support non-interactive reporting and handling of errors, and  
generally attempt to provide a clean front-end for HTTP that can be  
rewired transparently (from the callers perspective) to alternate  
lower-level network plumbing in the future.

> Has anyone done/is anyone doing this already?
>
> thanks in advance
>
> Keith
>
>


Not sure what your timeline on needing a solution is as I've just  
started this in the last couple of days but I'll be happy to share  
what I come up with once I have something more usable.  Also, if you  
have any specific recommendations or requests I am open to them.  If  
others interested in this, I would probably be willing to get a little  
crazy and even document it and provide some test cases.

Thanks,
Phil

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Göran Krampe
Hi!

What about perhaps looking at what has already been done, like:

http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040

I used Steve's HTTP client code in a project and it worked good.

regards, Göran


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Michael Rueger-6
Göran Krampe wrote:
> Hi!
>
> What about perhaps looking at what has already been done, like:
>
> http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040

I used and adapted the second one IIRC. For reasons that I can't recall
right now I liked it better :-)

Michael

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Philippe Marschall
In reply to this post by Göran Krampe
2009/3/3 Göran Krampe <[hidden email]>:
> Hi!
>
> What about perhaps looking at what has already been done, like:
>
> http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040

Both of these links are dead.

Cheers
Philippe

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Göran Krampe
Philippe Marschall wrote:
> 2009/3/3 Göran Krampe <[hidden email]>:
>> Hi!
>>
>> What about perhaps looking at what has already been done, like:
>>
>> http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
>> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040
>
> Both of these links are dead.

Good that SM has a server side cache then! :) If you use SM package
loader it will at least download the last one properly. Using Firefox
you can get at the server side cached file by adding "/cache" like this:

http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040/autoversion/1/cache

...you don't get the proper filename, but if you rename it - it should work.

regards, Göran


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] A point a.k.a excuse to you

Janko Mivšek
In reply to this post by Igor Stasenko
Igor Stasenko pravi:

> Keithy, your description shows that Rio is a truly modular by design.
> I would really like to see more and more packages like that in
> Squeak/Pharo :
> - non obtrusive/intrusive
> - self sufficient
> - with well defined protocols interfacing with other players on field
> - easy to use
> - easy to extend
> - easy to plug-in/plug-out

Let me share an experience: A good school for both modularity but
specially self sufficience is to make your work portable to other
Smalltalks. In this case you'll soon find out, if your work really is
what you otherwise claim it is. I know that from my own experience, both
on Swazoo and Aida.

Best regards
Janko


--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Swazoo-Lite? (was HTTPSocket)

Janko Mivšek
In reply to this post by Phil B
.. cross posted to swazoo-dev, pharo, swazoo-devel, aida, seaside.

Phil (list) pravi:
> On Mar 2, 2009, at 9:16 PM, Keith Hodges wrote:
...
>> So... would anyone out there be willing to rewrite HTTPSocket/Client
>> from scratch so that it is well designed and so on from the ground up?
>> Assuming that Socket will remain common between Squeak/Pharo etc, it
>> could also provide an abstraction onto the Curl plugin as well. This new
>> module would of course be for the benefit of all.

> I too am looking for a better solution but haven't found one yet.  I am
> interested in looking at anything better if it exists and am willing to
> lend a hand to helping work on such an effort as well.

> As I haven't found a solution yet, I have started to implement my own
> HTTPRequest and HTTPResponse classes which will (for now) be used as a
> front-end to a hacked up HTTPSocket.

What if we rather make a Swazoo-Lite, that is a subset of Swazoo just
with a HTTP client and a light HTTP server?

That way we will avoid yet another implementation of HTTPRequest and
Response classes , but we will reuse a proven and tested ones from Swazoo.

Swazoo currently don't have a HTTP client but this is easy to add
because  all the infrastructure is there. In Swazoo we otherwise need a
client for reverse proxy support, but this client can actually became
useful as a standalone client as well, as part of Swazoo Lite.

What do you think?

Best regards
Janko



--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Phil B
In reply to this post by Göran Krampe
On Mar 3, 2009, at 2:40 AM, Göran Krampe wrote:

> Philippe Marschall wrote:
>> 2009/3/3 Göran Krampe <[hidden email]>:
>>> Hi!
>>>
>>> What about perhaps looking at what has already been done, like:
>>>
>>> http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
>>> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040
>> Both of these links are dead.
>
> Good that SM has a server side cache then! :) If you use SM package  
> loader it will at least download the last one properly. Using  
> Firefox you can get at the server side cached file by adding "/
> cache" like this:
>
> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040/autoversion/1/cache
>
> ...you don't get the proper filename, but if you rename it - it  
> should work.
>
> regards, Göran
>
>

I have downloaded these cache files and will take a look at them after  
I look after I've checked out Swazoo as Janko recommended.  Obviously,  
currently maintained code is preferred to orphaned code, but I'm  
willing to use whatever I need to as a starting point... just rather  
surprised that this isn't an issue for more people.  Is it just a case  
that not many people are developing client-side HTTP code with Squeak  
these days?

Thanks,
Phil
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

Philippe Marschall
2009/3/3 Phil (list) <[hidden email]>:

> On Mar 3, 2009, at 2:40 AM, Göran Krampe wrote:
>
>> Philippe Marschall wrote:
>>>
>>> 2009/3/3 Göran Krampe <[hidden email]>:
>>>>
>>>> Hi!
>>>>
>>>> What about perhaps looking at what has already been done, like:
>>>>
>>>> http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
>>>> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040
>>>
>>> Both of these links are dead.
>>
>> Good that SM has a server side cache then! :) If you use SM package loader
>> it will at least download the last one properly. Using Firefox you can get
>> at the server side cached file by adding "/cache" like this:
>>
>>
>> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040/autoversion/1/cache
>>
>> ...you don't get the proper filename, but if you rename it - it should
>> work.
>>
>> regards, Göran
>>
>>
>
> I have downloaded these cache files and will take a look at them after I
> look after I've checked out Swazoo as Janko recommended.  Obviously,
> currently maintained code is preferred to orphaned code, but I'm willing to
> use whatever I need to as a starting point... just rather surprised that
> this isn't an issue for more people.  Is it just a case that not many people
> are developing client-side HTTP code with Squeak these days?

Oh it's an issue for a lot of people, that's why some people paid
money to make the Curl plugin happen.

Cheers
Philippe

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Swazoo-Lite? (was HTTPSocket)

Phil B
In reply to this post by Janko Mivšek

On Mar 3, 2009, at 5:37 AM, Janko Mivšek wrote:

> .. cross posted to swazoo-dev, pharo, swazoo-devel, aida, seaside.
>
> Phil (list) pravi:
>> On Mar 2, 2009, at 9:16 PM, Keith Hodges wrote:
> ...
>>> So... would anyone out there be willing to rewrite HTTPSocket/Client
>>> from scratch so that it is well designed and so on from the ground  
>>> up?
>>> Assuming that Socket will remain common between Squeak/Pharo etc, it
>>> could also provide an abstraction onto the Curl plugin as well.  
>>> This new
>>> module would of course be for the benefit of all.
>
>> I too am looking for a better solution but haven't found one yet.  
>> I am
>> interested in looking at anything better if it exists and am  
>> willing to
>> lend a hand to helping work on such an effort as well.
>
>> As I haven't found a solution yet, I have started to implement my own
>> HTTPRequest and HTTPResponse classes which will (for now) be used  
>> as a
>> front-end to a hacked up HTTPSocket.
>
> What if we rather make a Swazoo-Lite, that is a subset of Swazoo just
> with a HTTP client and a light HTTP server?
>
> That way we will avoid yet another implementation of HTTPRequest and
> Response classes , but we will reuse a proven and tested ones from  
> Swazoo.

Agreed and that's why I posted... I'd rather not reinvent the wheel if  
I don't have to, but was getting extremely frustrated by the  
limitations of HTTPSocket.  I'll look at Swazoo's networking code  
today... but your proposal seems like a logical approach to build on  
what's already there.  (though I would suggest a slightly different  
twist... see below.)

>
> Swazoo currently don't have a HTTP client but this is easy to add
> because  all the infrastructure is there. In Swazoo we otherwise  
> need a
> client for reverse proxy support, but this client can actually became
> useful as a standalone client as well, as part of Swazoo Lite.
>
> What do you think?

Rather than creating a Swazoo-Lite which is fairly application-
specific, I'd think that pulling just the HTTP protocol code into its  
own package which would create a good starting point for any code  
requiring HTTP (and hopefully someday Squeak images... hint, hint ;-)  
There's a lot of stuff going on in an HTTP server that client side  
code will never care about and vice versa.  That way, regardless of  
what someone is doing (client-side, server-side, heavy usage, light  
usage) they could take advantage of the networking code which is what  
I, and I believe Keith, are looking for.  As I said before, I'm  
willing to help do this and am not just asking for someone to hand me  
the finished product.

>
> Best regards
> Janko
>
>
>
> --
> Janko Mivšek
> AIDA/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si
>


Thanks,
Phil
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [Pharo-project] HTTPSocket

cedreek
In reply to this post by Michael Rueger-6
2009/3/3 Michael Rueger <[hidden email]>:
> Göran Krampe wrote:
>>
>> Hi!
>>
>> What about perhaps looking at what has already been done, like:
>>
>> http://map.squeak.org/package/15f42ec1-e93e-4bcf-ab2b-6746ae9d413f
>> http://map.squeak.org/package/8644a5ff-923c-438f-b5b0-a281de346040
>

As we are here, I wonder if this is related.
In the NetSqueak package [1], there is InternalSocket subclassed
InternalUDPSocket and InternalTCP socket.
It would be good the new implementation allows to load this package
(and to have an "official" network package).

Cheers

[1]  http://www.squeaksource.com/Net.html

> I used and adapted the second one IIRC. For reasons that I can't recall
> right now I liked it better :-)
>
> Michael
>
>



--
Cédrick