Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java and C  RSS feed

 
arnie frenato
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, is it possible to use java to create the client and c as the server?
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are asking how to communicate between different java and C processes then CORBA will help you out.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, absolutely. If you follow the standard practice of sending and reading binary data from C in "network byte order", then you can even exchange binary data.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nitesh Kant:
If you are asking how to communicate between different java and C processes then CORBA will help you out.


Aaaaaak, no, please! CORBA is enormously complex, adds enormous overhead, vendor dependence, infrastructure maintenance, and isn't in the least transparent. If you need CORBA, that's one thing, but please don't go suggesting it as a first solution; that's like recommending a cannon to kill a mosquito.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:


Aaaaaak, no, please! CORBA is enormously complex, adds enormous overhead, vendor dependence, infrastructure maintenance, and isn't in the least transparent. If you need CORBA, that's one thing, but please don't go suggesting it as a first solution; that's like recommending a cannon to kill a mosquito.


I thought inter process communication will be better off using CORBA. Otherwise one has to read binary data and do all the serialization/deserialization in every server/client one writes.
Obviously, if one is interested in reading binary data then it does not really matter what langauage one uses to send the data(if the protocol is honoured).
That is the reason why I said: how to communicate between different java and C processes
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I second what Ernest said: Avoid CORBA. Like the plague. Its days have passed, and no new projects should use it. If high-level constructs are required, then web services should be considered, but otherwise it's much easier to write wrappers around socket connections than to start with CORBA.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!