Designing a Loyalty Rewards Program System in Julia

Hello everyone,

I am currently exploring the idea of building a system in Julia and would like to get some guidance from the community. The goal is to design a loyalty rewards program that can handle user points earned through activities or purchases, support tier-based membership levels such as Silver, Gold, and Platinum, manage reward redemption logic, maintain transaction history, and also provide basic analytics on user engagement and points usage trends.

I am considering Julia for this project mainly because of its strong performance and capabilities in data processing, especially for analytics-heavy components of the system.

I have also been reviewing how modern membership systems, including the MembershipAnywhere platform, structure loyalty programs where organizations motivate customers to engage more actively by offering incentives and rewards. The core idea is to encourage repeat engagement and long-term participation through a structured rewards mechanism tied to user activity.

I would like to understand what would be the best architectural approach to design something like this in Julia. I am also interested in knowing which packages would be suitable for database integration, such as PostgreSQL or MySQL, as well as options for building APIs, whether REST or GraphQL. Additionally, I would like to know how authentication and session management are typically handled in Julia-based applications.

Another question I have is whether it makes sense to separate the core rewards engine written in Julia from the API layer, or if it is better to keep everything within a single Julia-based backend. If anyone has built similar systems or has experience with such architectures in Julia, I would really appreciate any insights or examples.

This would be used in a membership-based platform where users earn and redeem rewards through engagement, so any architectural suggestions or package recommendations would be very helpful.

I am wondering if you may have misunderstood something about Julia.

While it can be used as a generic programming language, its comparative advantages are absolutely outside this use case.

It is true that seasoned Julia users use it for a lot of things, because they already know Julia so it is more convenient. But if you are just learning the language for this particular project, you may be better off learning an entirely different one.

I agree with Tamas and I think you’re on the wrong track. To me, this sounds like you’re going to be doing a lot of web development, and therefore will need to choose an appropriate web stack for that, along with maybe a systems programming language (e.g. Rust) for the rewards engine. It’s hard to say though without more details. It’s not that Julia can’t do this necessarily, it just seems like you’d be trying to drive a square peg through a round hole.

I’m a bit surprised by those answers, as I would say this is a typical use case for Julia… :sweat_smile:

If I understand correctly, you would build the data-analysis pipeline in julia which would be the back-end for a web component. Am I right?

There are quite a few examples out there doing exactly this. There are some studycases on the juliahub Web page if I remember correctly.

Welcome @jianclint! I’ve temporarily put this topic on hold and unlisted it; just respond to me and I can happily re-list it.

I believe you are correct that this is doable in Julia, but there is a lot more to programming than quickly processing data, and Julia users tend to be honest about more mature tools with bigger user bases, especially at an outset of a project with vague and broad details. Unless Julia’s ecosystem is particularly good at something that hasn’t been revealed or I failed to spot, I’m inclined to agree with the others so far.

Just to throw my 2 cents in for OP’s perception of Julia’s performance:

  • Julia is performant in the sense that it has features designed for an optimizing compiler. That’s true for many other languages, and different features make different performance-related behaviors easier to accomplish. For example, if language-level reliability on objects being allocated on the heap or not is desirable, one might lean toward Zig and might resort to Rust or C++, Julia being much farther down the list.

  • Julia processes are HEAVYweight, >1GB and often seconds for me to fire one up even to just run 1 script. Obviously lightweight coroutines and multithreading in a long-running process are used these days, and Julia does have the stackful Tasks and a M:N scheduler. But that’s true for many other languages as well, and those languages might be industry standards for backend development. For example, Go also has stackful goroutines and a M:N scheduler, and it has dynamic stack sizes and an incremental garbage collector precisely for more responsive servers.