-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple restful api example or websockets example #331
Comments
regarding this question: the biggest question in my head for a simple REST API is - for each incoming request - should I do work with a worker verticle or can everything be done in the main verticle? Where do I need to do locking, if anywhere?
? |
You should only work with a worker verticle if you're dealing with "blocking calls" (i.e. non NIO calls). For instance, if you're using the reactive pg driver, the official redis driver, the official mongodb driver, etc. You don't need any worker verticle at all, just a standard one. If you're dealign with blocking calls sporadically, then go with These topics are covered in the documentation. |
@aesteve my biggest question is if we use 1 verticle, if all my code is running in the same thread (that way I can avoid the need to explicitly lock). |
I would be really nice to be able to clone a simple project that does RESTful API and a simple project that does websockets, devising the project structure o/w leaves lots of questions, better to have some structure determined already?
The text was updated successfully, but these errors were encountered: