welcome to r3almx re-imagine. This repo is a re-write of r3almx backend going from python's FastAPI to java's SpringBoot.
python's GIL limits python's too good to be true nature. Java offers real concurrency whereas python switches from task to task in a serial manner. Since r3almx is primarily a real-time app, we cant rely on python to handle tasks and websockets and expect our instances to scale well horizontally. Too many times i've ran into debugging issues caused by weakly typed nature of python. Although we can use comprehensions and other functional methods and produce a very nice solution for data aggregation and response building etc, it ends up costing mis-firing of events and unreliable response times. Java finds a nice balance between strongly typed and still providing a decent amount of generics control. There's countless patterns in java as its an object oriented language. Patterns such as the Bean pattern and Repository-Service patterns are extremely mature and as a backend developer who's been writing backends/RESTful APIs in python, the enforced patterns extremely easy to pick up. Throughout my 4 years of experience writing Backend code and logic, i've matured as a developer and produced many different backend system designs and towards the end of my python crusade and exploring other frameworks, I had realized that I was naturally started implementing SpringBoot's Bean and Repository-Service pattern in my python backends, quite sloppily of course, however after writing some SpringBoot APIs, patterns started emerging and picking up SpringBoot was extremely easy and natural. Something I designed organically in my freeform backend designs, was something that was a standard in another framework. SpringBoot is extremely matured and is used world-wide and is the first choice for enterprise backend implementation whereas FastAPI is not recognised anywhere. Although using popularity as a choice maker is quite shallow, maturity comes with an ecosystem. Python's FastAPI doesn't have an ecosystem however python offer's an extremely vast ecosystem, with the likes of SQLAlchemy which is a tremendous ORM and is extremely powerful. However, Java offers the same features along with java's speed, performance and security.- Register
- Email and Password
- OAuth through google
- Login
- Email and Password
- JWT generation
- Google's OAuth
- Websocket
- Authenticate
- Receive
- Broadcast
- Room Manager
- Init RabbitMQ Queue
- rooms Dict[str, set]
- rabbit_queues Dict[str, rabbitmq_queue]
- rabbit_channels Dict[str, rabbitmq_channel]
- broadcast_tasks Dict[str, tasks]
- Connect User
- Disconnect User
- Add message to Queue
- Add message to cache
- Populate Cache
- Start Broadcast Task
- Stop Broadcast Task
- Init RabbitMQ Queue
- Digestion Broker
- Delete Message
- Parse Timestamp
- Add Message
- Flush To DB
- Start Flush Schedular
- Room
- Create
- Read
- Edit
- Delete
- generate invite key
- Invites
- Fetch
- Update Invites
- Join Room
- Channels
- Create
- Read
- Edit
- Delete
- Messages
- Create
- Read
- Delete