perl - Is a client-server setup a good way to move data between machines? -
I need to move some data from one machine to another. I use the socket in the pell to transfer the client server Writing app is good? If one side is written on one side in Java then will I have problems?
I mean, can I have to face when trying to come up? Short answer: It is OK to use a Perl program as a client or server.
Your only problem is the level of your personal skills and experience, but after doing so you can know how to do it. :) Most of the problems are choosing how you want to do it, not the technology involved, the Pearl problem is not going to happen, but it does not have any advantage in other languages.
Some have already mentioned, the socket of the problem is going to be divided in most languages because almost everything uses BSD stuff. Pearl has no barrier or special genet for it to transfer data from around you to listen to a socket on one side to open one connection to another and send data. Very easy. You might want to check Lincoln Stein for that bit, you can get low-level bits.
For high-level networking, working with your start up is very useful and easy. This is a framework for dealing with event-based programming and many plugins are easy to communicate among processes. You can spend a little time learning it, but get a lot from it.
If you are not inventing your protocol, then there is already a Perl module that can format and parse messages. / P>
If you just want to transfer data, there are several things you can do. The concept can be the easiest to just write lines in the socket and read them as lines from the other end in the text to use data like a bit more complex data :: dumper, YAM, or JSON than data. And sends it. For more complex things like sharing Pearl objects, you would like to use. You stabilize your objects, send them as data on the network, then melt them on the other side.
If you want to apply your clients and servers in different languages, then you will have a little more work to find out how they will talk to each other socket stuff is almost the same, but the Java server Could not understand the production of Pearl's snearl (it is possible, but you have to parse it manually and it is not good :). If you fix everything, then on the other side you should not take care of any side.
Comments
Post a Comment