To summarize: How do I post data to xml file on server AND update page with changes to xml file (maybe JSON) asynchronously?
Can anyone walk me though this or point me to someone or an example that would help?
Hi, welcome to the forums!
That sounds like a really interesting and ambitious project you have there! I'd never heard of a Netburner server before, so I did a bit of googling and it appears to be some kind of module for interfacing electronic equipment with computers?
I managed to find a websockets library written in C, which might be of interest to your dev guy. One potential issue may be that the hardware is not up to the task of handling multiple websocket connections, but not knowing anything about the device I couldn't say.
If that's a no-go, another possible solution would be to set up a server to act as a middle-man - it would have to receive messages from the Netburner module, maintain websocket connections to all the clients, and relay any commands received from the clients back to the phone system.
Indeed it does
If the websockets option doesn't pan out, here's a reasonably good explanation of how you might go about implementing long polling.
Let us know how you get on.
That's pretty much what I want to do. The question is how do I do it? If someone could just write up a functioning example of a button, that would be amazing.
If anyone can write that up for me, I could do the rest from there.
I noticed you mentioned using an XML file, and I see now that you'd mentioned it in your initial post, but how does XML fit into all of this?
The XML file would be the database to store all the data between (middle-man). Eventually I would like the users to be able to chat browser to browser. If there's a better format, please let me know. Perhaps JSON? I'd have to figure that out.
Writing to and from an XML file is probably not ideal.. files are the slowest way to read/write data. Any data wants to be passed immediately through from phone system to the client machines or vice-versa.
A lot depends on how much flexibility you have with the Netburner part of the equation. Is the software already written, and you've a fixed system to work with? Or is your C developer willing to work with you to come up with something that meets your requirements?
Sorry, I was sidetracked with other projects. I'm working with a fixed system thats already written. I suppose the C developer would have to work to come up with something else that would support Node if we can't get it to work.
This topic is now closed. New replies are no longer allowed.