Skip to main content

Building a Reliable Event-Driven Payment Service With XRP Ledger

1 month 1 week ago
by Emma Clapp

Receiving a transaction notification is only the first step. Production software still has to decide whether that event is safe to turn into application state.

A WebSocket callback can arrive in milliseconds. What happens afterward is harder. The XRP Price may be the public-facing metric most people associate with the asset, but developers integrating the XRP Ledger have a different concern. A long-running service has to detect transactions, determine whether their outcomes are final, and update local application state without acting twice or acting too soon.

When an XRPL Event Actually Means Something

A WebSocket connection can save an application from constantly polling for new activity. On a Linux service, that means keeping the connection open and listening for the XRP Ledger events the application cares about.

The XRP Ledger’s subscribe documentation explains how applications can listen for ledger activity, transactions, and account-related events. The transactions stream reports transactions associated with closed ledgers. The transactions_proposed stream goes further and can include proposed activity that never reaches a validated ledger.

That makes an incoming notification useful, but not necessarily authoritative. A service that treats every notification as an instruction to change business state can act before the ledger has established a final result.

For a payment service, the event is where processing begins.

Validation Comes Before Fulfillment

Transaction notifications can include a validated field. When validated is true, the transaction has been included in a validated ledger and its outcome is final.

A service might see a payment involving an account tied to an order and immediately tell a fulfillment system to release the product. If that payment came from proposed activity and has not reached a validated ledger, the application has acted before it knows the final outcome.

Validation is only the first check. Transaction metadata also includes TransactionResult. A transaction can be final without producing the successful result the application expected, so inclusion in a validated ledger should not be treated as proof that a payment succeeded.

For payments, delivered_amount is the field that shows what actually reached the destination. That can matter when the amount requested and the amount ultimately delivered are not identical.

Before an order changes state, the service needs to know whether the transaction is final, whether it succeeded, and what value actually arrived.

Go to Full Article
Emma Clapp

Apple Launches HomeView, Its First Smart Display For the Home

1 month 1 week ago
Apple has unveiled the $299 HomeView, a 7-inch smart display that combines Siri AI, FaceTime, customizable widgets, and Apple Home controls in a countertop or wall-mounted design. It also acts as a Matter controller and Thread Border Router, supports up to six facial-recognition profiles, and can use personal context from messages, calendars, and email when paired with a nearby Apple Intelligence-capable iPhone. The Verge reports: The device's square shape makes it feel less imposing than larger smart displays like Google's Nest Hub Max or Amazon's Echo Show 11, and I can see it fitting nicely on my kitchen counter -- though it might be a hair too big for my bedside table. The HomeView is the centerpiece of Apple's new push into the home. It costs $299 and launches alongside a new collection of cameras, thermostats, and a door lock designed for Apple Home. As a smart home hub, Matter controller, and Thread Border Router, the HomeView can orchestrate these and other Apple Home and Matter smart home devices. It's available in eight countries at launch: the US, UK, Canada, Australia, New Zealand, Singapore, South Africa, and India. Pre-orders are open now, with devices shipping November 13th.

Read more of this story at Slashdot.

BeauHD