Sunday, September 23, 2012

RavenDB Replication

Doing some pre release testing or RavenDB Replication in build 960.  Thought I’d log and share my results.

SetUp

  • Create Two folders 8080 and 8081
  • unzip code base into each one
  • In server folder –> create plugins folder
  • from bundles folder –> copy the dlls for  –> replication, expiration
  • copy in my custom replication conflict resolution dll
  • edit server config -> change ‘get’ to ‘all’
    • change port setting from * to 8080 and 8081 depending on which folder I’m in.
  • Start Servers –> things look good.
  • Testing
    • Stop and start servers, look at logs.

Testing

I have a series of single task executable files I need to run.  Some set up our environment, others push data.

Testing Create Tenants exe
  1. Run exe against server:8080 then server:8081
  2. Check to see if databases are there –> they are all good.
Replication Configuration and Testing
  1. Create a document Test/101 on server:8080, using the Silverlight tool.
    image
    image
  2. Configure Replication and Server:8081 –> follow help docs on RavenDB.net
    image
  3. Wait a bit -> type reset in command line –> nothing happens –> 8081 is not reaching out to 8080 and pulling in the documents
  4. Configure replication on server 8080 to reach out to 8081
  5. Still no replication happening
  6. Added document Test/102 to 8081
  7. Found the error, copy and paste problem
    image
  8. Checking logs after fixed typo
    image
  9. Documents are still not replicating – Adding document test/105 to 8080
  10. Replication was working, but was replication from server:8080/databases/ClientA to server:8081 /databases/default
  11. Changed the Raven/Replication/Destinations documents on both servers to
    {"Url": “http://dfrfrm025080:8080/databases/ClientA/”}
  12. Success, Replication is working.  Going to delete replicated records out of default database to prevent future confusion.
Replication Conflict Resolution Testing
  1. Turn off server:8081 –> using q command in console so I don’t get a bunch of index errors when I start again
  2. server:8080 edit Test/105 –> Change Name from “Jane” to “Tarzan” and Save
  3. Turn off server:8080
  4. start server:8081
  5. Make sure in ClientA database (database and tenant are about the same thing)
  6. Edit Test/105 –> change Name from “Jane” to “Superman” save
  7. Start Server:8080 and wait a bit for things to mesh
  8. Both documents say superman
  9. Now going to do the same thing but in reverse order, since the conflict resolution dll’s are installed on both servers.
  10. server:8081  test/105 – name “IronMan”
  11. server:8080  test/105 – name “Batman”
  12. Restarted both servers to speed things up
  13. Looks good now both say “Batman”
  14. Since I issued a restart, the test is not entirely valid, I’ll monitor this later when I start pushing large amounts of data.

No comments:

Post a Comment