Case study / Real-Time AI Product Infrastructure

Real-time License Plate Recognition Backend

A Go backend that turned live camera and video input into a dependable operator workflow around an R&D-owned recognition model.

Backend Software EngineerProfessional workAnonymized on-premise platform

At a glance

Case Brief

I built the backend around an R&D-owned recognition model so live camera and video input could become a dependable operator workflow. My work covered camera lifecycle management, live delivery, resource-aware frame handling, access control, offline licensing, and release operations. I designed for the conditions the product would actually face: unreliable video sources, native-memory pressure, constrained deployments, and the need to control who could use which capabilities. The result was a clearer, more manageable path from video input to an operator-facing product—without claiming ownership of the model or private performance results.

Selected system story

Follow the product path from source to operations.

Select a stage to see what it does and the engineering decision behind it.

Stage 01 of 05: Camera or video source

Stage 01 / 05

Camera or video source

An operator registers and manages a live source or uploaded video.

Engineering judgmentGive each source a real lifecycle instead of treating input as a one-off request.

  1. Camera or video source. An operator registers and manages a live source or uploaded video. Give each source a real lifecycle instead of treating input as a one-off request.
  2. Intake and lifecycle control. The backend starts, stops, reconnects, and distributes frames while keeping source control separate from downstream work. Keep operational control and frame processing as distinct responsibilities.
  3. Live operator experience. Current frames and recognition-related results become something an operator can use, not just a technical event. Optimize for a useful current view when conditions change.
  4. Controlled access. Role permissions and offline entitlements decide who can act and which capabilities can run. Keep user authorization separate from product licensing.
  5. Deployment and operations. Packaging, activation, health states, and recovery guidance make the system manageable in constrained environments. Treat the release path as part of the product, not an afterthought.

Architecture evolution

We changed the frame boundary when the system asked us to.

The path moved from gRPC to IPC and then to ZeroMQ as the real constraints of the pipeline became clearer.

Frame transport architectural evolutionA left-to-right timeline labelled gRPC, IPC, and ZeroMQ. It presents an architectural evolution rather than a comparison of protocols. gRPC IPC ZeroMQ Initial boundary Local iteration Final public-safe design Frame transport architectural evolutionA left-to-right timeline labelled gRPC, IPC, and ZeroMQ. It presents an architectural evolution rather than a comparison of protocols. gRPC Initial boundary IPC Local iteration ZeroMQ Final public-safe design
An architecture decision record, not a protocol ranking.

Diagram summary: The frame path evolved from gRPC to IPC and finally to ZeroMQ as the operating constraints of the pipeline became clearer.

Final platform flow

From a live source to a result an operator can use.

A public-safe view of the product path around the recognition model—without exposing model internals.

Final ANPR platform flowA left-to-right flow from camera or video source through intake and stream control, ZeroMQ frame transport, inference integration, and persisted or live operator result. Camera / video source Intake and stream control ZeroMQ frame transport Inference integration Persisted / live operator result Final ANPR platform flowA left-to-right flow from camera or video source through intake and stream control, ZeroMQ frame transport, inference integration, and persisted or live operator result. Camera / video source Intake and stream control ZeroMQ frame transport Inference integration Persisted / live operator result
Final public-safe platform flow.

Diagram summary: Camera or video input moves through intake and stream control, ZeroMQ frame transport, inference integration, and a persisted or live operator result.

Pressure and recovery

Keep the operator view useful when conditions change.

Pressure and camera interruption are normal conditions, so the system needs clear recovery paths.

Pressure and recovery flowA left-to-right flow from load or camera failure through queueing, controlled frame dropping, and reconnect behavior to fresh operational visibility. Load or camera failure Queue Controlled frame dropping Reconnect Fresh operational visibility Pressure and recovery flowA left-to-right flow from load or camera failure through queueing, controlled frame dropping, and reconnect behavior to fresh operational visibility. Load or camera failure Queue Controlled frame dropping Reconnect Fresh operational visibility
Fresh visibility is prioritised over carrying an unbounded backlog.

