Project: Hive Census
Application: https://app.hive-census.workers.dev/
Core Worker version documented: 0.9.11
Administrator API version reviewed: 0.2.3
Documentation date: 12 October 2026
Status: Active development

That sounds like a relatively straightforward question. In practice, answering it requires solving several problems involving blockchain data, account metadata, geographical ambiguity, external APIs, background processing, database consistency and application security.
Hive Census is an experimental application designed to build a geographical representation of the Hive community.
The motivation is practical. Knowing where Hive users are located could help community members organise meetings, identify regional concentrations of users, plan events and better understand the geographical distribution of the ecosystem.
For example, geographical data might help evaluate whether a future HiveFest, HiveBeeCon or another community event could attract sufficient interest in a particular country or region.
The application is not intended to identify the precise physical location of individual users. It works with information voluntarily published through Hive accounts and the Hive Census protocol.
It is also important to recognise that a geographical map of Hive accounts is not equivalent to a census of real people.
A person may control several accounts, an account may represent an organisation, and profile information may be incomplete, outdated or deliberately fictional.
Consequently, Hive Census should be understood as an experimental geographical representation of publicly available account information, rather than a comprehensive demographic survey.
This article documents how the application works, the technical decisions behind it, the problems encountered during development and the solutions implemented so far, so that others might jump over issues I have met.
It also identifies issues that remain unresolved or require further verification.

