Tagged articles
Sequence
13 articles · Page 1 of 1

ITPUBApr 1, 2024 · Backend Development
An in‑depth look at WeChat’s early messaging system reveals how its backend architecture—comprising ConnectSvr, SendSvr, PushSvr, and a sequence‑based loss‑prevention mechanism—ensured near‑real‑time delivery and prevented message loss, even under weak network conditions.
Real-time DeliverySequenceWeChat
0 likes · 10 min read

This article demonstrates two practical approaches for handling MySQL auto‑increment columns during migration to OB Oracle—creating custom sequences with DBCAT and using the GENERATED BY DEFAULT AS IDENTITY attribute—provides step‑by‑step commands, scripts, and validation results to help DBA engineers achieve seamless primary‑key migration.
Auto-IncrementDataXMySQL
0 likes · 16 min read

The article explains Vitess's approach to generating globally unique identifiers by using dedicated sequence tables, details the underlying MySQL schema and Go implementation, and compares it with VtDriver's CAS‑based method, highlighting trade‑offs between transaction locks and lock‑free updates.
CASDistributed DatabaseSequence
0 likes · 10 min read

This article explains why AUTO_INCREMENT is unsupported in OceanBase Oracle tenants, introduces four practical ways to implement auto‑increment columns using sequences, DML, DDL, triggers, and the GENERATED BY DEFAULT AS IDENTITY syntax, and provides step‑by‑step SQL examples for each method.
Database MigrationOceanBaseOracle
0 likes · 11 min read

This article examines how Oracle, PostgreSQL, and MySQL implement and use database sequences for primary keys, covering explicit calls, trigger‑based, DEFAULT, and AUTO_INCREMENT methods, version support, and the effects of INSERT, UPDATE, DELETE, and TRUNCATE operations, concluding with a comparative summary.
MySQLOracleSQL
0 likes · 30 min read

This article explains how MySQL's AUTO_INCREMENT generates unique identifiers, the constraints on its use, how deletions affect the sequence, the role of LAST_INSERT_ID in concurrent environments, and best practices for managing auto‑increment columns in InnoDB tables.
AUTO_INCREMENTMySQLSQL
0 likes · 8 min read

This article explains PostgreSQL's auto‑increment mechanism, covering built‑in serial data types, manual sequence creation, default value assignment, step‑by‑step code examples, and how to query indexes, offering a clear comparison with MySQL's auto_increment feature.
PostgreSQLSQLSequence
0 likes · 6 min read

This guide explains how Knative Eventing's Sequence CRD enables multi‑step event pipelines, walks through its spec definition, and demonstrates four practical usage patterns—direct service calls, event‑driven processing, cascading sequences, and Broker/Trigger integration—complete with YAML examples and visual diagrams.
KnativeKubernetesPipeline
0 likes · 14 min read

This article explains how to implement order number generation services by first using a simple auto‑increment‑based database table and then a more sophisticated segment‑allocation method that reduces database load, with detailed SQL and Java code examples and transaction‑handling advice.
BackendJavaSequence
0 likes · 8 min read

This article explains Swift's protocol‑oriented collection system, covering the Sequence and IteratorProtocol basics, demonstrating custom infinite sequences, exploring type‑erasing wrappers like AnySequence and AnyIterator, and detailing the Collection hierarchy including Collection, BidirectionalCollection, RandomAccessCollection, MutableCollection and RangeReplaceableCollection.
AnySequenceBidirectionalCollectionSWIFT
0 likes · 12 min read

Swift 4.1 finally supports recursive constraints on associated types, allowing protocols like Sequence to define SubSequence in terms of itself; this article explains the new syntax, demonstrates a minimal DummySequence implementation, and shows how type‑erasing wrappers such as AnySequence and a custom AnyList enable heterogeneous collections.
GenericsSWIFTSequence
0 likes · 8 min read


ITPUBJul 4, 2017 · Databases
This guide explains Oracle SEQUENCE objects—how they generate numeric IDs, the full CREATE SEQUENCE syntax, practical usage with NEXTVAL and CURRVAL, alteration options, querying via data‑dictionary views, and safe removal—complete with runnable SQL examples.
DDLOracleSQL
0 likes · 6 min read

This article explains how WeChat’s seqsvr service generates trillions of per‑user sequence numbers with sub‑millisecond latency, detailing its core architecture, pre‑allocation and section‑sharing strategies, engineering implementation with StoreSvr and AllocSvr, and the evolution of its disaster‑recovery designs from primary‑backup to embedded routing tables.
SequenceWeChatdisaster-recovery
0 likes · 20 min read
