How can OpenGamma in port 8080 (send/receive) from OG running on port 8081?



Just wondering if anyone knows or can guide me on how to have two instances of OG running from different IP address or two different localhost ports to communicate together?

Many Thanks


You can change the port through the .properties files.

What would you want to communicate between the two instances? For example, is it to split the full stack of components between instances, or are you thinking of hosting two complete instances?


I have 4 instances of OG running at the moment 8080, 8081, 8082, 8083

Basically want a way that any trade that goes in reflects across all active instances in the other 3 ports.

I have a basic idea that I will need to use JAX-RS to achieve this, which is what I am trying to learn more about at the moment.

Any help or tips would be greatly appreciated :slight_smile: Thanks


I know you using Jersey restful call, but again that is all new to me so reading up on Jersey now. If you have an example of sample code, would help greatly.


If you want all 4 instances to share the same environment then (assuming they are all compatible) you could separate out the Masters into another process and configure the 4 instances to connect remotely to this. That way you would only have a single place to insert your trades. Connected instances can be notified of changes via JMS if necessary.

The standalone Masters server is simple to configure as we provide the ini file you would need as part of the OG-Component project in og-component/config/sharedmasters/sharedmasters.ini. You should be able to reference this on the classpath from a .properties file which contains the database details.

Then, in your fullstack.ini file, you would remove the component factories for each of the Masters and add a single section referencing RemoteMastersComponentFactory. This only requires a URI which will be of the form http://sharedmasters-host/jax

Let us know if you need further details.



Thanks Jonathan

I have 4 OG instances running on Linux and one on windows using Jersey REST to read from each other. But, what I am really struggling with is the whole Spring, Jersey, Jetty and other technologies used, its all a very steep stressful learning curve for me.

If you have any training/introduction into OpenGamma specifically for people whom know programming in Java, C++, but with little or no knowledge in other technologies used then please let me know as I would be very interested.