Adding Replication to an existing App

We're looking to add replication to our Bdb JE enabled application. We use the Direct Persistence Layer. So far, I've swapped out our use of the Environment object with that of a ReplicatedEnvironment object and wrapped our transactions with code similar to je.rep.quote.RunTransaction example. So basically, the application assumes that the local environment is master and replicates out to the group.
This works, however, when I bring the app down, the other nodes elect a new master and when I bring the app back up and try to write, the write fails because the local environment is now a Replica. This is disconcerting to me as I don't see a manual way of forcing the local environment to be the master when it comes up (after having sync'ed with the other nodes).
An alternative would be to move all persistence out of my application into remote nodes. I'm looking at the example code under je/rep. The example shows an HARouter class that can forward write requests to the master. However it looks rather low level, with the client application needing to marshall the requests to the server and the DPL code presumably would reside on the server nodes. My client code would need to change significantly to be able to write to an out of process node and I would have to keep the server DPL in sync with the client (my data's lifetime is one day, so schema changes are irrelevant).
Am I correct in this assessment, or are there APIs to more seamlessly forward writes while still offering the client the DPL API? If this is the case, are there APIs to control which node is master?
Thanks,
Adam
Edited by: 833022 on Feb 1, 2011 11:13 AM

Adam,
You're right that BDB JE does not currently provide APIs to forward writes seamlessly. There's two ways to think about this.
If high availability is a priority, then you'd like your application to be able to flexibly handle the fact that mastership may have moved to any node in your group. If it can do that, you''ll be able to support writes with the least amount of disruption and delay in the event of a failover in the system. Alternatively, an application may find it preferable to have the writes serviced from a specific node. Replication is serving more like a backup, and the application is willing to incur some overhead to have mastership moved to a specific node.
In the HA-is-a-priority case, there are two options for directing write operations. You've looked at one of them, the HA aware router based on com.sleepycat.je.rep.Monitor, which directs write requests to the master. That's the HARouter example. A second option is to set up an HA unaware router, which uses the com.sleepycat.je.rep.StateChangeListener, to track the node that is the master, and redirect operations to that node. That's the SimpleRouter example.
With both options, your application would still have to do the work of forwarding. When using StateChangeListener, the code in the server nodes does it directly. The StockQuotesRMIForwarding example illustrates how to uses RMI to add forwarding to your application.
If you'd like to take the approach where you mandate who is the master, you gain some application ease, but do reduce how available your application is, in the case where the targeted master node goes down. In BDBJE 4.2, which is not yet available, we have both an API and command line utility that transfers mastership to the specified node. I've appended the description. Unfortunately, while I think it would serve your needs, it's not yet in a released version. In BDBJE 4.1, your main option would be to use ReplicationMutableConfig.NODE_PRIORITY to skew the mastership toward the desired node. If you do that, and specify the initialElectionPolicy parameter in the ReplicatedEnvironment constructor to require that all nodes in the group participate in the first election, you could ensure that your desired node is always the master. But be careful -- if that node were down, your application would stall, unable to elect a new master!
Hope this helps,
Linda
In JE 4.2, available in the future:
ReplicationGroupAdmin.transferMastership
public void transferMastership(String nodeName, int retries, int retryInterval, TimeUnit timeUnit)
throws EnvironmentFailureException,
InterruptedException,
MasterStateException,
MasterTransferFailureException,
MemberNotFoundException,
UnknownMasterException
Transfer mastership of the replication group from the currentl master to a specified replica.
This command is forwarded to the original, current master. The original master will request that the specified replica perform a syncup so its data is up to date with the original master. The period allowed for this syncup is specified by je.rep.catchupMasterTimeout, defined in ReplicationMutableConfig.CATCHUP_MASTER_TIMEOUT. When the replica is sufficiently caught up, the original master will send out messages to notify all nodes that the specified replica will be the new master.
The original master shuts down after the mastership transfer is successfully done. A MasterReplicaTransitionExcepiton will be thrown when users try to do further operations on the original master. At that point, the original master will have to be closed and reopened to resume life as a replica.
In the event of a network partition, it's possible that the original master is isolated from other nodes, and its transfer notification message is not seen by those nodes. In that case, the new master may not be the node specified in this API. To detect such unexpected transactions, this method will check to see if the specified replica is elected as a master
Edited by: Linda Lee on Feb 1, 2011 3:42 PM
Edited by: Linda Lee on Feb 1, 2011 3:53 PM

