[quote=427790:@Scott Cadillac]Thank you James, I appreciate your technical feedback.
By day-job is as a Web developer using a competitor’s platform. The rules behind Web-based Session management that most platforms support out-of-the-box, so to speak, are pretty straight-forward. Nearly all of them are based on having Session scope variables loaded into RAM of the application server (where the memory store for each Session is indexed by your session-cookie value).
It’s not necessarily a wrong thing to do, because this kind of built-in Session management makes the job of a Web developer much easier, for less demanding projects. And of course I have no idea how Xojo Web implements their Sessions, so this is not meant as a criticism of Xojo.
Well, about 15 years ago or so, I built a custom version of the common Session management rules, where these rules and its associated data all resides in my App’s database (indexed by the decrypted session-cookie value). This change allowed me to turn off Session scope on the App server - then guess what? Boom, I had a high-performance low-memory consuming web app that supported round-robin (non-sticky) load-balancing - allowing thousands of concurrent users. All my projects since are based on this custom Session management database design. This part of my apps has proven pretty solid over the years (on more than one competitor’s platform).
If you look at any popular website built say in the last 10 or 15 years, that have subscribers in the millions - I’d be extremely surprised if any of them are using the built-in (RAM based) Session management that comes with their platform.
Anyway, I was just wondering if I could do the same with a Xojo Web app. Because I have a personal project coming up and was wondering about giving it a go.
Thanks again James.[/quote]
So the primary challenge of sessions in Xojo is object serialization. Thats something Xojo just doesnt have. Theres no way to store all the objects Xojo uses per session in a database that can be recalled by another instance. The sessions reside in memory and must stay there. I went through many possibilities for session storage web initially Xojo Web Edition, even tried to get and restore a ram dump. Long story short, its not happening.
You can of course assist sessions with your database. You can load variables of your choosing into a new session based on any logic you choose.
Imagine Xojo Web is running a desktop app on the server and the browser is just a remote viewer for that app. Thats more or less what Xojo is doing. So you can imagine how hard it would be to move your running desktop app to another machine without the app noticing. Now imagine the Xojo framework has to do that without requiring input from the developer. Its just way too impractical.
Trust me, as a traditonal web developer, I tried very hard for sessions to behave as you describe. It just isnt happening without an extensive automatic serialization framework for Xojo.