Several principles guided the development of Hive Census.
This makes database efficiency, background-job scheduling and careful API usage particularly important.
Attempting to retrieve and process everything in a single request would be impractical.
Instead, Hive Census uses incremental processing, persistent cursors and scheduled jobs.
Long-running operations must be able to resume after interruptions.
A failed request should not require the application to start importing all accounts again.
Geographical names are frequently ambiguous.
Automated classification can identify many locations, but some require human judgement.
Hive Census therefore includes administrative tools for reviewing and correcting uncertain results.
The public application exposes geographical information and processing statistics.
Administrative operations require authentication and must not be available to arbitrary visitors.
As the project evolves, updates should avoid unnecessary database resets, repeated full imports or destructive migrations.
This becomes increasingly important as the amount of processed data grows.
The current implementation uses the following principal components.
| Component | Technology | Purpose |
|---|---|---|
| Application backend | Cloudflare Workers | HTTP API and background processing |
| Database | Cloudflare D1 | Persistent application data |
| Scheduled execution | Cloudflare Cron Triggers | Incremental processing |
| Blockchain data | Hive RPC API | Blocks, accounts and account metadata |
| Location classification | Application classifier | Interpretation of profile locations |
| Geocoding | GeoNames integration | Resolving geographical names |
| Administrator authentication | Hive Keychain | Hive-account-based authentication |
| Public interface | Web frontend | Geographical presentation |
| Administration interface | Web frontend | Review and management operations |
The application separates several responsibilities into dedicated modules.
The reviewed core Worker imports:
import {
classifyLocation,
getClassifierVersion
} from "./location-classifier.js";
import {
geocodeLocation,
getGeocoderVersion
} from "./location-geocoder.js";
The administrative API is implemented separately and imports authentication utilities from admin-auth.js.
This separation makes it easier to modify geographical interpretation, external geocoding and administrator authentication without placing every responsibility inside a single function.
The application processes two distinct sources of geographical information.
The first source consists of operations published on the Hive blockchain using the Hive Census protocol.
The indexer retrieves blockchain data, identifies relevant operations, validates their contents and updates the current census state.
These locations are retrieved through Hive RPC, normalised, classified and, where appropriate, geocoded.
The two sources must not be treated as equivalent.
An explicit census declaration is a deliberate protocol-level action, whereas a profile location is free-form account metadata.
HIVE BLOCKCHAIN
|
Hive RPC endpoints
|
+------------+------------+
| |
Block indexer Account importer
| |
Census protocol Profile metadata
| |
Validation Location extraction
| |
census_current Normalisation
| |
| location_matches
| |
| Automatic classifier
| |
| Geocoder
| |
| Administrator review
| |
+------------+------------+
|
Cloudflare D1
|
Public API / UI
|
Geographical map
The diagram describes the principal logical flow, not every database relationship or execution detail.
Hive Census contains a blockchain indexer responsible for processing Hive Census protocol operations.
The reviewed Worker uses:
const HIVE_RPC = "https://api.hive.blog";
const CENSUS_ID = "hive_census";
const PROTOCOL_VERSION = 1;
The indexer identifies custom_json operations whose identifier matches hive_census.
Relevant payloads are parsed and validated before their effects are applied.
The indexer reads Hive's last irreversible block number and limits processing accordingly.
The purpose is to avoid treating potentially reversible blockchain state as final.
The relevant logic is:
const irreversible = Number(
props.last_irreversible_block_num
);
const endBlock = Math.min(
irreversible,
initialCursor + requestedBlocks
);
The reviewed configuration includes:
const SCHEDULED_SCAN_BLOCKS = 250;
const BLOCK_BATCH_SIZE = 100;
A scheduled scan targets up to 250 blocks, while individual block-range requests are limited to batches of 100.
This avoids requesting the entire remaining blockchain history at once.
It also validates the basic structure of each block before processing its transactions.
An incomplete block-range response causes an error rather than being silently accepted as complete.
This is important because advancing the cursor after processing incomplete data could permanently omit relevant blockchain operations.
The Worker validates payloads before calling the corresponding database update functions.
The current public census endpoint is:
GET /api/census
It returns the current census records, including geographical fields and blockchain-related metadata.
GET /api/indexer/scan
The indexer can therefore potentially be invoked through both scheduled and manual execution.
The reviewed code does not establish an equivalent atomic lease mechanism for the indexer itself.
Concurrent cursor updates and overlapping scans should be assessed before treating manual and scheduled execution as fully concurrency-safe.
This is a separate issue from the profile-rescan protections introduced in version 0.9.11.
The profile importer retrieves public Hive account metadata and extracts the location field where available.
This is one of the most time-consuming parts of the project.
The importer uses an account-name cursor.
Its principal metadata includes:
last_account
accounts_scanned
accounts_with_location
last_import_run
last_import_error
import_complete
Instead of beginning with the first account every time, the importer continues from the previously recorded account name.
The reviewed configuration is:
const PROFILE_ACCOUNTS_PER_RUN = 100;
const PROFILE_LOOKUP_BATCH_SIZE = 100;
const PROFILE_FETCH_BATCH_SIZE = 100;
This limits the amount of account processing attempted in one importer run.
Accounts without a usable location do not generate a profile-location record during the initial import.
Accounts with locations are passed through the storage and matching process.
As of 12 October 2026, the live API reported:
| Metric | Value |
|---|---|
| Accounts scanned | 61,300 |
| Accounts with locations | 8,757 |
| Stored profile locations | 8,757 |
| Unique location strings | 3,276 |
| Pending location matches | 0 |
| Initial import complete | No |
Approximately 14.3% of the accounts processed at that point had a stored location.
This percentage should not be interpreted as a statistically representative estimate for the entire Hive ecosystem.
For example:
scanned++;
lastAccount = name;
await setProfileMeta(
env,
"last_account",
lastAccount
);
This approach provides fine-grained progress persistence.
However, it also generates frequent database writes.
A future optimisation could checkpoint progress after processing a group of accounts.
Such a change must preserve consistency between saved profile records and the importer cursor.
Otherwise, an interrupted run could skip accounts or produce inconsistent counters.
This optimisation has been identified but has not yet been implemented in the reviewed version.

