Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Transferrer

 
Post new topic   Reply to topic    Syllable Forum Index -> Syllable Desktop
View previous topic :: View next topic  
Author Message
sylvestre



Joined: 13 Jun 2011
Posts: 36

PostPosted: Sat Jul 02, 2011 9:19 pm    Post subject: Transferrer Reply with quote

Hi Anthony,

Thank you for your work.

I've a question about Transferrer.
Do you plan to add features, such as bittorent and metalink, to Transferrer or is It ftp only ?
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sun Jul 03, 2011 3:42 am    Post subject: Reply with quote

Hi,

Glad to hear that you're interested in Transferrer Smile

So far, Transferrer is ftp only, though it was always planned to eventually add SFTP and FTPS as well. Transferrer uses libcurl for the ftp backend, and libcurl already supports SFTP and FTPS so they should be quite easy to add. I actually hadn't thought about bittorrent. For something like bittorrent, we'd need to use a different library instead of libcurl, and probably redesign the gui too. However, Transferrer still has some important basic things missing, like proper error handling and notification messages, so extensions like bittorrent would be lower priority for now. If you have any ideas about how to do it, we can certainly discuss it though!

- Anthony
Back to top
View user's profile Send private message Visit poster's website
sylvestre



Joined: 13 Jun 2011
Posts: 36

PostPosted: Sun Jul 03, 2011 3:11 pm    Post subject: Reply with quote

I had guessed what could be your answer on the topic but I snapped up on the opportunity to communicate with you. Syllable, programming and so forth...Wink

When you were committing your improvements on Transferrer, I had built "aria2" on my machine (*).
So I was wondering if It's relevant to take aria2 as backend and add a gui on it with the Syllable api.
Aria2 is a cli program but some people did add a gui (with QT for example).

Unexpectedly, you've commited new stuff on Transferrer. My brain revolved in an other direction and I though, "Can Transferrer be extended to act as a general download manager ? "

You replied that Transferrer is a client for ftp, because of the gui design, because of the curl library.
Well, speaking of the devil, It seems that you didn't use a c++ wrapper such as cURL++ (correct me if I'm wrong, I just rely on what I red on the community web site). Can you explain why ?

I'm asking you this, because I'm a beginner in programming (I'm still commiting to memory the syntax of C++, the subtle logic of OOP); but I've planned to cut my teeth with an application which display the weather. In order to do that, I've also compiled "tinyxml" on my machine for instance.


(*) for those who are interrested, grab the last release of c-ares, unregister it and make "build c-ares-1.7.4", "build install c-ares-1.7.4", afterwards get "aria2-1.10.9" from sourceforge and build it in the same way. Only basic use of Builder is required and you're good to go within aria2.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sun Jul 03, 2011 7:49 pm    Post subject: Reply with quote

First, thanks for the info about c-ares and aria2, good to know they build without problems!

There are a couple of reasons why we used libcurl as the Transferrer backend:
+ libcurl is very stable and actively developed and well-known.
+ it supports SFTP/FTPS.
+ it has a good API.
+ libcurl is part of the base Syllable distribution. As a community project, one aim of Transferrer was to use components of the base system when possible, partly as an example to illustrate their use.

Although it does have a couple of downsides:
- doesn't parse dirlistings
- isn't really designed for interactive use

Just for sake of discussion, let's consider the positives and negatives of using aria2 instead of libcurl as a backend.
Positives:
+ it supports metalink, bittorrent etc
+ it can run in the background in a separate process and communicate with the gui via its rpc interface. This is both a positive (resilience to crashes/bugs in the gui) and negative (slower and bulkier than native C/C++ library).

Negatives:
- it doesn't support SFTP
- it is oriented mainly at downloading. I couldn't find any mention of uploading via FTP
- requires XML or JSON for RPC communication


So there are good reasons for keeping libcurl. However, if we want to add torrent/metalink support, we'd have to use something like aria2 in addition to libcurl. aria2 would be one of several possibilities, and we'd want to look at them all and compare them before deciding. Bringing in new libraries & dependencies would make Transferrer more complex and bulkier, and it's questionable whether it's worth it. Transferrer was originally envisioned as an interactive FTP/SFTP/FTPS client like eg Filezilla, rather than a more general download manager. It would probably need some significant changes to the design to fit this kind of thing in Transferrer. So perhaps this kind of functionality is better suited to a separate project. Some of the Transferrer code or design might be re-usable for a download manager/torrent app though, if anyone wants to try! And I'd be happy to discuss the best ways to do it.

As for curl++, it is a thin wrapper around the regular C libcurl API. It provides exactly the same functionality as libcurl, but expressed in C++ terms like classes and templates rather than C terms like pointers to structs. (This is from memory, as I can't currently access the curl++ api documentation). The advantages of curl++ are better type-safety for things like curl_easy_setopt() and exception handling, at the expense of an additional dependency, another layer between the FTP connection and the app, and (IMO) the ugly and complex C++ template syntax. Practically, it probably wouldn't make much difference at all whether we used libcurl or the curl++ wrapper. I went for straight libcurl as it felt more comfortable to me. But that's just a personal preference Smile

A weather app sounds like a good project to get to know C++ and the Syllable API. You might even want to use libcurl or curl++ to download the weather data! Feel free to ask any questions here in the forum.
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2201
Location: Friesland

PostPosted: Sun Jul 03, 2011 8:43 pm    Post subject: Reply with quote

I wonder, why do you say libcurl isn't really designed for interactive use?

A Syllable BitTorrent client can be done by putting a native GUI on LibTransmission. Transmission is included in the system, but the library doesn't seem to be there yet. I suppose we would need a newer version, or maybe it isn't built separately by default.
Back to top
View user's profile Send private message Visit poster's website
sylvestre



Joined: 13 Jun 2011
Posts: 36

PostPosted: Sun Jul 03, 2011 10:35 pm    Post subject: Reply with quote

aussie thank you for your answers, that was appreciated.

Now for the record.
Those softwares are compiling just fine on Syllable
joe-3.7
zile-2.2.24
cvs-1.11.23
c-ares-1.7.4
aria2-1.10.9
tinyxml-2.6.2

Subversion is broken due to conflict between the source code of subversion and the Syllable api. I don't know how to overcome the mayhem, changing functions in either one or the other, seems intrusive.

The botan library is compiling fine when you pass the parameter "linux" in "configure" but I don't know if it's really clever to do so.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Mon Jul 04, 2011 4:30 am    Post subject: Reply with quote

[quote]why do you say libcurl isn't really designed for interactive use[/quote]
For instance, when connecting to an FTP server a user might not know beforehand if they will need to enter a password or not, until asked for it by the server. So an interactive program might want to prompt for a password only when necessary. But with libcurl you must specify the password before creating the connection. Another example, if using CURLOPT_QUOTE to send commands like 'delete' to an FTP server, it's hard to know whether the commands succeed or not. These things can be worked around but it's a little clunky. I think these things reflect the origins of libcurl as a command-line HTTP util. On the whole, it's a pretty good library though Smile
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2201
Location: Friesland

PostPosted: Mon Jul 04, 2011 6:21 am    Post subject: Reply with quote

LibCurl is very much designed as a system library, not just a command line utitlity. I understand what you mean now, but it seems to me that these issues are more the effect of cURL being an abstracted interface to many protocols, instead of a specific FTP library.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Syllable Desktop All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group