tags:

views:

77

answers:

2

Hi, i would like to know, what is the best way to send files between python and C# and vice versa.

I have my own protocol which work on socket level, and i can send string and numbers in both ways. Loops works too. With this i can send pretty much anything, like package of users id, if it is simple data. But soon i will start sending whole files, maybe xml or executables.

Simple server with files is no an option because i want sending files from client too.

I was thinking about serialization but i don't know it is the best solution, but if it is i will love some tips from stackoverflow community.

EDIT: I added django to question and chose http.

A: 

RPC may be a good idea for you, because it's relatively very high level. Instead of defining your own server and protocols, you can simply remotely execute routines over the network, pass in arguments and get back results.

For example, both languages have libraries for XML-RPC.

Eli Bendersky
I don't think i need to change entire architecture only for sending files. ;-) I have programs logic based on sockets, so i think this is bad solution, but thanks for post anyway!
SuitUp
@SuitUp: RPCs work on top of sockets as well. I'm not sure I understand what you're asking here, exactly, if you're happy with your current architecture and don't want to change.
Eli Bendersky
Is there any sense to use new technology like RPC in complete system to only send files? I really don't want RPC in my system yet.
SuitUp
XML RPC Serializes data. It's not a replacement for sockets, it uses them so it doesn't have worry about the underlying network maintenance. I concerns its self with messaging exchange between two remote applications, services, etc. It's not new though, it's been around for awhile.Why not just use ftp? Is there more of a specific purpose needed? If you outline what you're trying to do, we might be able to help out.
jlafay
@SuitUp: as I said in the previous comment, I don't understand your question. As you see by the amount of answers, I'm not the only one. If you still want it answered, I suggest you revise it.
Eli Bendersky
A: 

The easier way on my use case was send files using HTTP because with python i have additionaly running django.

SuitUp