Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Tesla.

Asked: December 12, 2016 - 5:58 am UTC

Last updated: March 14, 2017 - 3:52 am UTC

Version: 12.1.0.2

Viewed 1000+ times

You Asked

I'm thinking of configuring Application Continuity for my 2 node RAC (12c) database where my application is running on Weblogic server. Before I proceed with the setup of AC, I need to clarify/confirm few things regarding AC:

1. AC does not require any changes on my application code. This is one of the reasons i'm going with AC because i'm using thin drivers where I cannot use TAF and I do not want FCF as that requires application code changes making it RAC aware. I believe all that is required is to only create a service for AC on my RAC server.
1.(a) Does enabling FCF add advantage in addition to AC?

2. The link http://www.aioug.org/OTNYathra15/CHE_Kuassi-Mensah_Planned-Unplanned%20-%20Copy.pdf in 29th page says FCF is mandatory -- I need to reconfirm on that.

Is it mandatory to use FCF with AC? If yes why?

I need to keep it simple without making any changes in the application code for FCF.

and Connor said...

Dominic Giles has written an excellent how-to with demonstrations on this.

http://www.dominicgiles.com/blog/files/8278e1395e583ab4ba63429cfcf609bb-138.html

You'll see there's a few things needed to setup - whether this impacts your application code itself depends on your existing code.

Since swingbench is free, I'd suggest using it to initially test your setup, and once its working, then look at letting your real application then take advantage of it.

Rating

  (5 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Still unclear on FCF part

Tesla, December 13, 2016 - 2:46 pm UTC

Thanks, being a huge fan of swingbench, I did go through the article but I'm still unclear whether it is mandatory to use FCF with Application continuity or not.

Can you clarify? I'm really not in a situation to change the application code for FCF.
Connor McDonald
December 15, 2016 - 2:19 am UTC

The whitepaper says its mandator, and so does Dominic's blog post

"The final step is to enable the application continuity driver and FAN you can again do this in the config file with the following settings:

<properties>
<property key="StatementCaching">50</property>
<property key="FastFailover">true</property>
<property key="FetchSize">20</property>
<property key="OnsConfiguration">nodes=rac1:6200,rac2:6200</property>
<property key="AppContinuityDriver">true</property>
</properties>"

I only included the link the Dom's post because it was a nice step-by-step.

But yes, FCF is going to be needed.

Tesla, December 15, 2016 - 2:49 am UTC

If I use a Weblogic at my app layer,

Besides service creation for AC and changing the driver for application continuity and adding FAN details in WLS should do the job or is it mandatory to change the code?

Dom's example is using swingbench where he has option to select FCF and AC. That's easy.
Connor McDonald
December 15, 2016 - 5:12 am UTC

The list of requirements for a weblogic app is documented

https://docs.oracle.com/database/121/ADFNS/adfns_app_continuity.htm#ADFNS1207

Tesla, December 16, 2016 - 3:06 am UTC

Thanks!

What can I opt for in case of Oracle 11g? I believe Application continuity works only with 12c.

Since, i'm using thin drivers, I cannot use TAF as well. What is the best option to go with?
Connor McDonald
December 17, 2016 - 2:05 am UTC

(I think) you can still opt for fast connection failover

http://docs.oracle.com/cd/E11882_01/server.112/e10803/config_fcf.htm#HABPT4969

and there's a whitepaper on HA within weblogic here

http://www.oracle.com/technetwork/middleware/weblogic/learnmore/1534212

TG vs AC

Tesla, March 12, 2017 - 3:58 am UTC

What is the difference between transaction guard and application continuity? Are they inter-dependent? How it works?

I have read the official docs, just wanted a clearer explanation from you guys.
Connor McDonald
March 13, 2017 - 2:47 am UTC

Transaction Guard (TG) handles the concept of a knowing precisely whether a transaction committed or not. Consider the case:

a) Application issues commit request
b) It gets sent over the wire

[database or network goes KABOOM!]

The application will get an error (most probably some sort of timeout), but what they dont know is - did the commit not make it at all, or did the commit make it, but they never got the message back before the crash.

TG assigns an identifier to every committed transaction, so the logical flow in the app then becomes:

<code>
loop
do the transaction
do the commit (special ID auto assigned, TG functionality)
if ok, exit loop
if error,
reestablish connection
enquire did 'ID' commit ? (TG functionality)
if yes, then exit loop
if no, then loop around
end if;
end loop;
/code>

But that of course means you need to hand code that logic. Application Continuity (AC) sits on top of TG and does of the heavy lifting for you, but of course you need to meet the requirements/restrictions that is imposes.

Some good info here:

http://www.oracle.com/technetwork/database/database-cloud/private/transaction-guard-wp-12c-1966209.pdf

http://www.oracle.com/technetwork/database/database-cloud/private/application-continuity-wp-12c-1966213.pdf


Clear on TG!

Tesla, March 13, 2017 - 11:58 am UTC

Connor, thanks! That was quite clear on the TG part.

Can you please shed some light on that 'heavy lifting' part which you mentioned? Some words on AC as well, Would be grateful to hear from you.
Connor McDonald
March 14, 2017 - 3:52 am UTC

The "heavy lifting" is most people will code their app as;

- run statement
- if statement fails, crash and report error to user

So now, we want to do something like

- run statement
- if statement fails, *automatically* failover to a new connection, find out if my commit has taken place, retry the statement if appropriate, and then complete as per normal.

You can code that yourself, as per my pseudo-code example with TG, or you can have AC (hopefully) most of that for you.

So your code STILL looks like:

- run statement
- if statement fails, crash and report error to user

but it will rarely "fail" (even if behind the scenes it really did, and AC jumped in and saved you)