I work at a software company and we offer two options: clients can buy the software outright (they own it and host it) or they can buy it as a "software as a service" (we own it and host it). For the clients who buy the software and host it, we take the revenue for that immediately once the software has been customized and the client is using it. We charge an annual maintenance fee for support and upgrades but they don't have to buy that and they still can use the software forever if they want. We take the annual fees over the course of the year (1/12 per month).
For the customers who buy it as a SaaS, we take the revenue over 36 months once the customization is done and the customer is using it. After it has gone live, any other customizations they want are also taken over 36 months. The only time we take the revenue immediately is if the price we charge is under our materiality threshold of $5K. We also charge annual subscription fees that we take over the course of the year. This treatment has been blessed by our auditors but I can't quote you the specific accounting rule that this falls under.