querysoa
querysoa

Reputation: 1

Should i use Coherence standalone server ? for a java webservice to use cache data ?

I am new to oracle coherence

Basically we have some data and we wanted some java/bpel webservice to get those data from coherence cache instead of database. [we are planning to load all those data to cache server]

So we have below questions before we start this solution.

Webservice we are planning to start is going to be just java would be fine. And all operations are reading only.

Question 1. IS it Coherence needs to be stand alone server ? (down load from oracle and install it separately and run the default cacheserver) ?

2.If so we are planning to do the pre loading of data from database to cache server by using code ? i hope thas possible ? Any pointers would be helpful ?

3.How does the webservice connect with Coherence server if webservice running in different nmachine vs coherence server running ? (OR) Is it mandatory that webservice and coherence should run in the same machine ?

  1. If webservice can run in different machine how does the webservice code connects to coherence server (any code sample , url would be helpful) ?

  2. Also what is that coherence comes with weblogic ? Is it not fit for our applications design i assume ?!!!! then what type of solution we go for weblogic with coherence ?

FYI : Our goal is simple we want to store the data in cache server and have our new webservice to retrieve the data from Cache servere instead of database(because v are planning to avoid database trip )

Upvotes: 0

Views: 1599

Answers (2)

Swe3tGsus
Swe3tGsus

Reputation: 1

Essentially, there are 2 types of Coherence installation.

1) Stand-alone installation (without a WebLogic Server in the mix) 2) Managed installation (with Weblogic Server in the mix)

Here are a few characteristics for each of the above

Stand-alone installation (without a WebLogic Server in the mix)

  • Download the Coherence installation package and install (without any dependency on existing WebLogic or FMW installations)
  • Setup and Configure the Coherence Servers from the command-line
  • Administer and Maintain the Coherence Servers from the command-line

Managed installation (with Weblogic Server in the mix)

  • Utilize the existing installation of Coherence that was installed when WebLogic or FMW was installed
  • Setup and Configure the Managed Conherence Servers to work with WebLogic server
  • Administer and Maintain the Managed Coherence Servers via the WebLogic console

Note the key difference in terminology, Coherence Servers (no WL dependency) vs. Managed Coherence Servers (with WL dependency)

Upvotes: 0

Samuelens
Samuelens

Reputation: 156

Well, you questions are very open and probably have more than 1 correct answer. I'll try to answer all of them. First, please take into consideration, that Coherence is not a free tool and you have to pay for a license. Now, to the answers:

  1. Basically, coherence has 2 parts: proxy and server. The first is the responsible to routing your requests and the second for hosting the data. You can run both together in the same service but this has pros&cons. One Con is that your services will be very loaded and the memory will be shared between two kind of processes. A pro is that is very simple to run.
  2. You can preload all the data from the DB. For that you have to open the Coherence and write your own code. For that, you need to define you own cachestore (look for that keyword in coherence docs) and override the loadAll method.
  3. As far I remember Coherence comes together with Weblogic. That says the license for the one is the license for the second and they come in the same product. I'm not familiar with weblogic, but I suppose is a service of the package. In any case, for connecting to coherence you can refer to Configuring and Managing Coherence Clusters
  4. The coherence services can run in different machines, in different network and even in different places of the world if you want. Each, proxy or server, consumer and DB, could be in a different network. Everything can be configured. You have to say you weblogic server where the coherence proxy will be, you'll set in the coherence proxy/server the addresses of them and you'll configure your coherence server for finding out his database by configuration. Is a bit complicated to explain everything here.
  5. I think I answered before. Just take into consideration coherence is a very powerful tool but very complicated to operate and to troubleshoot. Consider the pros/cons of accessing directly your DB and think about if you really need it. If you have specific questions, please don't hesitate. Is a bit complicated to explain everything here since you're trying to set up one of the complicated system I ever seen. But is excellent and I really recommend it.

EDIT:

Basically Coherence is composed by 2 main parts: proxy and server. The names are a bit confusing since both are servers, but the proxy serves to the clients trying to perform cache operations (CRUD) while the "servers" serve to the proxies. Proxy is the responsible for receiving all the requests, processing them and routing them, according to their keys, to the respective server who holds the data or who would be the responsible for holding it if the operation requires a loading act. So the answer to your questions is: YES, you need at least one proxy active in your cluster, otherwise you'll be unable to operate correctly. It can run on one of your machines on into a third one. Is recommended to hold more than 1 proxy for HA purposes and proxies can act as servers as well (by setting the localstorage flag to true). I know, is a bit complicated and I recommend to follow oracle docs.

Upvotes: 1

Related Questions