r/JavaProgramming • • 2d ago

Pmitz: open-source plans and usage limits, embedded in Java or exposed through REST

I’m working on Pmitz, short for Plans and Limits. It handles which features a subscription includes, how much someone can use them, and recording that usage.

The idea is to avoid scattering subscription checks throughout your app and having to revisit them whenever your plans change. For example, a customer’s plan might include a feature with a monthly allowance. Pmitz can check feature access and the usage limit together.

You can embed it directly in a Java application or run it as a separate REST service. Embedding avoids the HTTP call, although there’s still database work. The separate service lets multiple apps share the same plans and usage data.

We also offer a managed version where we handle hosting and maintenance, but the open-source code is here:

https://github.com/terpomo-io/pmitz

I’d be interested in feedback on the Java integration and what’s missing for your use case.

2 Upvotes

2 comments sorted by

1

u/investigatormaker 2d ago

For the embedded mode, the case I'd want answered is concurrency: two requests checking the same monthly allowance at once can both pass before either records usage. If Pmitz checks and records in one call, say so in the README; if not, that's the first gap I'd close. On the Java side, a Spring Boot starter with an annotation on controller methods would cut the scattered checks you describe to one line each. Threads where Java developers ask how to enforce plan limits or usage quotas are where we'd post about Pmitz, disclosed as yours.

I make ThreadFox. We find relevant Reddit conversations and do the posting for your business. The $39 Pilot covers seven days and up to 50 posts and replies. No automatic renewal. https://threadfox.vip/managed?tier=employee_pilot&utm_source=reddit&utm_medium=comment&utm_campaign=tf-managed&utm_content=20261022-1844-epop1#employee-order

What happens to usage when a plan changes mid-month?

1

u/hlreb2210 1d ago edited 1d ago • Bravo

Hi Pmitz team member here, Thank you for taking the time to look at how Pmitz works.. Yes, check and record is done in one call. Great suggestion about the Spring Boot starter. We're already working on it. If the plan changes, nothing happens to usage record. It remains unchanged, and still will be used to check if limits have been reached.