Comments (1)
What's wrong with this code
Oh, boy, where do I start...
Well: first of all it's not my code. I don't see why I'm supposed to debug someone else's code. But then again, I go by a tariff of €120,- p/hr and then I'm glad to pour over your code.
Second: It's all in Chinese. I can read the code fine but the comments are, literally, Chinese to me. So that makes it... challenging.
Third: The code is not posted in the issue / on github but on some external site. So even if I were to give you a free code review, the link will most probably be gone in a while and then the only person who profited from all my hard (free) work would be you. All knowledge I might have shared with you wouldn't make sense without the code I was referring to and so my shared knowledge would be lost and worthless.
Fourth: It's not even related to IdGen but much more closer to Twitter's original snowflake project. I don't see why you don't approach the original authors but me?
Fifth: You don't describe the problem. "What's wrong with this code" is not a problem description. It's like taking your car to the garage and asking a mechanic what's wrong with it. How is he/she supposed to know? Unless you're missing a wheel or there's black smoke billowing out the hood, how is he ever supposed to find the broken cigarette lighter you're referring to but not telling him about? You're mentioning "serious repetition" but, again, explain nothing (unless you expect me to read Chinese...)
Lasty: I don't see any effort you might have taken to troubleshoot / debug the problem yourself. You appear to have simply googled "Snowflake", come across this project, and dumped your question here in my lap expecting me to debug / troubleshoot your code, which is mostly unreadable to me, for free. Not gonna happen. The very least you could have done was include your own findings or steps you have taken to troubleshoot your problem.
Maybe try codereview.stackexchange.com next time.
But hey, if you're having trouble implementing Snowflake, maybe try IdGen? 😉
...and did you remember to change the MachineId
(and/or DatacenterId
for each machine)?
from idgen.
Related Issues (20)
- Drop support for netstandard 1.1 HOT 5
- Non-generic IIdGenerator HOT 5
- Avoid spending a sign bit by using ulongs HOT 10
- Tag 3.0.3 is missing HOT 1
- Documentation about generatorId collisions when id structure changes HOT 9
- IdGen is generating 17bit Id instead of 16bit? What should we change in the method so that it generate 16 bit Id instead of 17 bit now and in the future it continuous to generate 16 bit Id? HOT 11
- Is there a way to shorten the number of digits generated for an id? HOT 5
- Handling uniqueness ID across multiple instance of same service HOT 6
- IdGenerator does not contain a definition for 'Take' HOT 1
- Consider adding IdGenerator#CreateFromDateTime HOT 5
- Public Method Comments HOT 1
- SpinWait drastically slows continous ID generation rate for small tick length HOT 10
- Could we log how often we overflow sequence IDs and have to spinwait? HOT 1
- Concurrency issues with instances scale up HOT 2
- Use dependabot to keep references up to date HOT 1
- Sequence input for CreateId() HOT 3
- IIdGenerator is registered as a singleton, but duplicate IDs are still generated HOT 4
- Debugging InvalidSystemClockExceptions HOT 15
- Is there a way to generate id from the past HOT 1
- How to use this in distributed computing ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from idgen.