Diagram summary: When load or a camera failure occurs, queues, controlled frame dropping, and reconnect behavior support fresh operational visibility.

Offline product control

Keep a local deployment under control without a permanent connection.

A public-safe view of how local activation and controlled access support the people using the product.

Offline activation and controlled access flowA left-to-right flow from offline installation through local activation and licensed services to a controlled operator workflow. Offline installation Local activation Licensed services Governed operator workflow role permissions + product entitlement
Product entitlement and user permissions are separate controls.

Diagram summary: An offline installation is activated locally, enables licensed services, and provides a controlled operator workflow.

Context

This was a real-time number-plate recognition product built for environments where cameras, local infrastructure, and network conditions could not be assumed to be reliable. The recognition model was only one part of the experience. Operators still needed to add sources, start and stop them safely, see what was happening live, and keep working when a camera or connection misbehaved.

The product also had to run in constrained, on-premise environments. That made access control, offline activation, packaging, and recovery part of the backend work—not work to be figured out after delivery.

The Product Challenge

The challenge was to make a set of interdependent concerns work together: continuous video input, a usable operator experience, native-memory behavior, access control, product licensing, and offline deployment.

A camera pipeline is not a typical request-response feature. Input keeps coming, sources fail independently, and native libraries can allocate memory outside Go’s heap. Meanwhile, operators need a current, understandable view—not a system that quietly piles up stale work. The backend needed clear boundaries that made those conditions manageable.

My Scope

I designed and implemented the infrastructure around the R&D-owned recognition model. That included source lifecycle management, frame and live-delivery integration, persistence, licensing and access controls, deployment packaging, and the documentation that helped the team connect the pieces.

The R&D team owned model research, training, selection, and internals. My job was to make the model’s output useful in the product: take a controlled source and turn it into a result an authorized operator could use. Keeping that boundary explicit meant the platform could evolve without every change becoming a model change.

Making Camera Input Operable

I treated a camera or uploaded video as a managed product resource. An operator could register a source, activate it, stop it, update it, or remove it through a lifecycle that stayed separate from frame processing. That separation mattered: stopping a source had to release runtime work cleanly, not just flip a status in the interface.

Interruptions were expected. The intake path could reconnect after temporary failures and keep the rest of the service available while a source recovered. Live delivery gave operators a current view, while persistence and product integration made the result useful beyond a single transient frame.

Keeping the CGO Video Pipeline Stable

The hardest reliability problem appeared where Go met native video libraries. The Go heap could look small while process memory remained high, because OpenCV buffers and related allocations live outside the Go heap. Treating that as an ordinary garbage-collection issue would have missed the real risk.

I addressed it in two layers. First, the capture path made ownership explicit: native image and encoding buffers were reused where appropriate and closed as soon as their data had safely moved into Go-managed memory. Second, the runtime image used jemalloc to better handle a concurrent native workload with variable allocation sizes.

The result is deliberately described without numbers. Memory pressure became a design and testing concern, and camera start/stop cycles were built to leave the service in a more predictable state. It is a practical example of why CGO resource lifecycle belongs in backend reliability work.

Designing for Freshness, Not Backlog

For a live operator, an old frame can be less useful than the next one. I designed bounded, non-blocking paths so a slow consumer could fall behind without stopping source capture or every other viewer.

That was a product decision as much as an engineering one. The system did not promise to preserve every frame under pressure. It made the trade-off clear: protect a current view, make recovery visible, and do not let an unbounded backlog quietly redefine the experience.

The frame boundary itself evolved from gRPC to IPC and then to a ZeroMQ-oriented design as the constraints became clearer. The point was not to crown a winning protocol. It was to find a cleaner separation between source control and downstream work. The ZeroMQ boundary was built as a decoupled, downstream-ready path; this case study does not claim that every deployment used an active end-to-end Core AI frame stream.

