metarhia / globalstorage

Distributed Data Warehouse 🌍
https://metarhia.com
MIT License
60 stars 5 forks source link

Identification space for multiple processes #13

Open tshemsedinov opened 7 years ago

tshemsedinov commented 7 years ago

Running GlobalStorage in multiple processes we need a way to separate identification space using one of the following ways:

Related issue: https://github.com/metarhia/GlobalStorage/issues/6

For example:

Thread Thread prefix Server Prefix Combined prefix in hex Prefix bit length
1 0000 10011 0x13 9
2 1000 10011 0x113 9
3 0100 10011 0x93 9
4 1100 10011 0x193 9
5 010 10011 0x53 8
6 110 10011 0xD3 8
7 001 10011 0x33 8
8 101 10011 0xB3 8
9 011 10011 0x73 8
10 111 10011 0xF3 8
tshemsedinov commented 7 years ago

@belochub not prioritized issue, now we can use one counter in db for all threads, so it it obvious bottleneck but it's as a temporary solution.