Network save and load

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

Network save and load

Hilaire Fernandes
Hello,

In DrGeo I want a new feature: users could save and load sketches in a
remote server. It could be done with FTP or HTTP, or any other means.
I don't have any experience in networked operation nor what it is
possible to do with the Pharo classes library.

What are your suggestion?

Thanks

Hilaire



--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Sven Van Caekenberghe
Hilaire,

On 03 Dec 2011, at 10:38, Hilaire Fernandes wrote:

> Hello,
>
> In DrGeo I want a new feature: users could save and load sketches in a
> remote server. It could be done with FTP or HTTP, or any other means.
> I don't have any experience in networked operation nor what it is
> possible to do with the Pharo classes library.
>
> What are your suggestion?
>
> Thanks
>
> Hilaire

I would use HTTP with basic authentication to start with, like Monticello does today.
Account management is a seperate problem, as is some security strategy.
You probably intent to have sharing, so you have to think about that too.

The client side could be very simple (for simplicity let's assume you store strings, you could pick a better representation with automatic encoding/decoding, later on):

"Get drawing1"

ZnClient new
  username: 'john' password: 'secret';
  get: 'http://www.drgeo.eu/drawings/johnsbook/drawing1'.

"Store a new drawing or overwrite an existing one"

ZnClient new
  username: 'john' password: 'secret';
  contents: 'a string representation of a drawing';
  put: 'http://www.drgeo.eu/drawings/johnsbook/drawing1'.

"Delete a drawing"

ZnClient new
  username: 'john' password: 'secret';
  delete: 'http://www.drgeo.eu/drawings/johnsbook/drawing1'.

"List my drawings"

ZnClient new
  username: 'john' password: 'secret';
  get: 'http://www.drgeo.eu/drawings/johnsbook/'.


The server side would not be that much work either: have a look at how the ZnMonticelloServerDelegate class (to be combined with a ZnServer). This implements a comparable protocol.

HTH,

Sven


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
Thanks very much for your tips and examples, it is very valuable. Thanks
a lot.

On the server side I want to be server neutral, and use what ever
resource is there: Apache, FTP. And may be I don't want to build a
specific Smalltalk server, at least for now.
Is it possible to use FTP client in Pharo?

Hilaire


Le 03/12/2011 11:45, Sven Van Caekenberghe a écrit :

> Hilaire,
>
> On 03 Dec 2011, at 10:38, Hilaire Fernandes wrote:
>
>> Hello,
>>
>> In DrGeo I want a new feature: users could save and load sketches in a
>> remote server. It could be done with FTP or HTTP, or any other means.
>> I don't have any experience in networked operation nor what it is
>> possible to do with the Pharo classes library.
>>
>> What are your suggestion?
>>
>> Thanks
>>
>> Hilaire
>
> I would use HTTP with basic authentication to start with, like Monticello does today.
> Account management is a seperate problem, as is some security strategy.
> You probably intent to have sharing, so you have to think about that too.
>
> The client side could be very simple (for simplicity let's assume you store strings, you could pick a better representation with automatic encoding/decoding, later on):
>
> "Get drawing1"
>
> ZnClient new
>   username: 'john' password: 'secret';
>   get: 'http://www.drgeo.eu/drawings/johnsbook/drawing1'.
>
> "Store a new drawing or overwrite an existing one"
>
> ZnClient new
>   username: 'john' password: 'secret';
>   contents: 'a string representation of a drawing';
>   put: 'http://www.drgeo.eu/drawings/johnsbook/drawing1'.
>
> "Delete a drawing"
>
> ZnClient new
>   username: 'john' password: 'secret';
>   delete: 'http://www.drgeo.eu/drawings/johnsbook/drawing1'.
>
> "List my drawings"
>
> ZnClient new
>   username: 'john' password: 'secret';
>   get: 'http://www.drgeo.eu/drawings/johnsbook/'.
>
>
> The server side would not be that much work either: have a look at how the ZnMonticelloServerDelegate class (to be combined with a ZnServer). This implements a comparable protocol.
>
> HTH,
>
> Sven
>
>
>


--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

drush66

Well, aside from being a bit complex, ftp is also quite dated, and question is how many users would like to save to ftp or have ftp accounts. Maybe then WebDAV, it can be served by most web servers?

Davorin Rusevljan
http://www.cloud208.com/

On Dec 3, 2011 2:07 PM, "Hilaire Fernandes" <[hidden email]> wrote:

Thanks very much for your tips and examples, it is very valuable. Thanks
a lot.

On the server side I want to be server neutral, and use what ever
resource is there: Apache, FTP. And may be I don't want to build a
specific Smalltalk server, at least for now.
Is it possible to use FTP client in Pharo?

Hilaire


Le 03/12/2011 11:45, Sven Van Caekenberghe a écrit :

> Hilaire,
>
> On 03 Dec 2011, at 10:38, Hilaire Fernandes wrote:
>
>> Hello,
>>
>> In DrGeo I wan...

--
Dr. Geo -- http://www.drgeo.eu

Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Sven Van Caekenberghe

On 03 Dec 2011, at 16:52, Davorin Rusevljan wrote:

> Well, aside from being a bit complex, ftp is also quite dated, and question is how many users would like to save to ftp or have ftp accounts. Maybe then WebDAV, it can be served by most web servers?

What I described should be WebDAV compatible (more or less, I haven't tried).

From where I stand, learning & configuring Apache and friends is a lot more complex and less fun than doing it in Smalltalk.

But it also depends on what you want: as I said you have to consider account management, security and probably sharing.

Sven
Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Janko Mivšek
In reply to this post by drush66
WebDAV has additional advantage that is supported in many desktop apps
like MS Office and LibreOffice. It essentially enables you to "save to
the web" directly.

For instance you can open an attachment in Aida/Scribo, edit it and save
directly back to that attachment. No need to save localy, delete old
attachment and attach back new one.

Best regards
Janko

S, Davorin Rusevljan piše:

> Well, aside from being a bit complex, ftp is also quite dated, and
> question is how many users would like to save to ftp or have ftp
> accounts. Maybe then WebDAV, it can be served by most web servers?
>
> Davorin Rusevljan
> http://www.cloud208.com/
>
>> On Dec 3, 2011 2:07 PM, "Hilaire Fernandes"
>> <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Thanks very much for your tips and examples, it is very valuable. Thanks
>> a lot.
>>
>> On the server side I want to be server neutral, and use what ever
>> resource is there: Apache, FTP. And may be I don't want to build a
>> specific Smalltalk server, at least for now.
>> Is it possible to use FTP client in Pharo?
>>
>> Hilaire


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

Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Stéphane Ducasse
In reply to this post by Sven Van Caekenberghe
Hilaire

if you have a simple solution for the server side I would be interested because it would be a cool example for the chapter on Zinc.

Stef
On Dec 3, 2011, at 11:45 AM, Sven Van Caekenberghe wrote:

>
> "List my drawings"
>
> ZnClient new
>  username: 'john' password: 'secret';
>  get: 'http://www.drgeo.eu/drawings/johnsbook/'.
>
>
> The server side would not be that much work either: have a look at how the ZnMonticelloServerDelegate class (to be combined with a ZnServer). This implements a comparable protocol.


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
For the server side I should not do anything. It should rely on existing
server in school or whatever: FTP or even WebDav service as it exists in
Apache or even CMS applicaton like Zope, may be Moodle ?

Hilaire

Le 03/12/2011 22:30, Stéphane Ducasse a écrit :

> Hilaire
>
> if you have a simple solution for the server side I would be interested because it would be a cool example for the chapter on Zinc.
>
> Stef
> On Dec 3, 2011, at 11:45 AM, Sven Van Caekenberghe wrote:
>
>>
>> "List my drawings"
>>
>> ZnClient new
>>  username: 'john' password: 'secret';
>>  get: 'http://www.drgeo.eu/drawings/johnsbook/'.
>>
>>
>> The server side would not be that much work either: have a look at how the ZnMonticelloServerDelegate class (to be combined with a ZnServer). This implements a comparable protocol.
>
>
>


--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
In reply to this post by Sven Van Caekenberghe
Le 03/12/2011 17:21, Sven Van Caekenberghe a écrit :
>
> On 03 Dec 2011, at 16:52, Davorin Rusevljan wrote:
>
>> Well, aside from being a bit complex, ftp is also quite dated, and question is how many users would like to save to ftp or have ftp accounts. Maybe then WebDAV, it can be served by most web servers?
>
> What I described should be WebDAV compatible (more or less, I haven't tried).

It will be great.

Hilaire



--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
In reply to this post by Janko Mivšek
Le 03/12/2011 17:46, Janko Mivšek a écrit :
> WebDAV has additional advantage that is supported in many desktop apps
> like MS Office and LibreOffice. It essentially enables you to "save to
> the web" directly.
>
> For instance you can open an attachment in Aida/Scribo, edit it and save
> directly back to that attachment. No need to save localy, delete old
> attachment and attach back new one.


Are you relying on the Zinc class library to access WebDav resources.

One day it will be nice to have a dedicated Smalltalk web server, so
DrGeo sketches could be rendered, updated, managed à la Smalltalk.

Hilaire



--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Janko Mivšek
S, Hilaire Fernandes piše:

> Janko Mivšek a écrit :

>> WebDAV has additional advantage that is supported in many desktop apps
>> like MS Office and LibreOffice. It essentially enables you to "save to
>> the web" directly.
>>
>> For instance you can open an attachment in Aida/Scribo, edit it and save
>> directly back to that attachment. No need to save localy, delete old
>> attachment and attach back new one.

> Are you relying on the Zinc class library to access WebDav resources.

No, Swazoo and Aida/Web, to serve WebDAV resources.

> One day it will be nice to have a dedicated Smalltalk web server, so
> DrGeo sketches could be rendered, updated, managed à la Smalltalk.


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

Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Stéphane Ducasse
In reply to this post by Hilaire Fernandes

On Dec 4, 2011, at 8:49 AM, Hilaire Fernandes wrote:

> Le 03/12/2011 17:46, Janko Mivšek a écrit :
>> WebDAV has additional advantage that is supported in many desktop apps
>> like MS Office and LibreOffice. It essentially enables you to "save to
>> the web" directly.
>>
>> For instance you can open an attachment in Aida/Scribo, edit it and save
>> directly back to that attachment. No need to save localy, delete old
>> attachment and attach back new one.
>
>
> Are you relying on the Zinc class library to access WebDav resources.
>
> One day it will be nice to have a dedicated Smalltalk web server, so
> DrGeo sketches could be rendered, updated, managed à la Smalltalk.

I do not get your question.
Zinc, Swazoo, seaside are web servers.

>
> Hilaire
>
>
>
> --
> Dr. Geo -- http://www.drgeo.eu
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
In reply to this post by Janko Mivšek
Le 04/12/2011 10:20, Janko Mivšek a écrit :

> S, Hilaire Fernandes piše:
>
>> Janko Mivšek a écrit :
>
>>> WebDAV has additional advantage that is supported in many desktop apps
>>> like MS Office and LibreOffice. It essentially enables you to "save to
>>> the web" directly.
>>>
>>> For instance you can open an attachment in Aida/Scribo, edit it and save
>>> directly back to that attachment. No need to save localy, delete old
>>> attachment and attach back new one.
>
>> Are you relying on the Zinc class library to access WebDav resources.

Nice to know.

Hilaire


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
In reply to this post by Stéphane Ducasse
Le 04/12/2011 10:39, Stéphane Ducasse a écrit :

>> One day it will be nice to have a dedicated Smalltalk web server, so
>> DrGeo sketches could be rendered, updated, managed à la Smalltalk.
>
> I do not get your question.
> Zinc, Swazoo, seaside are web servers.

I meant writing a dedicated Dr. Geo Web application using one of these
Smalltalk servers.

--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Stéphane Ducasse

On Dec 4, 2011, at 11:38 AM, Hilaire Fernandes wrote:

> Le 04/12/2011 10:39, Stéphane Ducasse a écrit :
>
>>> One day it will be nice to have a dedicated Smalltalk web server, so
>>> DrGeo sketches could be rendered, updated, managed à la Smalltalk.
>>
>> I do not get your question.
>> Zinc, Swazoo, seaside are web servers.
>
> I meant writing a dedicated Dr. Geo Web application using one of these
> Smalltalk servers.
>

you can do that based on Zinc.


Stef
> --
> Dr. Geo -- http://www.drgeo.eu
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Sven Van Caekenberghe
In reply to this post by Stéphane Ducasse

On 04 Dec 2011, at 10:39, Stéphane Ducasse wrote:

> Zinc, Swazoo, seaside are web servers.

Zn implements both full HTTP client and full HTTP server functionality based on a common, shared framework to deal with HTTP.

I think what Hilaire wants is to add functionality to DrGeo so that people can put drawings on network servers, preferably standard based server, like WebDAV.

There is no reason why this could not be done using ZnClient, I just haven't tried it yet myself.

Sven
Reply | Threaded
Open this post in threaded view
|

Memory allocation

Chantal Thibodeau
In reply to this post by Sven Van Caekenberghe
Hi

I am making tests to migrate a search engine from VW 3.0 to Pharo.  I have
problem with the VM size.  By default, it seems like it only allows 500 megs
in RAM.  We are trying to move away form VW 3.0 beacause we can only
allocate 1G of RAM.

How do I increase the VM memory size ?

Thanks for your help.


Reply | Threaded
Open this post in threaded view
|

Re: Memory allocation

Mariano Martinez Peck


On Wed, Dec 7, 2011 at 9:38 PM, Chantal Thibodeau <[hidden email]> wrote:
Hi

I am making tests to migrate a search engine from VW 3.0 to Pharo.  I have problem with the VM size.  By default, it seems like it only allows 500 megs in RAM.  We are trying to move away form VW 3.0 beacause we can only allocate 1G of RAM.
 
How do I increase the VM memory size ?

Thanks for your help.




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Hilaire Fernandes
In reply to this post by Sven Van Caekenberghe
Le 03/12/2011 11:45, Sven Van Caekenberghe a écrit :
> "List my drawings"
>
> ZnClient new
>   username: 'john' password: 'secret';
>   get: 'http://www.drgeo.eu/drawings/johnsbook/'.
>


I try

ZnClient
  get: 'http://icp.ge.ch/co/plonecoudriers/maths/drgeo/'
  username: 'hilaire' password: 'xxx'

but I only get the content of the rendered page.
How can I fetch the file list.


From Gnome, I added in the file manager a distant server
dav://[hidden email]/co/plonecoudriers/maths/drgeo
and it give me back the listed file.


--
Dr. Geo -- http://www.drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Sven Van Caekenberghe
Hi Hilaire,

On 11 Dec 2011, at 11:03, Hilaire Fernandes wrote:

> I try
>
> ZnClient
>  get: 'http://icp.ge.ch/co/plonecoudriers/maths/drgeo/'
>  username: 'hilaire' password: 'xxx'
>
> but I only get the content of the rendered page.
> How can I fetch the file list.
>
>
> From Gnome, I added in the file manager a distant server
> dav://[hidden email]/co/plonecoudriers/maths/drgeo
> and it give me back the listed file.

I haven't said it would work out of the box, just that Zn should contain the necessary things to build upon ;-)

WebDAV is a quite complicated standard, multiple RFCs, using lots of XML, so it will be difficult to implement all of it.

Since I like the DrGeo project and its goals, I will try to help.

Give me some time, and I will see what I can come up with.

Regards,

Sven
12