When a domestic-computing project swaps its database for Dameng DM8, the observability platform must follow. This post records a real adaptation: connection strings, SQL dialect, pagination and transaction differences, plus one-command deployment on domestic ARM.
Every domestic-computing acceptance checklist includes "database localization," and there is no way around it. If the platform still depends on the original Oracle or MySQL, it fails the review. An observability platform stores metadata of its own — services, alert rules, audit logs — so its database must support a domestic replacement.
Observe is built in Go with a dialect abstraction in its data-access layer. Connecting to Dameng DM8 requires no business-logic changes — only a driver and connection-string swap. Here is what a real adaptation looked like.
DM8 ships a JDBC-compatible driver. On the Go side you can use Dameng's official go-driver or DM's MySQL compatibility mode. If the project already leans on the MySQL ecosystem, enable MySQL compatibility mode in DM8 for the smallest change:
dsn := "dm://SYSDBA:Sysdba123@192.168.10.20:5236?compatibleMode=mysql"
On the platform side, only a few environment variables change:
DB_TYPE=dm8
DB_HOST=192.168.10.20
DB_PORT=5236
DB_USER=SYSDBA
DB_PASSWORD=********
DB_SCHEMA=OBSERVE
LIMIT m, n must become LIMIT n OFFSET m (or DM's TOP). The platform wraps pagination in a single function, so the business layer never notices.These three are the usual suspects; once fixed, the rest generally just works.
Moving existing data from MySQL to DM8 happens in two steps — structure, then data. Regenerate the DDL under DM's dialect first (mind the identifier rules above), then use Dameng's migration tool or dts to copy the rows. Two things deserve a close look after the move:
TIMESTAMP handles milliseconds slightly differently from MySQL.SEQUENCE semantics differ from MySQL's AUTO_INCREMENT, so the key-generation logic must change in step.Domestic environments are typically Kunpeng/Phytium CPUs plus Kylin V10. Observe ships an ARM64 single binary. After setting the variables above:
wget https://download.jjhub.cn/observe/arm64/observe
chmod +x observe
./observe --config ./env
No compilation, no Go runtime — one command starts it. Wrap it in a systemd unit for boot-time startup. Tune the connection pool against DM8's concurrency limits: the default pool is stable on domestic ARM, but under load testing, keeping the maximum connections under 70% of DM8's configured limit is the safer bet.
Beyond the pool ceiling, three settings matter when DM8 runs on Kunpeng/Phytium hardware. First, cap total connections at roughly 70% of DM8's configured limit — the default pool is stable, but a burst of alert-rule evaluations during an incident can exhaust connections and trigger cascading query failures. Second, batch audit writes: the audit table is the platform's hottest writer, so buffer events and flush in batches rather than one row per operation. That keeps the trail complete without hammering DM8's transaction log. Third, align backups with traffic: the platform is query-heavy during working hours and write-heavy overnight when alerts and cron jobs run, so schedule DM8's online backup windows outside peak query hours.
Finally, expose DM8's own health — connections, deadlocks, redo-log growth — as metrics into the platform itself, so a database slowdown appears on the same dashboard as the services that depend on it. When the database is the bottleneck, you want to see that in one glance rather than discovering it only after a ticket escalates.
These are small knobs, but they are the difference between "it runs" and "it survives a quarterly security review under load."