Profile locations are free-form strings.
Unlike a structured geographical database, Hive does not require users to provide a country code, administrative region or standardised city identifier.
Users may enter:
For example:
Poland
Katowice
Silesia
London
Springfield
Somewhere on Earth
These examples illustrate the problem; they are not a list of actual Hive Census records.
The objective is to reduce unnecessary duplication caused by superficial differences in how users enter locations.
The exact normalisation rules should be documented alongside the classifier source, because excessive normalisation can accidentally merge distinct geographical names.
The application stores account-specific location information separately from geographical matching results.
The reviewed code uses:
profile_locations
location_matches
This permits multiple accounts using the same normalised location to share one geographical interpretation.
The benefit is significant.
If hundreds of accounts use the same location string, the application does not need to geocode that string independently for every account.
The matching process distinguishes several states:
pending
matched
ambiguous
rejected
Their practical meaning is:
| State | Meaning |
|---|---|
| pending | Awaiting classification |
| matched | A geographical interpretation has been accepted |
| ambiguous | More than one interpretation is plausible |
| rejected | The location has not been accepted as a usable geographical match |
A location should not be displayed as a confidently identified place merely because an automated service returned a result.
Geographical ambiguity is one of the central challenges of Hive Census.
Many place names exist in several countries or regions.
A profile containing only a city name may not provide enough information to identify the correct location.
A geocoder may return a technically valid result that is nevertheless wrong for the account concerned.
Selecting the first search result is therefore not a reliable general solution.
The most popular city with a particular name is not necessarily the one intended by a Hive user.
Hive Census first attempts to interpret locations using its classifier.
The classifier can produce matched, ambiguous or rejected results.
The core Worker processes pending locations in scheduled batches.
The reviewed configuration is:
const LOCATION_CLASSIFY_PER_RUN = 100;
Locations requiring further geographical resolution can be processed through the GeoNames integration.
The reviewed configuration includes:
const GEOCODE_PER_RUN = 10;
const GEOCODE_ERROR_RETRY_HOURS = 24;
Limiting geocoding requests reduces the risk of excessive external API usage.
The retry interval also prevents immediate repeated attempts following certain errors.
Some locations require manual intervention.
The administrative interface supports reviewing ambiguous locations and assigning or rejecting geographical interpretations.
This is already an operational feature of the project.
Manual review is not merely a temporary workaround.
For free-form geographical data, human judgement can be an appropriate part of the data-quality process.
A particularly important design requirement is ensuring that later automated processing does not silently overwrite administrative decisions.
The reviewed code contains explicit checks involving:
COALESCE(source, '') != 'admin_manual'
The project also includes account-specific override handling.
These mechanisms are intended to preserve manual resolutions while automated classification continues.
Their interaction should remain covered by regression tests as the importer and rescan mechanisms evolve.
Hive Census uses GeoNames as an external geographical reference.
The geocoding component is responsible for attempting to convert a location description into structured geographical information.
Potential output fields include:
country
country_name
region
region_name
city
lat
lon
location_type
External geographical APIs do not understand the personal intentions behind an account's profile text.
They may return a plausible geographical result for an ambiguous name.
The application therefore includes additional checks before accepting certain geocoding results.
External services can fail because of network problems, unavailable endpoints or request limits.
The reviewed code includes a configurable retry interval for geocoding errors.
This avoids repeatedly retrying the same unsuccessful operation in rapid succession.
Geocoding is processed in relatively small batches.
This reduces pressure on the external service and makes the operation suitable for scheduled execution.
No automated geocoder can reliably resolve every location entered by users.
Some records will continue to require administrative review, and others may remain unresolved.
A smaller but more reliable geographical dataset is preferable to a larger map containing systematically incorrect locations.
Hive Census uses Cloudflare Cron Triggers to continue processing without requiring a continuously running server.
The reviewed Worker defines three auxiliary jobs:
const auxiliaryJobs = [
{
name: "classifier",
run: () => runScheduledLocationClassifier(env)
},
{
name: "geocoder",
run: () => runScheduledGeocoder(env)
},
{
name: "profiles",
run: () => runScheduledProfileImporter(env)
}
];
The scheduled indexer runs first.
After successful indexer execution, one auxiliary job is selected according to the scheduled time slot.
The rotation avoids executing every auxiliary workload on every Cron invocation.
Assuming a five-minute Cron interval and uninterrupted execution, each auxiliary job is selected approximately once every fifteen minutes.
For the profile importer, the nominal processing capacity is therefore:
100 accounts per importer run
4 importer runs per hour
400 accounts per hour
9,600 accounts per day
These figures are theoretical.
Actual throughput depends on successful RPC requests, execution time, scheduled-job completion and other operational factors.
In the reviewed implementation, an indexer failure causes the auxiliary job to be skipped.
This means that a persistent blockchain-indexing problem could also delay profile importing, classification and geocoding.
The dependency is worth reconsidering.
In principle, these workloads perform different tasks and could be scheduled independently, provided that concurrency and resource limits are properly managed.
A possible future architecture would use independent scheduling or explicit workload budgeting for each process.
This would allow the application to adjust processing rates without making every auxiliary operation dependent on successful completion of the indexer.
Such a redesign is not part of version 0.9.11.

