Can we make Hilla project completely in spring flux instead of Web Mvc ?

I want to make completly hilla project in spring flux.

@secure-leopard @yummy-rhino Guys Please put your valuable comment here.

What you are actually trying to solve? I am a bit puzzled why you mention Web MVC as Hilla is not …

I think Hilla still use Spring MVC and achieves reactive features using reactive library. I created a demo and logs the threads names and it gives the different thread inside the flux and outside the flux so my concern is additional thread. I have lot of users and that creates lot of problem in spring MVC, Every time we go for increase a resource like RAM. So Want to know that is it possible to create the application completely on web flux without MVC.

If I understand the question correctly, what the OP is asking is whether java server side @endpoints(RPC calls) can be supported by web Flux.

Hilla itself is a client side framework/library.

Tomcat, assuming this is what is being used, operates on a one-thread-per-request model, which means that a substantial number of concurrent requests could tie up threads in thead pool.

With java 21 virtual threads, it may not matter as much, if most of the work is IO bound.

OP:

If you are using Java 21 and Spring Boot, try using virtual threads to see if that resolves the memory issue. Virtual threads require less memory and have lower overhead compared to platform threads.

In fact, some argue that virtual threads could eventually replace the reactive model in future, as they are easier to reason about, and provide a similar performance to reactive model.

More about that here: https://spring.io/blog/2022/10/11/embracing-virtual-threads/

@yummy-rhino would you happen to know if java server side @endpoints be supported by web Flux? virtual threads I assume would be supported.

Yes, Hilla supports reactive end points hilla-v2-demo/src/main/java/com/example/application/services/EventEndpoint.java at master · TatuLund/hilla-v2-demo · GitHub