Linux equivalent of COM?
Hello everyone,
I'm new to Linux and wonder if there's an equivalent to Windows COM? I have two applications that need to talk to each other across a network. I have no idea where to begin and really hope somebody can answer my question. Thanks! |
Quote:
Will be more in "C". Roughly, very similar to files when sockets are created/connected to. |
Nework programming library in C++
Quote:
...hh |
The com ports in linux start with ttyS0 and go on from there the next one would be ttyS1.
|
Quote:
Just in case this wasn't a joke - I do believe the original poster referred to the MS Component Object Model (COM). http://www.microsoft.com/com/default.mspx |
Thanks to everyone for your help!
I finally realized I need socket programming (thanks to Sergei Steshenko). My client is looking for a magic bullet that will reduce their current costs as well as help with maintenance issues. Obviously my first thought was Linux (I'm starting with Ubuntu). I'm needing a little push to get me started as the current application was built with Visual Basic (ugh). |
netcat is good for quick-and-dirty data transfer within a network.
man netcat __________________ i am confused by how com plays into this. microsoft command object modules are atiquated self-contained dos executables replaced by windows pe (portable executable) *.exe's. linux uses elf (executable and linking format). __________________ oh wait you are talking about com port (usually refered to as a serial port) ? Quote:
__________________ this is also duplicated in the newbies forum... __________________ what does the program do ? can you explain what you are trying to accomplish ? i assume there are a few ways to impliment it in linux... i have no idea of what 'windows com' you speak of and i have no idea of what it actually does ? |
Quote:
... Anyway, I think you may also need to learn what 'fork' and 'socketpair' are, and maybe also what 'exec' is. |
I assume you mean DCOM (Distributed COM) and not COM. Linux does not have a DCOM equivalent that is part of the base OS. That's because DCOM is OS-specific and in the Linux/Unix world, interoperability is king. There are numerous options, depending on the language you wish to use and the complexity of the network communications. You can use things as complicated as SOAP or CORBA for this, to message queues (http://fedoraproject.org/wiki/Featur...Infrastructure), to xmlrpc, all the way down to netcat, rsh or direct socket connections.
You haven't told us what language you may be using. That will determine what options you have. Not every technology has a decent language binding. If you are doing professional work, consider using a technology that provides for a little more resiliency such as message queues. This can allow you to focus on the high-level stuff rather than getting bogged down in low-level socket stuff. |
Quote:
do they now wrap it in something called com ? |
Quote:
I also very much prefer 'system', especially in Perl, but if one really wants IPC (i.e. processes talk to each other) then fork (with its file handles duplication) and exec are the way to go. OTOH, if one just wants to start another process an wait for its completion, then 'system' is apparently the simplest way to do it. ... Anyway, if you use sockets, since one can use explicit port number, the processes can talk to each other not being forked in father -> child manner. |
Quote:
i still dont know what com is ? (a few post above i mistook it for dos executables or serial port). |
Quote:
... COM, AFAIK, is Common Object Model. |
Quote:
|
Until now, I have only programmed in Windows (with the exception of web development). I have always used Microsoft's Component Object Model to have separate applications communicate with eachother (DLL Hell). Linux is a whole new world to me and I'm obviously at the "bewilderment" stage. Thanks to everyone for their response to this thread. It has amazed and encouraged me.
I'm designing a basic client/server POS application. Several terminals will need to access the server simultaneously across a local network. I thought about using Windows COM, but I'm unsure of how to implement that across a network. I toyed with the idea of using SOAP, but my experience with SOAP required a web server. Not neccessary/desirable since it will be on a local network and we're trying to simplify things. It appears that sockets are the best way to go and Linux could possibly provide for a simple yet stable environment. Am I being naive to think that? My biggest question now is which flavor of Linux to use. I imagine the only way to answer this question is by experimenting. Are there any problems porting an application from one version of Linux to another? Since the team is familiar with .NET, it seems best to use Mono's C#. |
All times are GMT -5. The time now is 08:43 AM. |