I am sorry I wasn't very forthcoming in the beginning - to clarify - by rpc I meant using go net/rpc package. Where I can simply Register methods/services that can be called remotely as if they were functions/methods locally available. This lends to a cleaner syntax and more robust code in general from which I have built very clean distributed systems in past.
I do not use net/rpc currently - instead I have a worker running a tcp server which understands handshakes (control flow) and I currently move files using io copy. All this because I only have access to a single TCP port on machine where the worker agent is hosted. The worker is a tcp server that does io.Copy to give file to calling master. This flow is a bit crummy in my opinion, there's many chances of errors being missed perhaps, I have to do timeout handling, acking etc which net/rpc automatically takes care off plus go rpc package provides many primitives which I have used in past to just do all of this kind of control flow Master calling workers to do a work a but if work a fails or errors out, the system has a cleaner way of tracking and telling me (via error and replies) - I wanted to use that kind of robust ness. I suspect this kind of thing cannot be done with via go net/rpc package... but wanted to ask upfront.... also if I were to use scp, sftp etc can I leverage this to be done with single port (different port than usual scp sftp ports) - this port restriction is due to security and many other reasons .... On Sun, Nov 4, 2018 at 1:09 AM Amnon Baron Cohen <amno...@gmail.com> wrote: > And don't forget the bit-torrent class of solutions. > > On Friday, 2 November 2018 16:56:17 UTC, Tom Mitchell wrote: >> >> Moving files is a solved, non trivial problem .... >> Have you looked at tools like scp (ssh), rsync, kermit, ftp, sftp, tftp >> and network filesystems (nfs and samba)? >> Even git and http. Error recover, host name lookup, compression, >> restart, safe abort, transport encryption, authentication, buffering. >> >> https://en.wikipedia.org/wiki/Sorcerer%27s_Apprentice_Syndrome >> >> https://stackoverflow.com/questions/68335/how-to-copy-a-file-to-a-remote-server-in-python-using-scp-or-ssh >> >> >> >> >> >> On Thu, Nov 1, 2018 at 11:24 PM Tamás Gulácsi <tgula...@gmail.com> wrote: >> >>> 2018. november 2., péntek 6:21:47 UTC+1 időpontban Anirudh Vyas a >>> következőt írta: >>>> >>>> Hello there - >>>> >>>> I am looking for example/help for using rpc to do file downloads - I am >>>> not sure if this is possible, or recommended or if there is a >>>> better/cleaner way. I like the robust nature of RPCs and have written a few >>>> good, performant distributed systems in them - was hoping/wondering if I >>>> could use RPC to do downloads - I currently use combination of io.Copy and >>>> a TCP server to do this. >>>> >>> >>> What kind of RPC ? RPC is just "Remote Procedure Call". >>> If s `send(data []byte)` won't be enough (size restrictions), you can >>> copy the io interfaces: >>> CreateFile(name, perms...) (fileHandle) >>> WriteFile(fileHandle, chunk) >>> CloseFile(fileHandle) >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golang-nuts...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> -- >> T o m M i t c h e l l >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- *Vyas, Anirudh* *Computer Science and Math Autodidact* *E-Mail: ricky...@gmail.com <ricky...@gmail.com>* *Mobile: (US): 650-727-2636* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.