Hive Census includes an administrator interface protected by Hive-account authentication.
The intended authorised administrator is:
@jocieprosza
The reviewed administrator API imports functions for:
The implementation uses Hive Keychain authentication and HttpOnly sessions.
Hive already has an account-based cryptographic authentication ecosystem.
Using Hive Keychain makes it possible to authenticate through the account's Hive credentials without creating a separate application password.
Administrative access must be enforced on the server.
Hiding administrator controls in the frontend is not sufficient protection.
The administrative API is responsible for validating the session and authorising privileged operations.
The reviewed administrator API includes checks for same-origin requests.
It also defines security-related HTTP headers and limits request-body sizes.
These measures reduce the attack surface of administrative endpoints.
HttpOnly cookies help prevent ordinary frontend JavaScript from reading session tokens.
This does not eliminate every web security risk.
Authentication, authorisation, session expiry, request validation and transport security must continue to be treated as separate responsibilities.

A major administrative requirement is the ability to correct geographical interpretations.
This involves more than changing a coordinate.
The application must distinguish between:
For example, two accounts may both enter the same ambiguous city name but refer to different places.
A global correction would not necessarily be appropriate for both.
The project therefore includes account-specific override protection.
The reviewed administrator API also includes functionality for manual matching and rejection, with audit-related fields.
A manually resolved location should not automatically revert to an ambiguous or incorrect result during later classification.
The administrator API version 0.2.3 explicitly documents handling for rejection operations involving database constraints.
This is important because rejecting a geographical interpretation must not require inventing invalid geographical coordinates or violating non-null database fields.
When building a data-enrichment pipeline, corrections made by a human reviewer should be represented explicitly.
They should not be indistinguishable from automated results.
Otherwise, later reprocessing can unintentionally destroy valuable manual work.