Keeping an Offline Product Under Control

The product needed to stay manageable without depending on a permanent internet connection. I designed and implemented an offline activation flow that connected product entitlement to a local installation and enabled approved capabilities in a controlled way.

Licensing and user permissions answered different questions. Role-based access decided whether a user could manage a source or view a live stream. Licensing decided whether the installed product was entitled to run a capability at all. Internal services used short-lived credentials over mutually authenticated channels, so entitlement was enforced beyond the user interface.

This is not a broad security claim. It is a practical control model for the environment the product was built for: local activation, clear locked and ready states, and controlled access to product capabilities.

Release and Operations

I treated packaging and operations as part of delivery. The release path supported offline installation, local activation, health states, and backup/restore considerations. Operators could bring the system up, understand whether it was ready or locked, and recover local operational state without relying on an undocumented manual process.

The same documentation also made ownership clearer. It gave the team a shared way to reason about sources, live behavior, access, and recovery as one system instead of a collection of separate services.

What Shipped—and What Was Still Next

The platform progressed through a pilot and a production release path. Camera lifecycle control, live delivery, recovery-aware stream handling, offline activation, and controlled access were all part of the delivered platform work.

Some work was still in progress, so it is not presented as an outcome here: quantitative license limits, immediate offline revocation, fully persisted reconnect state, fully wired operational metrics, and a universally active end-to-end Core AI streaming path. Being clear about that distinction matters. It separates what the team delivered from what the next iteration needed.

Lessons Learned

I learned that real-time reliability is not only about throughput. It is about deciding what stays useful under pressure, who is allowed to act, and whether the system can actually be installed and run in its target environment.

I also learned that a healthy Go heap does not automatically mean a healthy video service, and that licensing is more than a commercial switch. In an on-premise product, memory ownership, access control, offline activation, and release operations are all part of the same backend responsibility.

Ownership

Responsibilities

  • Designed and implemented the backend platform around an R&D-owned recognition model.
  • Built the camera and video path: lifecycle control, live delivery, persistence, and recovery-aware stream handling.
  • Addressed native-memory pressure across Go, CGO, and OpenCV through explicit resource ownership and runtime packaging.
  • Designed and implemented role-based access and offline, device-bound product licensing.
  • Contributed release packaging, operational documentation, and the deployment path for constrained environments.

Engineering judgment

Key Decisions

Separate camera operations from frame processing

A source needs a clear lifecycle—register, start, stop, recover—not hidden behavior inside a processing loop.

Treat native memory as a first-class concern

Go heap metrics alone could not explain memory behavior in a video workflow that relied on native libraries.

Prioritize freshness over an unbounded backlog

For a live operator, the next current frame is often more useful than a delayed replay of every old one.

Make licensing part of the platform, not a UI switch

Offline activation, product entitlements, and user permissions needed to control service access as well as the interface.

Treat packaging and operations as delivery work

The system only becomes useful when it can be installed, activated, observed, and recovered where it will run.

Constraints

Trade-offs And Outcomes

Fresh operator visibility / Retaining every frame under pressure

Bounded, non-blocking delivery keeps a slow consumer from turning a live view into stale work.

Explicit native-resource ownership / Relying only on garbage collection

Closing native buffers deliberately adds discipline, but makes memory behavior easier to reason about in a CGO workload.

Offline, device-bound activation / Always-online license checks

The product could work in constrained environments while keeping capability decisions under control.

Public-safe system detail / Publishing internal implementation and security material

The story explains the engineering decisions without exposing customers, credentials, trust material, or private configuration.

  • Created an operator-ready path from camera or video input to live and saved product results.
  • Made camera lifecycle, recovery, and native-memory behavior part of the backend design.
  • Added offline activation and controlled service access to the product platform.
  • Supported a pilot and production release path with packaging, documentation, and recovery-oriented workflows.