Coder Social home page Coder Social logo

sharpdb's Introduction

SharpDB

SharpDB is C# based High Performance Key Value NoSQL Database with ACID Transaction. SharpDB is using Multiversion concurrency control to achieve transactions. Because of using MVCC SharpDB is very fast in doing transaction (the downside is that SharpDB using a lof of space).

For network protocl SharpDB is using NetMQ which is C# port of ZeroMQ, which means SharpDB is using very fast on the network as well.

Installation

Packages of SharpDB is still not available, so download the code code and compile.

After compiling run the following command to run the server:

SharpDB.Server.exe run -name:test -port:5555

You can change the name and port fields as you like. File called name.sdb will be created as the database file.

You can also run the database as a service with the following commands (must run as administrator)

SharpDB.Server.exe install -name:test -port:5555
SharpDB.Server.exe start

Using

To use SharpDB from your application include the SharpDB.Driver assembly. Following is small example of using the SharpDB driver:

	[Test]
	public void UpdateGet()
	{
		using (SharpDBClient client = new SharpDBClient("tcp://127.0.0.1:5555"))
		{
			using (SharpDBConnection connection = client.GetConnection())
			{
				Account newAccount = new Account();
				newAccount.Name = "Hello";
				newAccount.Id = 1;

				connection.Update(newAccount);

				Account storedAccount = connection.Get<Account>(1);

				Assert.AreEqual("Hello", storedAccount.Name);
			}
		}
	}

and the account class:

public class Account
{
	public int Id { get; set; }

	public string Name { get; set; }
}

sharpdb's People

Contributors

maikebing avatar perksey avatar somdoron avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.