Mark wrote:
And @Torlando, if you're reading this and there's anything additional I can do here to get this running smoothly, let me know. It's possible that we could add a memory-optimized mode/flag, that changes parts of the core behaviour towards a much more aggressively memory-optimized profile.
There's several instances of low-hanging fruit, where this could be applied quite effectively, I think. Especially now with the new DB-backed storage backend, and for a client application, almost everything can be kept out of live memory.
It's always a balance with these things though, since a when you do have the memory available, you want to actually use it constructively, which is very much needed on transport nodes, and such.
But there's a very good possibility we can squeeze this down a lot more by some simple tweaks with a dedicated, memory-optimized mode.
And jeez, 50MB of memory as a hard-kill limit. That's harsh man.
Thanks Mark! As K8 mentioned, incoming resources are something to look at. Not sure if it could be written to disk and freed per packet or something but receiving a ~30MB attachment indeed gets it killed (I haven't tested thoroughly to find the maximum file size that works, but I figure this will depend on whether the user is connected to a busy TCP server anyway). I do think a low memory mode would be useful regardless.
123321 wrote:
The way Columba is using the VPN extension is a workaround that Apple won't approve in the App Store. This is not to say it is wrong, or that we should be catering to Apple's rules and monopoly, but it is something to consider.
I say this because, if the purpose is to build it with the idea that it can never escape TestFlight or local builds, then I think Apple offers better extensions and workarounds that can be used which won't be so limiting to just 50MB.
And of course if the plan is to eventually escape TestFlight, before putting too much time or thought into the workaround, perhaps consider the likelihood of Apple allowing it under how it works now, and their written policies.
Hopefully this is all known, though.
I have tried several different approaches and the Network Extension seems to be the least-bad way to get it working. The LLMs also tell me Apple might not approve it since their wording is a bit contradictory, but as K8 said I'm hoping the existence of Orbot is enough of a precedent. If not, well... iOS may have to go through a similar route as Meshtastic by requiring an external device paired on bluetooth to act as a transport node. I do have a toggle in the app that switches the RNS runtime to be entirely in-app. This is much less ideal for a lot of reasons, and can get the user blocked by the default Backbone fast flapping settings pretty easily. I do have both of the blueteooth background modes enabled, so it may be the case that simply having an RNode connected will keep the app's RNS instance alive indefinitely, but these things take a lot of experimentation, trial, and error to find something that works. There's also a scheduled background job that will sync from propagation nodes on a shorter-than-usually-recommended timer to get around the fact that if RNS lives in-app it won't reliably be online to get messages directly. All of that becomes unnecessary if the Network Extension runs RNS though.
Anyway, @123321 definitely don't assume that I know of a better extension for this, because I don't :) This is my first iOS app and my daily driver is android.