Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm setting up something where I'll need to be able to setup a service that accepts input on a TCP port and then parses the XML provided and extracts the necessary data, then posts that to Google's universal analytics via HTTP GET.

What is the easiest thing to use for this? Perl? C? Are there any libraries that you know of for those languages that would make this easier?

A little bit of background: I'm trying to export data from a POS which has a "Security DVR" output option for basic transaction info (X item added to invoice, $50 cash was paid, etc). I'm outputting this info to this server that I'd need to setup, and then exporting that to Universal analytics. This will allow me to see sales volumes in google analytics.

share|improve this question

closed as primarily opinion-based by derobert, slm, jasonwryan, paraxor, Chris Down Jul 10 '13 at 3:40

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Perl or Python would be my suggestions, but it also depends on what you are comfortable with. –  tripleee Jul 9 '13 at 21:10
    
The answer is probably "whatever programming language you/people at your company are familiar with". If none, then, "whichever programming language you'd like to learn, but consider contracting with a programmer instead". –  derobert Jul 9 '13 at 21:47

1 Answer 1

What is the easiest thing to use for this? Perl? C?

Not many people are going to say that C is the easiest thing for this, although there are XML parsing libs for C. I guess it depends how comfortable you are with it.

Dynamically typed, objected oriented such as perl -- or python, or ruby, or php -- are ideally suited to this and they'll be hoards of modules available for every aspect of the task (eg, TCP sockets, and you very definitely want to use one for parsing the XML). So the question is really which of those you find easiest to use.

share|improve this answer
    
I'm most comfortable with PHP but how would I implement the server socket aspect of this? –  Brett G Jul 9 '13 at 22:03
    
Probably by writing some code. –  msw Jul 9 '13 at 23:45
    
I found this helpful: functionblog.com/?p=67=1 –  Brett G Jul 10 '13 at 3:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.