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 5 years ago.
Improve this question
I have a question about messaging systems.
There are two Java applications - A and B. A works constantly and checks the resource. In some cases it need to notifiy B to start. It seems that there is no need to enlarge this messaging later: there will be always two components.
What is the most elegant way to implement it? JMS? Spring Integration somehow?
Another options?
Do I understand correctly that in any case B needs to busily wait?
IMO it is better to use Apache active mq . It is open source and supports JMS 1.1 and J2EE 1.4.
As you are using two applications.You can add the message from A to Active MQ Queue and B would be continuously checking the message queue. So once B receives a message you could perform the operations that you would require.
Related
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
My use case is there will be four microservices A,B,C and D. My input request to Microservice D will be generated based on the outputs from A,B and C.Since A,B,C are independent, Instead of synchronously calling A,B and C thereby blocking the thread and building the request for microservice 'D' after three calls, have planned to call it asynchronously.
Is Akka a good fit for this use case? or it is overkill.
I read that akka is a concurreny tool kit, since my application does not have concurrency concerns, still can i use akka just for asynchrous processing? or is it overkill?
Yes, it is definitely an overkill. If you don't want to block a thread when calling another service all you need is a non-blocking http client. Or even a blocking http client that works on a separate thread pool. Just use anything that returns you Future[ResponseFromService]. akka-http client is one of options. But not raw akka.
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 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 7 years ago.
Improve this question
I need a solution for a specific feature of my application ,feature is same as recent achievements category of stack overflow.When a specific event happen in server (may be some level achievement or some kind of condition satisfy)then i want to notify to user through the GUI of my application ,What is the best approach to do this specif use case .thanks in adnvance
You'll either want to use WebSockets or clientside polling.
There's a few java libraries out there to help abstract you from the underlying mechanics which can fallback to polling if websockets are not supported by the browser:
cometd
atmosphere
DWR's reverse-ajax
spring mvc
Im sure there's more but that'll get you started :)
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 8 years ago.
Improve this question
Assuming that, there are many ( more than 10 ) spring application in same Tomcat container and this apps need to communicate to each order within Tomcat. The payloads of messages are JSon objects or something similar in all case. My question is : What are the preferable solutions for this and why ? For example: Http REST, or JMS .. or what ?
We have a similar architecture. Our choose is jms. It's transactional and easy to use with a si. Rest is usual for frontend. Jms and WS for backend. But if you doesn't plan to growing. And all apps would in one appserver. You could use ejb.
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 8 years ago.
Improve this question
I was reading about JMS here and I thought "I've written a simpler consumer/producer before...". Am I being naïve about the power of JMS? I think something simpler is a better implementation of working through a Web Service to grab an XML document and pop it in a Queue. Is the approach I am taking incorrect?
If you dont need highly scalable and configurable distributed components with guaranteed delivery over multiple server crashes and automatic enrollment/commit/rollback in various transactions along with dead letter queue management, then yes a simple Queue with custom MessageProducer and MessageConsumer is probably a correct approach.
The golden rule: if the complexity of implementing a simple solution using stack X nullifies the benefits of using stack X, don't use it.