• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Communication between two applications

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi group ranchers,

I have two spring based applications; lets called App-A and App-B. App-A is primary application. App-B is serving as a client of App-A.

For communication between these two applications, i am using simple HTTP Request-Response cycle between these two applications.

Now i have a requirement two add another instance of App-B. when i deploy App-B; App-A will have two nodes to connect with services.

I am planning to use commons-pool for managing connection between these two nodes and App-A.

How should i proceed to design this integration
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're going to need to describe your application more...

When I hear "simple HTTP Request-Response" to communicate between client and server I assume it's something like REST. I'd assume that App-A is hosted on a server and just receives calls from the clients - why would you need your own pool to manage the clients? Are you not hosting your app in an app server - is it a standalone program that handles all the HTTP and ports by itself? Does anything need to be saved between calls on the server?
 
vijay shanker
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nathan Pruett wrote:You're going to need to describe your application more...



Description:--
App-A is main application which is responsible to serve all the incoming requests. there are multiple fronts from where the request may come to App-A.

there are multiple instances of App-B. This App-B is just forwarding its requests to App-A for the further processing as soon as it receive a request. App-b will send response back to user.
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can add Web Services in App A. You may be interested in JAX-RS.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vijay shanker wrote:

Nathan Pruett wrote:You're going to need to describe your application more...



Description:--
App-A is main application which is responsible to serve all the incoming requests. there are multiple fronts from where the request may come to App-A.

there are multiple instances of App-B. This App-B is just forwarding its requests to App-A for the further processing as soon as it receive a request. App-b will send response back to user.



I got that from your first post - I mean is App-A running in an application server, or standalone? Are you using anything specific to communicate between App-A and App-B(s) - you've said HTTP, but are you using REST or various Web Service protocols? Is there any state saved between calls?
 
vijay shanker
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My project to implement connection pooling between two server. and i am using connection pool as a mechanism to manage connections.

To communicate between these two servers i am using HttpClient library. Sending contents form A to B or C in the customized headers.

Now the problem part:
lets say i have two servers. main server is A. there are two other service providing services to this A. lets call then B and C.

My requirement:

I have 5 open connections from A to B. If all 5 connections are active and being used. then a should try to connect to server C. server C has also 5 open connection.

How should i design this connection manager.

My plan:
I should manage two different pools for both the servers. If server B got exhausted try to get a connection object from another pool.

Please let me know your expert opinions.
reply
    Bookmark Topic Watch Topic
  • New Topic