The initial profile import is only the beginning.
Hive users can change their profile information.
A location recorded months earlier may no longer reflect the current profile.
Hive Census therefore needs a mechanism to revisit previously processed accounts.
The initial import enumerates accounts and collects available location information.
A full rescan revisits accounts that have already been imported.
The rescan must handle:
The project was designed to support manually initiated full rescans rather than automatically repeating the entire account import indefinitely.
This gives the administrator control over when an expensive operation begins.
In version 0.9.11, starting a full rescan requires:
import_complete = true
If the initial import has not finished, the start operation returns:
INITIAL_IMPORT_INCOMPLETE
On 12 October 2026, the live API reported:
{
"version": "0.9.11",
"available": false,
"state": "idle",
"accounts_scanned": 0,
"locations_found": 0,
"locations_removed": 0
}
These values refer to the rescan, not to the initial profile importer.
The rescan was not active, and the initial import remained incomplete.
A rescan may take many scheduled executions to complete.
If two processes attempt to execute the same rescan simultaneously, several problems can occur:
Preventing these failures requires more than a simple Boolean running flag.
This is one of the most important technical issues addressed during the development of version 0.9.11.
A naive background-job lock might work as follows:
Read job state
If idle:
Set state to running
Start processing
Unfortunately, this sequence is vulnerable to a race condition.
Two processes can both read idle before either writes running.
Both may then proceed.
Version 0.9.11 introduces an atomic lease mechanism stored in D1.
The lease contains a token and an expiration timestamp.
A process must acquire the lease before processing rescan data.
The relevant concept is:
UPDATE profile_import_meta
SET value = ?
WHERE key = 'rescan_lease'
AND <lease acquisition conditions>;
The conditional update is executed as one database operation.
This is fundamentally different from separately reading and updating the lock.
A lease cannot remain valid forever.
Otherwise, an interrupted Worker could permanently block further progress.
The reviewed configuration includes:
const RESCAN_LEASE_SECONDS = 600;
const RESCAN_INIT_SECONDS = 600;
These values represent ten-minute intervals.
An active process can renew its lease.
This helps prevent another process from taking ownership while legitimate work is continuing.
Lease acquisition alone is not enough.
A process whose lease has expired might continue executing and attempt to write results.
Version 0.9.11 therefore uses guarded SQL statements that check the active lease and job identity.
This is known as fencing.
The purpose is to prevent a stale process from modifying rescan state after losing ownership.
The implementation uses D1 batch operations for groups of related database changes.
This is intended to keep account processing and progress updates consistent.
The rescan also uses an intermediate initialisation state.
This prevents an incompletely initialised job from being exposed as an ordinary running job.
Expired initialisation states can be recovered.
The JavaScript syntax of version 0.9.11 has been checked.
Selected SQL operations have also been reviewed and tested locally using SQLite.
However, the complete rescan lifecycle has not yet been integration-tested against the live Cloudflare D1 environment.
In particular, production testing has not established the behaviour of:
Therefore, the mechanism should be described as implemented but not yet fully validated, rather than proven production-safe.
This distinction is important.
Code review and successful syntax checks are not substitutes for integration testing.
The application uses Cloudflare D1, a SQLite-based database service.
The live Cloudflare dashboard reported nine tables as of 12 October 2026.
The reviewed code references, among others:
census_current
profile_locations
location_matches
profile_import_meta
It also uses metadata storage for blockchain indexing, account-specific override information and geocoding-related state.
The complete production schema, including every index, foreign key and migration, should be published only after verification against the actual D1 schema.
The census_current table represents the current state of explicit Hive Census declarations.
The profile_locations table stores location information associated with individual Hive accounts.
The location_matches table stores interpretations of location strings.
The profile_import_meta table stores processing progress and operational state.
For example:
last_account
accounts_scanned
import_complete
rescan_state
rescan_job_id
rescan_lease
rescan_last_account
rescan_accounts_scanned
Cloudflare Workers are not continuously running processes.
A Worker execution can finish or be interrupted.
Progress therefore needs to be stored outside the execution's memory.
Persistent metadata enables subsequent executions to resume processing.
The reviewed core Worker exposes the following endpoints.
| Endpoint | Purpose |
|---|---|
/api/status | Application and configuration status |
/api/census | Current explicit census records |
/api/indexer/status | Blockchain indexer progress |
/api/indexer/scan | Manual indexer execution |
/api/profiles/status | Initial profile import statistics |
/api/profiles/locations | Sample of stored profile locations |
/api/profiles/map | Aggregated geographical map data |
/api/profiles/classifier/status | Classifier progress |
/api/profiles/geocoder/status | Geocoder progress |
/api/profiles/rescan/status | Full rescan status |
The administrative API has additional authenticated endpoints.
Those endpoints should be documented separately with their request methods, authorisation requirements, payloads and error responses.
GET https://app.hive-census.workers.dev/api/profiles/status
An observed response included:
{
"ok": true,
"version": "0.9.11",
"import_complete": false,
"last_account": "albit",
"accounts_scanned": 61300,
"accounts_with_location": 8757,
"stored_profile_locations": 8757,
"unique_location_strings": 3276,
"pending_location_matches": 0,
"last_import_error": "",
"accounts_per_scheduled_run": 100,
"rescan_state": "idle",
"last_completed_full_scan": ""
}
This is a historical snapshot, not a live counter.
The map endpoint joins profile records with accepted geographical matches.
It groups accounts by geographical fields and returns the number of accounts associated with each location.
The essential query pattern is:
SELECT
m.country,
m.country_name,
m.region,
m.region_name,
m.city,
m.lat,
m.lon,
m.location_type,
COUNT(*) AS accounts
FROM profile_locations p
JOIN location_matches m
ON m.id = p.match_id
WHERE p.match_status = 'matched'
AND m.status = 'matched'
AND m.lat IS NOT NULL
AND m.lon IS NOT NULL
GROUP BY
m.country,
m.country_name,
m.region,
m.region_name,
m.city,
m.lat,
m.lon,
m.location_type
ORDER BY accounts DESC;
This approach reduces the volume of data sent to the frontend by returning aggregated geographical results.
It also means that the map endpoint represents matched profile locations, rather than every imported account.
One of the project's objectives is to remain inexpensive to operate.
Cloudflare D1 charges or limits usage according to metrics such as rows read, rows written and storage.
The number of SQL statements alone does not determine database cost.
A single inefficient query can read many more rows than numerous well-indexed queries.
The Cloudflare dashboard showed the following values on 12 October 2026.
| Metric | Reported usage |
|---|---|
| Databases | 1 |
| Rows read, current usage period | 16.64 million |
| Rows written, current usage period | 56,620 |
| Storage | Approximately 2.65 MB |
The dashboard also displayed the following limits:
Rows read: 25 billion
Rows written: 50 million
Storage: 5 GB
These are the limits displayed in the account interface.
They should not automatically be treated as the universal Cloudflare D1 free-plan limits.
The account's actual billing configuration and current Cloudflare documentation must be checked before making general claims about plan eligibility.
A separate database overview showed approximately:
| Metric | Value |
|---|---|
| Total queries | 19,000 |
| Rows read | 950,000 |
| Rows written | 29,000 |
| Storage | 2.7 MB |
| Median query latency | 0.2 ms |
| Tables | 9 |
These measurements suggest that the database was operating with relatively low latency at the time of observation.
They do not identify which individual SQL statements were responsible for the greatest resource consumption.
A large code refactor may introduce regressions without delivering meaningful savings.
The correct sequence is:
The following improvements have been identified for further investigation.
Batching importer cursor updates
The importer currently performs frequent cursor writes.
Reducing their frequency may lower database activity, but requires safe checkpointing.
Avoiding repeated full counts
The importer executes:
SELECT COUNT(*) AS count
FROM profile_locations;
during its processing cycle.
This count may be unnecessary on every importer run if equivalent information can be maintained safely.
Reviewing map query indexes
The map endpoint joins two tables and groups results across several geographical fields.
Its execution plan should be reviewed as the database grows.
Reviewing classifier selection
Pending-location queries should use appropriate indexes for their filtering and ordering conditions.
Reducing unnecessary status polling
Repeated API requests can generate avoidable database reads, particularly when several users keep the application open.
The available metrics do not demonstrate an urgent database-capacity problem.
Consequently, major changes to the database architecture are not currently justified by measured resource usage alone.
Optimisation remains an important maintenance task, particularly before increasing importer throughput or enabling full rescans.
This section summarises the principal technical problems identified in the available development records and reviewed code.
It deliberately distinguishes implemented solutions from planned improvements.
Challenge: Processing all Hive accounts in one execution is impractical.
Implemented approach: Incremental account enumeration, bounded batches and persistent progress metadata.
Benefit: Importing can continue across multiple scheduled executions.
Remaining issue: Initial import takes considerable time.
Challenge: Worker executions may fail or end before the overall import finishes.
Implemented approach: Persistent account-name cursor and processing counters.
Benefit: The importer does not need to restart from the first account after every interruption.
Remaining issue: The consistency of future batch-level cursor optimisations requires careful design.
Challenge: Hive profiles contain free-form location strings.
Implemented approach: Normalisation, shared matching records and automatic classification.
Benefit: Similar location strings can be processed consistently.
Remaining issue: Some strings remain inherently ambiguous.
Challenge: Multiple real places can share the same name.
Implemented approach: Explicit ambiguous status, geocoding safeguards and administrator review.
Benefit: Uncertain results need not be presented as reliable matches.
Remaining issue: Manual review cannot guarantee the accuracy of every account's self-reported location.
Challenge: Automatic processing could overwrite manually corrected results.
Implemented approach: Manual-source protection and account-specific overrides.
Benefit: The application can distinguish automated results from administrative decisions.
Remaining issue: Override preservation during full rescans still needs comprehensive integration tests.
Challenge: Privileged changes must not be accessible to ordinary visitors.
Implemented approach: Hive Keychain authentication, server-side sessions and administrative request validation.
Benefit: Administration is linked to the authorised Hive account.
Remaining issue: Security should be periodically reviewed as the administrative API expands.
Challenge: Multiple processes could attempt to execute the same full rescan.
Implemented approach in v0.9.11: Atomic lease acquisition, lease renewal, guarded writes and job ownership checks.
Benefit: The implementation is designed to prevent conflicting rescan processes from modifying shared state.
Remaining issue: Full production integration tests are outstanding.
Challenge: A Worker could terminate after claiming a job but before fully initialising it.
Implemented approach in v0.9.11: An intermediate initialisation state with expiration and recovery logic.
Benefit: The design allows abandoned initialisation to be recovered.
Remaining issue: Failure-injection testing is outstanding.
Challenge: Database reads, writes and background processing can consume platform allowances.
Implemented approach: Bounded batches, rotating auxiliary jobs and monitoring through Cloudflare metrics.
Benefit: Workload intensity is controlled rather than unlimited.
Remaining issue: Query-level optimisation has not yet been completed.
Challenge: Waiting for every Hive account to be processed would delay access to useful geographical information.
Implemented approach: The public map is based on currently stored, accepted geographical matches.
Benefit: The application can display partial results while the initial import continues.
Remaining issue: The map must clearly communicate that its coverage is incomplete.
The following history is limited to changes supported by the available project materials.
The project established:
The exact version in which every individual feature first appeared has not been independently reconstructed.
This version served as a reference point for subsequent core Worker changes.
A complete historical diff is still needed to document every change accurately.
A substantially condensed core Worker version was prepared and deployed.
During subsequent review, concerns were identified regarding the concurrency safety of full profile rescanning.
In particular, the review highlighted the risks of non-atomic job ownership and writes not sufficiently protected against stale processes.
The version was deployed, but no full profile rescan was initiated before the concerns were addressed.
This version introduced changes intended to strengthen the rescan mechanism, including:
The version was deployed successfully.
The public status endpoints reported version 0.9.11, and the existing profile importer continued operating.
However, the complete rescan lifecycle remained untested in production because the initial profile import had not finished.
The reviewed administrator API includes Hive Keychain authentication, session handling, ambiguous-location review, manual match/reject operations and account-specific override protection.
Its version number is independent of the core Worker version.
Hive Census remains under active development.
The following limitations are known or require additional verification.
The initial import has not finished.
Current geographical statistics therefore represent only processed accounts.
Hive profile locations are not independently verified statements of residence.
The application counts accounts, not unique individuals.
Some location strings cannot be resolved reliably.
The current rescan mechanism cannot be started until the initial import is marked complete.
The concurrency protections introduced in version 0.9.11 require complete integration tests.
Potential overlap between manual and scheduled indexer execution should be assessed.
Failure of the scheduled indexer currently prevents the selected auxiliary job from running in that execution.
Database indexes and expensive SQL operations require a dedicated review using actual query plans.
A complete migration history, verified schema dump and exhaustive version-by-version changelog have not yet been reconstructed.
The next development priorities are:
Continue incremental processing without discarding existing progress.
Test job ownership, interruptions, lease expiration, stale workers and preservation of administrator overrides.
Review query plans and indexes before making changes.
Prioritise optimisations with measurable benefits.
Investigate safer batch-level cursor persistence and independent scheduling of background jobs.
Publish a verified database schema, deployment configuration, administrative API reference and migration instructions.
Continue reviewing ambiguous locations and evaluating classifier and geocoder accuracy.
Several lessons from Hive Census may be useful beyond this particular application.
Blockchain protocol declarations and free-form account metadata have different semantics.
Combining them without preserving their origins can produce misleading results.
Persistent cursors are much easier to introduce during initial development than after an importer has already processed tens of thousands of accounts.
running flag is a lockConcurrency control requires atomic ownership acquisition.
For long-running jobs, it may also require expiration, renewal and fencing.
Human decisions should be distinguishable from automated classifications.
Otherwise, reprocessing can undo valuable corrections.
A geocoder returning a result does not prove that it identified the location intended by a user.
Rows read and rows written provide more useful information about D1 resource usage than the raw number of SQL statements.
Once a system has processed a substantial dataset, preserving accumulated progress becomes an architectural requirement.
A feature can be implemented, syntactically correct and successfully deployed without being fully tested.
Documentation should state that distinction clearly.
Hive Census began with a simple question: where are Hive users located?
The resulting application demonstrates that even a seemingly straightforward community map involves several distinct engineering problems.
The blockchain indexer must process data incrementally and reliably.
The profile importer must work across a large account population without losing progress.
Geographical interpretation must account for ambiguity and unreliable input.
Administrative corrections must survive subsequent automated processing.
Background jobs must avoid concurrency conflicts.
And the entire system must remain economical enough to operate on modest infrastructure.
The project has already implemented solutions to many of these challenges.
Others, particularly full-rescan integration testing and database optimisation, remain active areas of work.
I hope that documenting both the successful approaches and the unresolved problems will help other Hive developers working with blockchain data, account metadata, Cloudflare Workers, D1 or geographical applications.
Hive Census is still evolving.
The map will improve as additional accounts are imported, locations are reviewed and the processing infrastructure is refined.
The goal is not merely to place Hive accounts on a map, but to build a useful, transparent and maintainable tool for understanding the geographical reach of the Hive community.
Hive Census: https://app.hive-census.workers.dev/
Documentation snapshot: 12 October 2026
This article describes the implementation and operational state available at the time of writing. Some features remain under development or require additional integration testing.

wow, fajne
Polecam, zwłaszcza jeśli korzystasz z HiveAuth (bo ja tej metody nie sprawdzałem) 🤣
PS nie wiem czemu Warszawa jest jako 2 różne punkty
Użyłem Keychain,
Co do Warszawy jest ok, bo ja podałem swoje osiedle.
tylko z tego co pamiętam, nie zawsze to na OSM dobrze działało, różne miasta mają inaczej powprowadzane dzielnice/osiedla...