Scimore Company Blog
Ramblings on databases

Testing Replication

May 29, 2008 10:15 by scimore


We just started to test a new Bi-Directional and Read Only replications that will be added in a new database release.

The bi-directional replication resolve conflicts in a column level. For instance, if both subscriber and publisher modify the same row, but different columns, the changes will be merged to a single row. If modified the same column, the conflict will be not resolvable and it will be logged to a conflicts table for the user action. When a conflict occurs, for each conflicting row, 3 rows will be present. 2 rows from subscriber: original row since the last synchronization and the latest one. And 1 the newest from publisher.
If a column has been incremented/decremented by numeric value, for example "Amount" or "NumberOfItems", it could be possible to apply delta changes from subscribers to publisher and avoid conflicts.

The synchronization process is transactional, i.e. if user application aborts replication or unexpectedly exists, the merge changes will be rollback in both subscriber and publisher.

Publisher can synchronize with many subscribers. In addition, subscriber has an option to subscribe to a set of rows from the table with a filter (where clause) condition. Publisher can be distributed DB or Server and subscriber - Server or EmbeddedDB.

We have publishing the latest alpha versions at: http://www.scimore.com/download/release/3.0/ both server and embedded. Try it!

To subscribe the table, execute on subscriber DB following command:

subscribe from 'dev21:999'
(
merge test.testconflicts to test.testconflicts,
merge webstats.geoip to test.geoip
)

Where: 'dev21:999' - publisher, test.testconflicts & webstats.geoip - tables on publisher, test.testconflicts & test.geoip - subscribed tables(these tables will be automatically created).

When you subscribe first time, the command will tell to publisher to initialize tables for publishing and subscribe. The second subscriber will only subscribe to already published table, so it will execute faster.

To unsubscribe, execute in the same format as subscribe command, except change command name to unsubscribe:

unsubscribe from 'dev21:999'
(
merge test.testconflicts to test.testconflicts,
merge webstats.geoip to test.geoip
)

Unsubscribe command will remove information from publisher about the current subscriber and drop the local subscribed tables in subscriber.

To synchronize, execute:

synchronize test.testconflicts with test.testconflicts on 'dev21:999'

OR

synchronize test.geoip with webstats.geoip on 'dev21:999'

The command will merge the changes from both subscriber and publisher.
NOTE: when you execute this command in manager or with .NET provider the conflicts will not be resolved. The command will return an error and abort synchronization.
A conflict appears:
1. UPDATE DELETE - one deleted, other updated.
2. UPDATE UPDATE - both updated the same column. If each updates different columns, sync merges the changes and applies it.

The conflict resolution is possible with the .NET provider new classes for replication.

If you replicate big tables, it may take time when subscribing, you could increment number of DB cache pages to 10.000-100.000 so it will run much faster. The default is 3000 pages where each takes 8KB.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Great support from worldwide user base

April 29, 2008 11:13 by scimore

We now have registered users from 48 countries. People from 124 countries have visited our web site.

The registered users are spread over a wide variety of industries. Financial & Banking sector, Mobile business, Oil industry, Military, Government, Online gaming and Entertainment.

For this we are thankfull. 

We would like to thank everyone who uses our database, posts bugs, gives us challenges, and requests new features.


Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

How to use BLOB data types with ScimoreDB

April 18, 2008 11:23 by scimore

The following sample code shows how to use BLOB data types with ScimoreDB.
The full source code of the sample project, which you can compile and execute, is located under http://www.scimore.com/download/2.5/BlobDemo.zip. The sample uses Scimore embedded database.

Suppose that we already have an established connection with a server.

ScimoreConnection connection;
ScimoreCommand command;

The code snippet showing how to insert an image into a BLOB field:

Bitmap image = SystemIcons.Warning.ToBitmap();
byte[] value = (byte[])TypeDescriptor.GetConverter(image).ConvertTo(image, typeof(byte[]));

command.CommandText = "INSERT INTO table_1 VALUES (@p1)";
ScimoreParameter p1 = new ScimoreParameter("p1", ScimoreDbType.Blob);
p1.Value = value;
command.Parameters.Add(p1);

int rowsAffected = command.ExecuteNonQuery();

And the following code snippet shows how to read data from a BLOB field

command.CommandText = "SELECT column_1 FROM table_1";
ScimoreDataReader reader = command.ExecuteReader();
while (reader.Read())
{
    value = (byte[])reader["column_1"];
    image = (Bitmap)TypeDescriptor.GetConverter(typeof(Bitmap)).ConvertFrom(value);
    image.Save("warning.bmp");
}


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , , , ,
Categories:
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Documentation updated

March 26, 2008 17:15 by scimore

Documentation has just been updated, and is closed to be finished.

The 2.5 features likes t-sql features, identity, flow control and flush log have been added.

A new minor bug release of the server and manager. We added a feature to the manager, allowing for easier feedback.

And another exciting thing has just happendend yesterday morning. One of the developers reported that he finished the first alpha version of our Visual Studio 2008 integration.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: ,
Categories:
Actions: E-mail | Permalink | Comments (6) | Comment RSSRSS comment feed

"That’s one small step for man, one giant leap for mankind"

March 3, 2008 20:22 by scimore

Ok, we didn't land on the moon, but its still a big release - Version 2.5 is here!!!!

We are very proud of the new release, which is easier to use. Read all about the new features.

Main things are:

  • T-SQL syntax
  • New embedded database interface
  • Free-text
  • and many many more things...

The new release is available from the download section. Go ahead, download, try it and sent us your feedback.

Better documentation of the new features, is on its way.

 


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , ,
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Release Party on its way

January 11, 2008 10:05 by scimore

Work work work. After a long period of working with the nitty gritty things - we are so close to release!

Right now we are dreaming of a RELEASE PARTY!

Everyone will receive information on when & where. Be there or be square!


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5