SMPP (SMS) protocol plugin built on the Wasm SDK, plus a few plugin-behaviour questions #11946
Unanswered
MadhuAithal
asked this question in
Q&A
Replies: 1 comment 1 reply
|
A follow-up from testing the plugin behind a real SMS gateway (Jasmin), With the default
At 16384 the gateway ↔ operator hop was also complete (37 submits incl. 5 throttled, 32 receipts). Two questions:
Write-up: https://github.com/MadhuAithal/deepflow-smpp-plugin/blob/main/FINDINGS.md (#9), lab in |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi DeepFlow team,
I've built a Wasm plugin that teaches deepflow-agent to parse SMPP 3.4, the protocol
that carries SMS between messaging platforms and telecom operators (port 2775 by convention):
👉 https://github.com/MadhuAithal/deepflow-smpp-plugin
What it reports, with zero changes to the SMS application:
submit_sm→submit_sm_resplatency, paired bysequence_number(works with SMPP windowing / out-of-order responses)ESME_RTHROTTLED, classified as server-side vs client-side errorsdeliver_smwithDELIVRD/UNDELIV), linked to the original message via the operator message IDTested on DeepFlow v6.6 (Docker Compose server and a host agent on Ubuntu) against a local
fake SMSC. In the test run the delivery report built from
l7_flow_logmatched the SMSC's ownlog exactly (20 accepted, 17 delivered, avg submit latency 276 ms).
While building it I ran into a few behaviours I couldn't find in the docs. They're written up in
FINDINGS.md. Three
of them I'd especially like your view on:
1. Plugins of 1 MiB or more can't be fetched by the agent.
Before the agent receives its group config, its gRPC client seems to use a 1 MiB max message
size, so fetching a larger plugin fails with
message length too large: found 1048628 bytes, the limit is: 1048576 bytes.With Go 1.27 + TinyGo 0.43 the SDK needs the default scheduler (it fails under
-scheduler=none),which grows the plugin to ~1.4 MB. Go 1.21 + TinyGo 0.30 with the documented flags gives ~830 KB
and works.
→ Could plugin fetch use a larger limit by default, or could the docs pin the supported
Go/TinyGo versions?
2. No reassembly across reads for plugins.
OnParsePayloadsees one syscall's worth of bytes. Many SMPP clients (Python smpplib, thecommon Java
DataInputStreampattern) read the 4-byte length and then the body in separatecalls, so on that side no single read contains a whole PDU. For now I emit header-only records
when a PDU is cut off, and capture on the side that receives whole PDUs.
→ Is there a recommended way for a plugin to keep per-flow state across calls, or is
reassembly for custom protocols on the roadmap?
3.
IsAsyncand direction.I first set
IsAsync=truebecause SMPP responses arrive out of order, but this turned offsession aggregation entirely. Leaving it unset and using
RequestID = sequence_numberpairscorrectly. Separately, for server-initiated requests (
deliver_sm),IsReversedswaps theports, and
typestill seems to follow packet direction.→ Is that the intended usage? If so I'm happy to send a docs PR clarifying
IsAsyncandIsReversedfor protocols where both sides send requests.Feedback on the plugin itself is very welcome. I'd also be glad to contribute it as an example
in deepflow-wasm-go-sdk if that would be useful.
Thanks for DeepFlow. The plugin SDK made this possible in a few hundred lines.
All reactions