Reputation: 648
Here is an interesting combination, I need to transfer data between an "appliance" running Windows XP Home and a remote Linux server on the internet. Let me itemize what needs to happen:
Seems simple enough eh? I was thinking about using web services on the Linux side and thought It would be nice to do the same on the XP Home system. But some of my research says that won't work on XP Home for answering incoming web service calls. Maybe that's wrong? So what about RESTful services will that do the trick?
BTW: Since this is a new application I can do the development on both ends. C# on the Windows side and Java on the Linux side.
Ideas are appreciated!
Upvotes: 2
Views: 239
Reputation: 29240
Install Cygwin on the Windows server, install an SSH server and make sure rsync is installed. On the linux side call rsync via a cron job. No programming / design required.
Upvotes: 1
Reputation: 41858
Another solution would be to just have the XP side connect to a java servlet and pass the data as JSON. It is probably the simplest approach, as it requires you to just secure the java side and JSON is very easy to parse, and in my tests it ended up being faster for my needs than using a webservice.
If you need to have the java side request, then just listen on a port just to be informed that data needs to be sent, and then send the data to the servlet. It would be a simple server on the XP side as it doesn't transfer any data, just gets a tiny message ('send').
Upvotes: 0
Reputation: 12782
If you don't truly need real-time.
A low tech solution may be to get the Windows appliance to poll the Linux box at regular intervals. It could send data and ask the Linux box if there is anything it needs.
This would obviate the need for incoming ports to be open on the windows side (which may not be desirable or possible).
Upvotes: 1
Reputation: 24262
Another solution would be using something message based, like JMS or XMPP. Since it is over the internet, XMPP might be a better fit.
XMPP chat messages can be used for handshaking and it has filesharing extensions to do the binary transfers.
Also, you can use the language of you choice to implement either end, as there are libraries available in all popular languages.
Edit: Supposedly, Tivo now uses it to send send updates to the Tivo boxes from their servers.
Upvotes: 0
Reputation: 8305
Since the application is new and if you need a strong real time data share I could recommend you to use shared database. You can install on one of these hosts.
Any way web services solution is too complex. Use the same technology on both machines and you will be able to use the language-specific features of the language you choose.
Upvotes: 2
Reputation: 664
XP Home doesn't include IIS, but you can install a different web server and use it on the Windows side. Another option would be to do some simple sockets programming on both ends to facilitate the requests from the Linux box to the XP box. That approach doesn't scale well, but if you're looking to put something together quickly, it would work.
Upvotes: 1
Reputation: 112366
Okay, so the protocol over all is
How much data, and what type?
It would seem, first thought, that you just run a web server on the Windows box and respond with data. I haven't built one, but there are lots of web servers that support Windows.
Upvotes: 0
Reputation: 7365
why not use Java on the Windows side as well? Tomcat should run on any XP.... this will take care of your other question as well.
Upvotes: 1