Issue 5113 in pharo: Use ZnClient instead of HttpClient

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

Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Status: Accepted
Owner: [hidden email]

New issue 5113 by [hidden email]: Use ZnClient instead of HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

Use the new ZnClient with decent error handling...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #1 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

see slice

SLICE-Issue-5113-Use-ZnClient-instead-of-HttpClient-CamilloBruni.1


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: FixToInclude

Comment #2 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

This is an important one, it took some effort, but it was fun.

Sven


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Labels: Milestone-1.4 Type-Cleanup

Comment #3 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: Integrated

Comment #4 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

in 14262


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: FixReviewNeeded

Comment #5 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

No, I got an error when merging.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #6 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

That's not good ;-)

I just tried myself, starting from 1.4 # 14261 (build 210).

ZnMimeType class >> #initialize has to run, beats me when MC decides to do  
this and when not.
Nothing changed here in this patch, it should have run before.
At least run ZnMimeType initializeMimeTypes before loading (you can do this  
in the debugger and restart).

It seems that something strange sneeked in the patch: it removes  
MCPackageManager class>>#unregisterForNotifications

Camillo, do you known what this is ?
I don't remember that we touched that.

Sven



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: FixToInclude

Comment #7 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: OnHold

Comment #8 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

Wait for: http://code.google.com/p/pharo/issues/detail?id=5122

I will try to make a cleaner SLICE later on.

Sven


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: FixReviewNeeded

Comment #9 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

Name:  
SLICE-Issue-5113-Use-ZnClient-instead-of-HttpClient-SvenVanCaekenberghe.1
Author: SvenVanCaekenberghe
Time: 20 December 2011, 3:52:33 pm
UUID: 30c62802-529f-4935-9cf4-0b8035d9ec9c
Ancestors:
Dependencies: Monticello-SvenVanCaekenberghe.545,  
ScriptLoader14-SvenVanCaekenberghe.292,  
System-Changes-SvenVanCaekenberghe.127

attempt at a cleaned up version;
requires ZnMimeType initialize;
load lastest Zn version  
(http://code.google.com/p/pharo/issues/detail?id=5122)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #10 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

Name:  
SLICE-Issue-5113-Use-ZnClient-instead-of-HttpClient-SvenVanCaekenberghe.3
Author: SvenVanCaekenberghe
Time: 20 December 2011, 4:42:11 pm
UUID: 71c3078d-4433-49c8-8512-2bd621262b86
Ancestors:
Dependencies: System-Changes-SvenVanCaekenberghe.129,  
Monticello-SvenVanCaekenberghe.547, ScriptLoader14-SvenVanCaekenberghe.294

added #signalProgress: to MCHttpRepository ZnClient use


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #11 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

Please integrate before bitrot sets in...

1.

load lastest Zn version  
(http://code.google.com/p/pharo/issues/detail?id=5122) from  
http://ss3.gemstone.com/ss/PharoInbox/ (both HTTP & Tests)

2.

do ZnMimeType initialize

3.

load  
SLICE-Issue-5113-Use-ZnClient-instead-of-HttpClient-SvenVanCaekenberghe.3  
from http://ss3.gemstone.com/ss/PharoInbox/

Sven, signing off.





_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: FixToInclude

Comment #12 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #13 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

shit the update stream does not work.
ReadStream does not understand text

        nextDoc reset; text.

So I will roll back

elementaryReadServerUpdates
        "Scan the update server(s) for unassimilated updates. If the instance  
variable upToNumber is not nil, it represents the highest-numbered update  
to load.  This makes it possible to update only up to a particular point."

        "UpdateStreamer new elementaryReadServerUpdates"

        | str urls failed loaded this nextDoc updateName |
        (Smalltalk globals includesKey: #ScriptLoader) ifFalse: [
                ^ self feedback: 'ScriptLoader is not present (this may happen if you  
have run cleanUpForProduction). ' ].
        Cursor wait showWhile:
                [ | docQueue docQueueSema |
                urls := self newUpdates.
                loaded := 0.
                failed := nil.
                "send downloaded documents throuh this queue"
                docQueue := SharedQueue new.
                "this semaphore keeps too many documents from beeing queueed up at a time"
                docQueueSema := Semaphore new.
                5 timesRepeat: [ docQueueSema signal ].

                "fork a process to download the updates"
                self retrieveUrls: urls ontoQueue: docQueue withWaitSema: docQueueSema.

                "process downloaded updates in the foreground"

                [ this := docQueue next.
                nextDoc := docQueue next.
                nextDoc = #failed ifTrue: [ failed := this ].
                (failed isNil and: [ nextDoc ~= #finished ])
                ] whileTrue: [
                        failed ifNil: [
                                nextDoc reset; text.
                                nextDoc size = 0 ifTrue: [ failed :




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #14 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

I think you can safely remove the nextDoc reset; text.

With the new code, nextDoc should be a clean readstream on a string.

But how can I test this ?

Sven



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo

Comment #15 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

May be modify the updateStreamer and try. The problem is that there will be  
no pending items to be processed.
So I can redo the test. I mean: I will merge your changes, remove the  
reset; text and publish them
and do another integration to check.




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5113 in pharo: Use ZnClient instead of HttpClient

pharo
Updates:
        Status: Closed

Comment #16 on issue 5113 by [hidden email]: Use ZnClient instead of  
HttpClient
http://code.google.com/p/pharo/issues/detail?id=5113

ok it worked.
Thanks for helping cleaning this code... It was a bit ugly.
in 14267


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker