Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active July 5, 2021 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/8b2b52ca341285c15de7d4a9257f3f54 to your computer and use it in GitHub Desktop.
Save AdamBien/8b2b52ca341285c15de7d4a9257f3f54 to your computer and use it in GitHub Desktop.
88thAirhacksQ&A.md

Ask questions and see you at July, 5th, 8.PM. CET: https://youtu.be/4Eh1aKc5SS4

Also checkout recent episode:

87 airhacks.tv

Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks

@geziefer
Copy link

geziefer commented Jun 9, 2021

When running applications in cloud environments, with having all the serverless services and small runtimes like Quarkus, is using a classic Jakarta EE App Server like you proposed in several talks still your recommendation or would you rather use the former too?

@thehpi
Copy link

thehpi commented Jul 1, 2021

I have a service where I use @RolesAllowed but sometimes in a method I have secondary permission checks. What exception would you use to signal an authorisation problem. I currently use EJBAccessException but I'm not sure if this is the right one. I'm also wondering if this e.g. will also be wrapped in an EJBException as its a subclass.

@dabkhazi
Copy link

dabkhazi commented Jul 1, 2021

Hi Adam!
Please tell how to properly organize the search for rest resources by multiple criteria. What is the correct rest method to use in this case, get or post? How to pass a set of search criteria (via an json object or as url query parameters? Do we need a separate rest entry point for search ?

@dwamara
Copy link

dwamara commented Jul 4, 2021

Hi Adam!
Please tell how to properly organize the search for rest resources by multiple criteria. What is the correct rest method to use in this case, get or post? How to pass a set of search criteria (via an json object or as url query parameters? Do we need a separate rest entry point for search ?

  • I don't know what Adam's take on this one is but in my projects (which all use rest resources), I always use POST as rest method for search with multiple criteria because in my mind I always think that some day or another, I would try to build a form to handle it on the frontend and I wouldn't like to get the URL polluted with an endless list of parameters which will make it just longer for no reason. And I use a JSON object for that
  • My entry point is normally /<resource_name>/search.

D.

@dabkhazi
Copy link

dabkhazi commented Jul 5, 2021

Hi Adam!
Please tell how to properly organize the search for rest resources by multiple criteria. What is the correct rest method to use in this case, get or post? How to pass a set of search criteria (via an json object or as url query parameters? Do we need a separate rest entry point for search ?

  • I don't know what Adam's take on this one is but in my projects (which all use rest resources), I always use POST as rest method for search with multiple criteria because in my mind I always think that some day or another, I would try to build a form to handle it on the frontend and I wouldn't like to get the URL polluted with an endless list of parameters which will make it just longer for no reason. And I use a JSON object for that
  • My entry point is normally /<resource_name>/search.

D.
With this approach, I do not like that the search keyword is used in the path to the resource. That is, the path contains an operation with data, but to specify an operation on a resource, you need to use the http method. Perhaps I am mistaken and do not correctly interpret what I have learned.

@dwamara
Copy link

dwamara commented Jul 5, 2021

Hi Adam!
Please tell how to properly organize the search for rest resources by multiple criteria. What is the correct rest method to use in this case, get or post? How to pass a set of search criteria (via an json object or as url query parameters? Do we need a separate rest entry point for search ?

  • I don't know what Adam's take on this one is but in my projects (which all use rest resources), I always use POST as rest method for search with multiple criteria because in my mind I always think that some day or another, I would try to build a form to handle it on the frontend and I wouldn't like to get the URL polluted with an endless list of parameters which will make it just longer for no reason. And I use a JSON object for that
  • My entry point is normally /<resource_name>/search.

D.
With this approach, I do not like that the search keyword is used in the path to the resource. That is, the path contains an operation with data, but to specify an operation on a resource, you need to use the http method. Perhaps I am mistaken and do not correctly interpret what I have learned.

In this case, the search is not part of the path but it is considered as a resource itself . You then use the POST verb in that case from he user's POV you are creating a search.

D.

@javiertoja
Copy link

javiertoja commented Jul 5, 2021

Hello Adam,

I'm using smallrye-openapi to generate the api documentation from the source code in my projects, and I'm looking for some guidance.

I'm developing a service platform which is compose of various independent components (backends), each one of them provide its own openapi definition file generated with quarkus and the smallrye openapi dependency.

Now I'm looking for a system to provide this documentation to users as a whole automatically, and while looking for libraries that merge openapi definitions I've found some npm libraries that kind of achieve that, but I found no system that could do that with the actual components at runtime.

What I'm looking for its a system similar to swagger that when is deployed reads the openapi defintions from a list of openapi endpoints and merge them to be published. ¿Do you know any software or library which can help my to do this? I've seen that with swagger it is possible to read from various servers, generating independent entries for each one, but I would like to have the documentation all together and hide the details of what services we have behind.

I think that this could be quite convenient specially in could deployments in kubernetes at lest within the scope of a namespace.

¿How do you normally tackle the api documentation?.

Thanks

@franden
Copy link

franden commented Jul 5, 2021

Hello Adam,
we plan to devide our modular Jakarta EE8 monolith into microservice archtecture based on Quarkus.
Currently the components are packaged as ear/war modules and are operated on a JBoss application server. The modules communicate via remote EJBs (in vm invocation - without RMI overhead) with each other.
What would be your preferred technology to comminucate between microservice? REST, GraphQL, gRpc, or maybe RMI+EJBs?

Greetings Denis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment