We have been developing AR solutions for more than 5 years and have completed 30+ projects integrating augmented reality with enterprise systems. One of the frequent tasks is connecting an AR application to external databases.
An AR application for warehouse inventory shows an employee product information right above the physical box. Data is pulled from the ERP in real time. A request latency of 800 ms means the annotation appears after the employee has already looked away. This is not a UX nuance—it's a direct failure of the usage scenario. Integrating AR with external databases requires a different approach to query architecture than regular mobile applications. Our experience shows that standard solutions do not work here.
What Technical Challenges Arise When Integrating AR with a Database?
Latency in AR is more critical than in any other mobile context. The user points the camera at an object and expects an instant response. 300 ms is acceptable, 800 ms is a noticeable delay, 2 seconds makes the app seem broken.
The main sources of latency:
- Network round-trip to the server (100–300 ms on 4G, 20–50 ms on WiFi)
- Server-side query processing time (SQL query without an index on a table of 5 million rows can easily take 500 ms)
- JSON deserialization on the client
The solution is predictive loading and caching. In a warehouse AR app, when the user points at a rack, we know that the next 30 seconds they will be working with that zone. A prefetch requests data for all items in the zone in a single batch request as soon as the rack marker is recognized, storing it in a local cache. When the user points at a specific box, the data is already ready. This approach provides a 2–3 times improvement in response speed compared to individual requests.
Offline mode is the second critical point. In warehouses, industrial workshops, and medical facilities with metal partitions, the signal is unstable. The AR application must work with cached data and synchronize changes when the connection is restored. Merge conflicts (user changes quantity in AR, another user changes the same field in the ERP) are handled via timestamps + last-write-wins or via an explicit conflict resolution UI.
Architecture of the Integration Module
We build on three layers:
Data Access Layer — abstraction over the data source. IProductRepository with methods GetByBarcode(string code), GetByZone(string zoneId), UpdateQuantity(string id, int delta). The concrete implementation can be REST, GraphQL, gRPC, or direct SQLite—the AR logic layer is unaware.
Sync Engine — manages caching and synchronization. SQLite via sqlite-net-pcl on the device as local storage. A background SyncWorker polls the server every N seconds (configurable) or reacts to push via WebSocket/SignalR. Caching strategy – TTL per entity type: fast-changing data (quantity in stock) – 30 seconds, reference data (names, characteristics) – 24 hours.
AR Binding Layer — connects data to AR objects. In AR Foundation: when ARTrackedObjectsChangedEventArgs.added fires, request data for the recognized object via IProductRepository, populate ARAnnotationController with the received data. On removed, hide the annotation and cancel pending requests via CancellationToken.
For performance, we use UniTask (or ValueTask in standard .NET) instead of standard coroutines – fewer allocations, native task cancellation via CancellationToken, proper exception handling in async/await. Microsoft recommends using HttpClient as a singleton to avoid socket exhaustion (see Microsoft recommendations).
Typical Integrations in AR Projects
| Approach |
Latency |
Complexity |
Offline Support |
| REST API |
Medium (100-300 ms) |
Low |
Requires caching |
| GraphQL |
Medium (single request) |
Medium |
Requires caching |
| WebSocket / SignalR |
Low (real-time) |
High |
Complex, needs queue |
REST API (most common): HttpClient with System.Net.Http, Newtonsoft.Json or System.Text.Json for deserialization. Important: HttpClient must be singleton or pooled – each new HttpClient() opens a new socket pool.
GraphQL: particularly convenient for AR applications – request only the needed fields, get related data in one request. Use graphql-net-client or Strawberry Shake for .NET.
WebSocket / SignalR: for real-time updates – for example, AR annotations on a production line where equipment status changes every second. SignalR Core on the backend, Microsoft.AspNetCore.SignalR.Client on the client.
We do not recommend direct database connections in AR applications – it is an antipattern regarding security (database credentials in the APK) and scalability.
How to Ensure Instant Response?
The key technique is asynchronous prefetching of data in the visible area. We use spatial prefetch: when a zone marker (rack, room) is recognized, we send a batch request for all objects in that zone. This gives a 2–3 times improvement compared to individual requests. UniTask allows cancelling stale requests without allocations. Load testing shows that with 1000+ objects in a zone, 98% of requests are processed in <200 ms.
Step-by-Step Integration Plan
- Data source analysis. We study the API or database structure, determine requirements for data freshness and offline behavior.
- Designing the Data Access Layer. Interfaces, caching strategy, offline policy.
- Developing the Sync Engine. SQLite schema, background synchronization, conflict resolution.
- Integration with AR Foundation. Binding data to tracked objects.
- Testing. Scenarios: poor signal, full offline, synchronization conflicts, load test (1000 objects in view).
| Integration Scale |
Estimated Timelines |
| Simple REST + cache (100–500 records) |
1–2 weeks |
| Offline sync + conflicts |
3–5 weeks |
| Real-time WebSocket + complex data schema |
1–3 months |
Cost is determined after analyzing the data structure and synchronization requirements.
What's Included in the Work
- Development of Data Access Layer with REST/GraphQL/WebSocket support.
- Implementation of Sync Engine with caching and conflict resolution.
- Integration with AR Foundation (Unity) or Native XR.
- API and architecture documentation.
- Training your team on working with the module.
- 6-month warranty on identified bugs.
We guarantee that the module will pass load testing with 1000+ objects in view. According to Unity, proper caching reduces latency by 60%.
If you need to integrate AR with external data, contact us for a project assessment. Order a turnkey module development and get a ready solution in 2–12 weeks depending on complexity.
Example of Data Access Layer interface in C#
public interface IProductRepository
{
UniTask<Product> GetByBarcode(string code, CancellationToken ct);
UniTask<IEnumerable<Product>> GetByZone(string zoneId, CancellationToken ct);
UniTask UpdateQuantity(string id, int delta, CancellationToken ct);
}
VR and AR Development
When we first launch a project in a VR headset, most teams face the same thing: technically everything works, but in the headset either motion sickness occurs, or hands 'float' with a delay, or the scene looks jerky at the periphery. These are not bugs in the usual sense — they are a consequence of the fact that VR/AR development requires a different approach to render architecture, interaction, and UX from the very beginning of the project. Our experience: over 7 years in game dev, 15+ completed VR/AR projects for Meta Quest, SteamVR, PSVR2, HoloLens. We work with teams that need not just a prototype but a production‑ready application with a stable frame rate.
Platforms and SDKs
We work with all relevant stacks. We use OpenXR as the base layer wherever possible — it provides cross‑platform compatibility between Meta, Valve Index, HP Reverb and other PC VR devices. On top of OpenXR, we build on the XR Interaction Toolkit (Unity) or VR Expansion Plugin (Unreal). Contact us for a stack assessment tailored to your project.
| Platform |
SDK / Framework |
| Meta Quest 2/3/Pro |
Meta XR SDK, OpenXR |
| PC VR (SteamVR) |
SteamVR Plugin, OpenXR |
| PlayStation VR2 |
Sony PSVR2 SDK |
| HoloLens 2 |
Mixed Reality Toolkit (MRTK) |
| ARKit (iOS) |
AR Foundation + ARKit XR Plugin |
| ARCore (Android) |
AR Foundation + ARCore XR Plugin |
| WebXR |
Unity WebXR Export |
How to minimize motion sickness in VR locomotion?
Locomotion — the main source of motion sickness for inexperienced VR users. According to research, about 70% of users experience discomfort with improper movement settings Oculus Developer Guidelines. Teleportation — standard navigation method when smooth movement is undesirable.
Components from XR Interaction Toolkit: TeleportationArea, TeleportationAnchor, TeleportationProvider. Basic implementation works out of the box, but for production we refine it in four steps:
- Setting up
XRRayInteractor with a curved ray (Bend Ray) — the teleportation arc looks more natural than a straight ray and is perceived better by users.
- Adding a valid landing zone — a visual indicator changes color when hovering over an obstacle (red/green).
- Implementing fade transition — smooth screen fade (black fade) before teleportation reduces disorientation.
- Rotation snapping — after teleportation we offer snap rotation by 45° or 90° instead of smooth, reducing motion sickness risk.
For projects requiring smooth locomotion (action games, simulators), we use comfort settings: vignetting during movement, reducing FOV during acceleration. Settings are available to the user in the menu — different people have different sensitivity thresholds. The difference between kinematic and physics‑based movement: kinematic gives instant hand following but lets objects pass through walls; physics‑based via Joint provides realistic collisions but requires velocity damping and max joint force tuning. We choose based on the type of interaction.
How to make object grabbing in VR physically realistic?
This is the most underestimated part of VR development. Clients often perceive it as 'just hand animation', but in practice it is a complex system where physical correctness, responsiveness, and comfort conflict.
Grab (grabbing)
XR Interaction Toolkit provides three types of Interactable for grabbing:
-
XRGrabInteractable — standard grab, object follows controller via physics joint or direct position/rotation
-
XRSimpleInteractable — for objects without physical movement (buttons, levers)
- Custom Interactable by inheriting from
XRBaseInteractable
Attach Transform — a frequently ignored detail. Each Interactable must have a properly configured Attach Transform (the point where the hand 'attaches'). Without it, the pistol grip will be at the center of the mesh, not where it is held.
For weapons and tools with two‑handed grab — a separate TwoHandGrab system: leading hand determines position, the second — orientation. XR Interaction Toolkit supports this via XRTwoHandGrabInteractable or custom logic with two Attach Points.
Throw (throwing)
Velocity smoothing is critical for realistic throwing because the Rigidbody.velocity at the moment of controller release reflects instantaneous speed, often incorrect due to tracking discretization. The user makes a quick wrist movement — but the object flies half as fast.
Solution: velocity smoothing over the last N frames (typically 5–10 frames, ~80–160 ms at 60 Hz) before release. XR Interaction Toolkit does this via VelocityEstimator. Additionally, we apply a velocity scaling multiplier — a small speed increase (1.2–1.5×) makes throws subjectively more satisfying. Angular velocity (for objects that should spin in flight) is also averaged similarly.
AR: Plane Tracking and Environment Interaction
AR adds a different class of problems — working with real, unpredictable environment. AR Foundation — a cross‑platform layer on top of ARKit and ARCore. Most basic features (plane detection, raycasting, image tracking, face tracking) are available through a unified API.
Plane Detection
ARPlaneManager detects horizontal and vertical planes. Practical nuances:
- Initialization takes time — the user must look around the room while the system builds a map. An explicit onboarding with instruction 'slowly move the camera across surfaces' is needed.
- Planes are unstable — their boundaries and position are updated as data accumulates. Objects placed on a plane need to be attached via parent to ARPlane, not to world coordinates.
- Plane merging — two detected floor segments may merge into one, moving the anchor. For critical anchors, use
ARAnchor instead of direct attachment to the plane.
Image tracking (via ARTrackedImageManager) quality directly depends on the quality of reference images. Images with high detail frequency and contrasting edges (like a QR code but stylish) track more reliably than smooth logos. ARCore Geospatial API — for outdoor AR with real‑world coordinate binding (accuracy up to 10 cm in well‑mapped areas).
Optimization for VR: Frame Rate and Comfort
VR requires stable high frame rate. About 60% of development time in mobile VR goes to optimization, not functionality — retrofit costs twice as much as proper architecture from the first sprint.
| Device |
Target Hz |
Critical threshold |
| Meta Quest 2 |
72 / 90 Hz |
< 72 Hz — noticeable |
| Meta Quest 3 |
90 / 120 Hz |
< 90 Hz — noticeable |
| Valve Index |
90 / 120 / 144 Hz |
< 90 Hz — noticeable |
| PSVR2 |
90 / 120 Hz |
< 90 Hz — noticeable |
Single Pass Instanced Rendering
The main render optimization in VR. Without it, the scene is rendered twice (once per eye), doubling draw calls. Single Pass Instanced renders both eyes in one pass via instancing: geometry is processed once, the shader gets two view/projection matrices through GPU instancing. Enabled in Unity via XR Plug-in Management > Rendering Mode: Single Pass Instanced. Important: custom shaders must support SPI — standard URP/HDRP shaders support it, custom HLSL requires modifications (UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX and related macros). Applying this technique reduces draw calls by 40–50%, making it twice as efficient as naive double rendering.
Foveated Rendering
On Meta Quest, Fixed Foveated Rendering (FFR) is available — reducing resolution at the periphery where visual acuity is lower. Configured via OVRManager or Meta XR SDK:
OVRManager.fixedFoveatedRenderingLevel = OVRManager.FixedFoveatedRenderingLevel.High;
OVRManager.useDynamicFixedFoveatedRendering = true;
Dynamic FFR automatically increases the level when frame rate drops — more convenient than fixed in scenes with variable load.
IPD and Comfort Settings
IPD (Inter‑Pupillary Distance) — affects depth perception. At the programmable level on most devices, only reading IPD is available (OVRPlugin.GetSystemDisplayFrequency), physical adjustment is on the headset. For applications requiring precise positioning (medical simulators, training), we account for IPD in scene scale calculations.
Haptics
Haptic feedback — an underestimated tool. Even a simple vibration response when grabbing an object or hitting significantly increases the sense of presence. On average, integrating haptic patterns takes 30–80 hours per project.
XR Haptics via OpenXR:
var hapticImpulse = new UnityEngine.XR.HapticCapabilities();
InputDevice device = InputDevices.GetDeviceAtXRNode(XRNode.RightHand);
device.SendHapticImpulse(0, amplitude: 0.5f, duration: 0.1f);
For complex patterns (tactile 'texture' of a surface when touched, increasing vibration when drawing a bowstring) we use Meta Haptics Studio — allows designing haptic clips visually. This can reduce time spent on manual haptic tuning by about 30%.
What does VR/AR application development include?
When ordering a turnkey project, we provide the following deliverables:
- Architectural document with stack description, render logic, and interaction system
- Working prototype (MVP) for testing on target device
- Integration of necessary SDKs (Meta XR, OpenXR, AR Foundation, etc.)
- Optimization for target frequencies 72/90/120 Hz with draw call and FPS profiling
- Testing on physical hardware (Quest, SteamVR, HoloLens) with user involvement
- Full documentation for build, deployment, and support
- Training for the client's team (workshop on XR Toolkit)
- Warranty support for 1 month after delivery
What affects cost and timeline?
VR/AR projects are more expensive than regular games of similar scope. Iterations are slower — each fix must be tested in the headset, an emulator does not convey the real experience. Motion sickness forces reworking some conceptual decisions after the first playtest. Optimization takes a significant portion of time — for mobile VR (Quest) up to 60–70% of the cycle. For Quest projects, we start optimization from the first sprint. The cost of basic SDK integration (XR Interaction Toolkit) varies depending on the scope of custom Interactable. Typical budgets for a full Quest project range from $25,000 to $80,000 depending on complexity, number of custom interactions, and depth of optimization. Proper architectural planning from sprint one typically saves 40% on later rework compared to fixing performance bottlenecks retroactively.
Get a consultation on your project — we will assess the task, stack, and timelines. Order turnkey VR/AR application development with a guaranteed stable frame rate.