Similar Messages

  • Adding replication to an existing database.

    I am looking at adding replication to an existing database. This database has lots of existing containers many of them are 1G in size. How will this be handled when the master and client initially start? Will the master just start sending to the client? Is there another option?

    Yes. This, and the alternatives, are described in the Ref Guide, on the page entitled "Initializing a new site".
    Alan Bram
    Oracle

  • Adding methods to an existing app

    Hello all,
    my question is regarding an existing application, deployed on an app server.
    If I were to add methods to this app, would clients who are using this app need to recompile their code even if they are not using the new methods?
    Thanks
    qin__23

    Hello all,
    my question is regarding an existing application, deployed on an app server.
    If I were to add methods to this app, would clients who are using this app need to recompile their code even if they are not using the new methods?
    Thanks
    qin__23

  • Adding an iAd Banner above a Tab Bar in existing app

    I am trying to add the iAd Banner above the Tab Bar in an existing app.
    The tab bar has 4 Buttons/Views (HomeView.xib, FirstView.xib, SecondView.xib, ThirdView.xib).
    In Interface Builder, I have tried to drag the iAd banner into the MainWindow.xib above the Tab Bar with no luck.
    I'd appreciate an explanation on what I am missing.
    Thanks for your time.
    Steve

    I had trouble getting an iAd to work when using IB as well. I ended up adding it programmatically like this:
    self.adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0,412,320,50)];
    adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
    adView.delegate = self;
    [self.view addSubview:adView];
    in the - (void)viewDidLoad of my view controller.
    Hope that helps.
    -Phil

  • HT1386 I have a new computer and need to sync my iPod touch.  I get a message that says "All existing apps and data will be replaced."  Does this mean progress in the games will be lost?

    I have a new computer and need to sync my iPod touch.  I get a message telling me that all existing apps and their data will be replaced with apps from this iTunes library.  Does that mean I lose all game progress?

    XansMamaw wrote:
    ...  Does that mean I lose all game progress?
    Yes.
    What you need to do is Transfer the iTunes Library from your Old computer to your New computer...
    Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
    Backup iTunes to an External Drive
    http://support.apple.com/kb/HT1751
    An Added Bonus is that you will have a Backup of iTunes.

  • Adding Index server to existing farm, "Server Farm Product and Patch Status" returned 34 Missing Locally required products and patches

    Once I connected my new server to my farm's config db, it returned all of the following missing locally. I stripped out any redundancies and Headings, and I'm left with 43. I'm looking for a efficient strategy. Should I start with the lowest version number
    and work my way up? Current DB version is 14.0.7015.1000. IIRC, SP2 is cumulative, so can I ignore the first two (SP1 and Hotfix), install SP2, and then the Language packs and etc on top?
    Sorted by version:
    Microsoft SharePoint 2010 Service Pack 1 (SP1) (14.0.6029.1000)
    Hotfix for Microsoft SharePoint Server 2010 (KB2775353) 64-Bit Edition (14.0.6105.5000)
    Service Pack 2 for Microsoft SharePoint 2010 (KB2687453) 64-Bit Edition (14.0.7015.1000)
    Service Pack 2 for Microsoft 2010 Server Language Pack (KB2687462) 64-Bit Edition (14.0.7015.1000)
    Microsoft Office Server Proof (English) 2010 (14.0.7015.1000)
    Microsoft Office Server Proof (French) 2010 (14.0.7015.1000)
    Microsoft Office Server Proof (Russian) 2010 (14.0.7015.1000)
    Microsoft Office Server Proof (Spanish) 2010 (14.0.7015.1000)
    Microsoft SharePoint Portal (14.0.7015.1000)
    Microsoft User Profiles (14.0.7015.1000)
    Microsoft SharePoint Portal English Language Pack (14.0.7015.1000)
    Microsoft Shared Components (14.0.7015.1000)
    Microsoft Shared Coms English Language Pack (14.0.7015.1000)
    Microsoft Slide Library (14.0.7015.1000)
    Microsoft InfoPath Forms Services (14.0.7015.1000)
    Microsoft InfoPath Form Services English Language Pack (14.0.7015.1000)
    Microsoft Word Server (14.0.7015.1000)
    Microsoft Word Server English Language Pack (14.0.7015.1000)
    PerformancePoint Services for SharePoint (14.0.7015.1000)
    PerformancePoint Services in SharePoint 1033 Language Pack (14.0.7015.1000)
    Microsoft Visio Services English Language Pack (14.0.7015.1000)
    Microsoft Visio Services Web Front End Components (14.0.7015.1000)
    Microsoft Excel Services Components (14.0.7015.1000)
    Microsoft Document Lifecycle Components (14.0.7015.1000)
    Microsoft Excel Services English Language Pack (14.0.7015.1000)
    Microsoft Search Server 2010 Core (14.0.7015.1000)
    Microsoft Search Server 2010 English Language Pack (14.0.7015.1000)
    Microsoft Document Lifecycle Components English Language Pack (14.0.7015.1000)
    Microsoft Slide Library English Language Pack (14.0.7015.1000)
    Microsoft SharePoint Server 2010 (14.0.7015.1000)
    Microsoft Access Services Server (14.0.7015.1000)
    Microsoft Access Services English Language Pack (14.0.7015.1000)
    Microsoft Web Analytics Web Front End Components (14.0.7015.1000)
    Microsoft Web Analytics English Language Pack (14.0.7015.1000)
    Microsoft Excel Mobile Viewer Components (14.0.7015.1000)
    Recommendations?
    Thanks,
    Scott

    Thanks guys. I was able to get through all of the patches except for
    Language Pack for SharePoint, Project Server and Office Web Apps 2010 - English   missing locally
    Language Pack for SharePoint, Project Server and Office Web Apps 2010 -
    Spanish/Español missing locally
    This was my process:
    Config Wizard:
    Adding Index server to existing farm, "Server Farm Product and Patch Status" returned 34 Missing Locally required products and patches.
    SKIP installing the following two, as SP2 is cumulative
    Microsoft SharePoint 2010 Service Pack 1 (SP1) (14.0.6029.1000) (officeserver2010sp1-kb2460045-x64-fullfile-en-us.exe)
    Hotfix for Microsoft SharePoint Server 2010 (KB2775353) 64-Bit Edition (14.0.6105.5000)
    install SP2 oserversp2010-kb2687453-fullfile-x64-en-us.exe
    install oslpksp2010-kb2687462-fullfile-x64-en-us.exe
    Got "There are no products affected by this package installed on this system."
    SO!
    Uninstalled Sharepoint 2010 Server
    WIll try to install again, without skipping #2, and reorder installation of oslpksp2010-kb2687462-fullfile-x64-en-us.exe
    Retry (the long way):
    Run SharePointServer.exe, get Missing Locally...
    Install oslpksp2010-kb2687462-fullfile-x64-en-us.exe SUCCESSFUL
    Install officeserver2010sp1-kb2460045-x64-fullfile-en-us.exe SUCCESSFUL
    Reboot
    Install oserversp2010-kb2687453-fullfile-x64-en-us.exe SUCCESSFUL
    Rerun Config
    STILL MISSING
    Download oslpksp2010-kb2687462-fullfile-x64-es-es.exe, run, "there are no products affected..."
    Uninstall.
    Re-retried, only got through the first couple:
    Run SharePointServer.exe, get Missing Locally...
    Install SP1 officeserver2010sp1-kb2460045-x64-fullfile-en-us.exe, SUCCESSFUL
    Install English Lang Pack oslpksp2010-kb2687462-fullfile-x64-en-us.exe, "There are no products affected by this package installed on this system."
    Install Spanish Lang Pack oslpksp2010-kb2687462-fullfile-x64-es-es.exe,
    Install SP2 oserversp2010-kb2687453-fullfile-x64-en-us.exe, run Config Wizard
    I'm now downloading 462150_intl_x64_zip.exe, going to try and install it as step three.
    Any suggestions greatly appreciated.
    Thanks,
    Scott

  • Adding portal to an existing domain

    Hi I have a JSP/Servlet web applicatin and
    I want to make it a portal application.
    I was following Weblogic Portal Development
    Guide 7.0. I found the section
    "Adding portal to an existing domain" is very incomplete
    or confusing and I cannot do it. Is there any better document
    for this?

    Judging from the dates between these two entrries and no answers, I'd
    guess that there isn't anyone from BEA monitoring this group? I am in a
    similar situation. What I want to understand is how one can "portalize" an
    existing web app. I understand there are implications to some of the
    presentation, but specifically, I want to deploy a Servlet based app that
    uses EJBs and deploy this as an EAR in the same domain as the portal
    (perhaps under the /applications directory). I can make everything work
    except the webflow where I reference the Servlet.
    Specifically, I have a presentation page that is defined to be my servlet.
    When I try to build a webflow URL referencing this event, I get errors from
    the portal because it presumes it may be located somewhere else or in a
    different namespace. It leads me to believe that I can't reference a
    servlet unless it is under the /framework or /portal directories under the
    portal web-app directory. I'm convinced there must be a way to reference
    other web components that aren't specifically part of the portal web app,
    but can't figure out how to propagate the webflow element to the actual
    servlet I want.
    Any ideas from the community at large? This must be something other
    people have wrestled with since I can't imagine that only new apps will be
    put into portals.
    Thanks,
    Mark
    "Sara" <[email protected]> wrote in message
    news:[email protected]...
    >
    I'm facing similar problems too. I have an ear file in an existing domainthat
    I want to use to create a portal. The documentation on this is quiteconfusing
    and the steps require so many manual steps that it is bound to beerror-prone.
    What's BEA's recommended way to expose an existing Weblogic application asa portal
    Thanks in advance
    -Sara
    "David Zhang" <[email protected]> wrote:
    Hi I have a JSP/Servlet web applicatin and
    I want to make it a portal application.
    I was following Weblogic Portal Development
    Guide 7.0. I found the section
    "Adding portal to an existing domain" is very incomplete
    or confusing and I cannot do it. Is there any better document
    for this?

  • OAF 5.10 - how to extend existing Apps 11i page ?

    I am having problems with getting substitutions to work for use when extending existing Apps page, so any hints would be appreciated.
    I have setup "-Djbo.project=mzCustom" in the projects "Java Options" (mzCustom is the project name) and also made sure that the jpx file is included in the CLASSPATH
    My mzCustom.jpx file shows
    <Substitutes>
    <Substitute OldName ="oracle.apps.fnd.wf.worklist.server.WorklistVO" NewName ="oracle.apps.mz.sanity.server.mzWorklistVO" />
    </Substitutes>
    MZ is a custom application, which is registered Apps FND_APPLICATION table (used adsplice to set this up)
    In my JDev environment whether I use "WorklistVO" as per the developers guide, or "mzWorklistVO" I always get the same error when I try to create the new item in personalizations for the page
    "oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition Test1 of type Attribute not found"
    I also get this error when run via the Deployed environment, despite loading the JPX file into the MDS.
    If I try to create a new item in the page itself via JDev, I cannot see "mzWorklistVO" in the list of View Instances, and if I select "WorklistVO" then the list of attributes does not include the attributes added into "mzWorklistVO" but am not sure if this is "normal" or not ?
    I am convinced I am missing something obvious, but just cannot see what I am doing wrong..... can anyone offer any insight as to what I need to do to get this to work ?
    The example in the Tutorial works OK for me, but am finding it difficult to translate this example to what I am trying to do and have followed the guidelines in the Developers Guide to no avail.
    Thanks for any help

    This might not have anything to do with substitutions; that error comes any time you have an incorrect reference to a view object attribute in your page. Those references could be in the item properties of View Attribute, Destination URI, or anywhere you are typing in a view attribute name as a parameter for passing values.
    Where is the Test1 view attribute coming from? Is that what you added for your extended view object?
    Are you actually referencing the view attribute name correctly (and from where?)? It is case sensitive.

  • When i login to update my existing apps, the login window shows the wrong apple id. and it's all prayed out, i can't change it. how do i solve this problem?

    When I login to update my existing apps, the login window shows the wrong apple id. i cannot change it because it is all grayed out. how do i solve this problem?

    Content and Apple IDs -
    Content is forever tied to the Apple ID that bought it. Apple does not transfer content from one Apple ID to another. Apple does not merge Apple IDs. You will never be able to access your content bought with one Apple ID with a new Apple ID.

  • Every time I try to update my existing apps I'm not successful and I get a message saying it can't connect. I've try changing my password and still no success.

    I'm getting a can not connect message every time I try to update my existing apps that need to be updated. I even put in a new password thinking that was the problem. Can someone please help me. This has been going on for two weeks.

    Hello Priscilla43,
    The following article provides tips and suggestions that can help restore your connection to the iTunes Store.
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    Cheers,
    Allen

  • Issue in adding Space to the existing Virtual Machine from added repository

    Hi,
    I'm facing issue in adding Space to the existing Virtual Machine (Guest OS) from added repository.
    Environment details :
    VM Server : /OVS => 130GB
    /OVS/935970F2CC2D4B4391701397517F1001/ => 512 GB
    Things I have done :
    •     I created a VM (Guest OS) in the VM Server with 120 GB
    •     After creating the VM (Guest OS) , When I tried adding a VIRTUAL DISK of size 150 GB , I got an error “Maximum available Disk space is only 10GB”.
    My query :
    •     Will I be able to add space to Existing VM from the added Repository ( /OVS/935970F2CC2D4B4391701397517F1001/ ) , whose system.img is stored in path /OVS/running_pool/34_rhel/ .
    Kindly help me out in this.
    Thanks in advance.
    -- Sri

    Hi all,
    I checked with Oracle on the above and got the info currently , the we can utilise only the space available in the existing repo and cannot extend to additional repo.
    Work around is : Clone it to the other repo , or Use Symbolic link .
    Thanks,
    Sri.

  • When we try to buy a new app or update our existing apps, my account settings wont allow me to enter ANY of my credit cards.  It says to contact apple/itunes/support, but when I do, I don't understand how to navigate it to find an answer.  Help!

    when we try to buy a new app or update our existing apps, my account settings wont allow me to enter ANY of my credit cards.  It says to contact apple/itunes/support, but when I do, I don't understand how to navigate it to find an answer.  Help!

    Click here and ask the iTunes Store staff for assistance.
    (108048)

  • HT4910 How do I back up existing app data to a new phone?

    I just set up iCloud on a second phone. I want to push the data from an existing app to the new phone. How can I)

    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • I live in Spain, but am an English speaker. I tried to download some apps from the English shop, but am told I cannot do that. Now I do not know how to switch back to the Spanish store ? I can not even update my existing Apps. I went to Settings' but cann

    I tried to download some Apps from the English shop but am apparently not allowed to do that. I am prompted to switch back to the Spanish shop.
    Unfortunately I do not remember how to do that. I cannot even update my existing Apps. I cannot find anything in Settings to get back to the
    Spanish store. help!!!
    Bambi

    Settings > Stores (or iTunes and App Store) > Apple ID > View Apple ID > enter password > Country/Region

  • Trying to sync my iPad and get the message that "all existing apps and their data will be replaced"

    Previously my Windows 7 laptop didn't recognise my iPad but I persevered and now am getting the message when trying to update the iOS that if I sync, "all existing apps and their data will be replaced" so I'll lose everything I've bought since I last synced (which is a while).  How can I back up my apps before syncing fully and then updating. I have 'transferred purchases' using the File menu but still getting the message.
    Message was edited by: annielevo

    Sounds like you have created a new library somehow. Ideally you would restore your old library and the problem would go away. If that is not possible then you should be able to:
    Backup the device to the computer
    Transfer your purchases into an authorized library
    Recover any other media using third party tools as suggested in this post from forum regular Zevoneer
    Download remaining past purchases from iTunes in the Cloud, where available
    Restore the device from the backup
    This process should switch the association of the device to the new library, preserving the data and settings in your apps.
    May also be prudent to attempt a backup to iCloud directly from the device before you start... Settings > iCloud > Storage & Backup > iCloud Backup > On. It won't save any media but it would preserve the general account settings and documents in case anything goes wrong while you are trying to extract your other data.
    When you get it all fixed, make a backup!
    tt2

Maybe you are looking for