Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I went across all the links on java Inter Process Communication, but I couldn't get an exact answer. I am on my way to write a java service which I want to communicate with a service running on my system. The service may be C, C++, or a service running on a hardware device. Which is the best way? Is it possible to use RMI in this case? If yes how can I implement that?
RMI is generally designed for interprocess communication between Java applications. If you need language-agnostic technology, currently the most popular are webservices (SOAP or REST based) or CORBA. But as the other service is going to work on "hardware device" they may be too heavyweight in which case you could think of your own communication protocol eg. based on TCP/IP connection.
You can go through online tutorials on CORBA with JAVA technologies. You can also refer oracle documentation for the same
Refer http://docs.oracle.com/javase/1.4.2/docs/guide/idl/jidlExample.html
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
What is the best way to transmit data between two (Java) applications running on the same machine? One obvious idea would be to use standard Sockets but this doesn't feel right.
I've heard that most operating systems have a built-in system specifically for this task. How is it called and how does it work?
And is there any other good method to do something like that?
I think it depends on what you want to communicate between the applications and the size of your project. Some examples:
Sharing of state - use a database, files or similar
Messaging - use a socket. On top of a socket you have several technologies you can leverage, like HTTP/REST, but you can also create your own transport
There are also message applications you can leverage, like RabbitMQ
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am working on a Java application and I have a requirement to connect my application to an Elasticsearch Server.
I am new to both Java and Elasticsearch, and am unsure how to proceed. I couldn't find any documentation that made sense.
Can anybody please guide me. Thanks in advance.
Elasticsearch is itself written in Java, and has a Java Native Client.
It also has a REST API that allows any language to interact with it (which is more commonly used, and how I connect to it from Java and Python). You will need to use something like the Apache HTTP Components to make the REST calls.
There is another project, Jest, that adds a more Java OO layer on top of the REST calls.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am building an application where in the requirement is that, there is a main server, which will send signal to client server, based on this signal the client performs certain action and send back the response to the main server. Here there will be only one main server and can be multiple client servers. At a given time the main server can send multiple signal to multiple clients.
I am presently planning to do this using socket programming in Java using two ports. Do let me know the best way of achieving this? and also do we have any good existing API's that can be used?
Take a look at RMI: https://docs.oracle.com/javase/tutorial/rmi/ If you want something based on sockets/TCP/UDP/etc, writing something with Netty may be good solution -> http://netty.io/ (they have useful examples).
I would also recommend to consider plain Java Sockets if planned communication beetween server and clients is not comlex and you do not need all this stuff which is provided by libraries like Netty.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Hi am java developer with decade of experience with java/j2ee development, I got a chance from my organisation to do course and certification in bluemix or softlayer , and am confused what to choose. Any suggestions guys
This is really up to what you want to do and what you are comfortable with. SoftLayer is an Infrastructure as a Service Provider. This means that you as the customer are responsible for the Operating System updates and configuration, Middleware, and applications and services that you want to use.
If you would rather focus on just the code and don't really need to tweak the underlying OS or software stack than I would say Bluemix is the way to go as it is really more focused on Developers.
Really though it comes down to what you ultimately want to do with the platforms.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have spent much time researching how to create a chat system that would work between computers on the same local network, and so far have had no success (in Java). Could anyone provide me with references to things that actually work, or guide me?
Here are some useful resources that I found on Google.
http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
http://www.youtube.com/watch?v=eANjtQ6wJv0
http://www.youtube.com/watch?v=eANjtQ6wJv0
There are many more if you just ask "how to make a LAN chat program in Java" in your favorite search engine. There are tutorials online, but it is recommended that you are pretty competent in the language as well as networking. Go back to the basics and read a bunch of books on Java.
For future reference, don't ask questions like that on Stack Exchange. Put problems that you have about code. Be specific!
You have two problems. One is discovery, the other is connections.
For discovery on the local network you want mDNS aka Bonjour.
jMDNS offers a pure java Bonjour implementation.
You need to setup a service advertisement and a service discovery.
Once you discover a service you can then connect to the daemon you have setup on each machine.