Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 787 Bytes

README.md

File metadata and controls

8 lines (6 loc) · 787 Bytes

Snowflake-Lite .NET

Overview

This is a lightweight implementation of Twitter's Snowflake algorithm on .NET platform. The library consists of only one class IdFactory, which is pretty much equal to IdWorker. However, there are still few main differences:

  • When generating new ID, the IdFactory class employs spin lock instead of mutex to have faster performance.
  • The default constructor of IdFactory class will extract local IP addresses as its worker ID and data center ID.
  • Codes and exception messages are adjusted to follow C# coding conventions.