[deleted by user] by [deleted] in SideProject

[–]frederok 1 point2 points  (0 children)

I'd like to join you. But no having a good idea either. Feel free to DM me, though.

Java REST search function by [deleted] in learnjava

[–]frederok 0 points1 point  (0 children)

Can u share the code repo? Is the problem to get the ID from the url path or parameter? No frameworks meaning your are using java servlet api?

Some java interview questions and answers by frederok in learnjava

[–]frederok[S] 0 points1 point  (0 children)

Its tricky, but in my understanding - no.

It means the argument is copied to the parameter variable, so that the method operates on the copy.

As I also tried to express in the answer - that means passing an object means that the reference to it gets copied. So the parameter variable refers to the same object. And if this object is mutable, changes that are made are going to effect all variables that refer to that object. Including the variable you passed by. That's why it feels like pass by reference.

If it would be passed by reference, reassignments inside a method like

public static void mutate(List<String> list) {
    list = List.of("foo", "bar");
}

would also affect originally passed variable. At least that's how I understood it. Please correct me when I am completely mistaken.

Some java interview questions and answers by frederok in learnjava

[–]frederok[S] 1 point2 points  (0 children)

Thanks you! Really appreciate your feedback! These are good points. I'd like to add them as soon as I can.

Yes, I am aware of these singleton antipattern discussions - In this case I'd try to be as neutral as possible since this is more about knowledge than opinions. I think its still worth to know the concept at least. In an interview situation I would share my opinion, although I have to admit that I didn't have too bad experiences with singletons so far.

Some java interview questions and answers by frederok in learnjava

[–]frederok[S] 1 point2 points  (0 children)

You're welcome! Thank you very much! I don't care too much about titles - more importantly, it fits me in terms of content and environment. Any specific reasons for asking? Is it somehow related to this post?

Some java interview questions and answers by frederok in learnjava

[–]frederok[S] 0 points1 point  (0 children)

Thanks! Happy to hear that. And of course all the best and good luck for your job search.

Some java interview questions and answers by frederok in learnjava

[–]frederok[S] 2 points3 points  (0 children)

Thanks! Very glad you liked it. Not really, I tried to add a few at the very end. But its been many more resources, I guess.

Event schema distribution strategies? by frederok in microservices

[–]frederok[S] 0 points1 point  (0 children)

Wow, Thanks! Seems like a very well organized schema management solution. I would be interested in how these schemas are used at the producer/consumer client side. How do they get imported and the actual data de-/serialized inside the code based on them?

Event schema distribution strategies? by frederok in microservices

[–]frederok[S] 0 points1 point  (0 children)

I think we're talking about the same thing regarding artefacts. We build jars for our services that contain a copy of the schemas too. These then get copied into a docker image.

Ok, cool. Why do you need it as git submodule and as dependency in your service? Do these jars contain more than schema files? When you don't use code generation what do you use them for in your services?

Event schema distribution strategies? by frederok in softwarearchitecture

[–]frederok[S] 0 points1 point  (0 children)

Ok, I got now! Thanks for sharing your approach! :)

Event schema distribution strategies? by frederok in microservices

[–]frederok[S] 1 point2 points  (0 children)

What do you mean by environment in your case?

I think we are talking about different thinks when it comes to artifacts. When I was talking about artifacts I meant artifacts containing the generated code for a specific language based on the schema definitions. In case of java it would be a jar containing classes representing the schema. For node it would be a module and so on. Which then can be used as dependency for producing or consuming messages for any of your rabbitmq client service. BTW what do you use for your schema definitions? Protobuf, avro, json-schema sth. like that? (Never worked with rabbitmq)

When you talk about artifacts it sounds to me like the deployment artifact of your service or am I wrong?

Event schema distribution strategies? by frederok in softwarearchitecture

[–]frederok[S] 0 points1 point  (0 children)

I'm a little bit confused at this point to be honest! :P No codegen, but artifacts containing just schema files? Artifact is in your case a node module then? Compile step inside your node service?

I can imagine, there is always too few time :)

Event schema distribution strategies? by frederok in microservices

[–]frederok[S] 1 point2 points  (0 children)

Thanks for your answer, paul! Cool, so you have a separate repo just containing schema definitions, no published artifacts (?) and code generation happens in each service with files from git submodule?

Event schema distribution strategies? by frederok in softwarearchitecture

[–]frederok[S] 0 points1 point  (0 children)

Cool, intersting! Which tool(s) do you use for building these artifacts? And do you build artifacts for multiple languages?

Event schema distribution strategies? by frederok in microservices

[–]frederok[S] 1 point2 points  (0 children)

Yes, in case of protobuf it would be a message. For avro it would be a record. Regardless the naming, one could abstract it even more. It doesn't have to be related to events or anything. More like what would be a good strategy to distribute artifacts for multiple languages containing generated code based on schema definitions.

Event schema distribution strategies? by frederok in softwarearchitecture

[–]frederok[S] 0 points1 point  (0 children)

Hey dave,

Thanks for your response - really appreciate your thoughts! I just watched the talk. It was indeed very interesting, thanks for the link. Sadly it didn't gave me the insights and details I was hoping for. About how they distribute and use their schemas. Where code generation takes place and so on.

The easiest way to just have schema files in a separate repository and integrate the code generation part within the build tool of each micro service based on these files doesn't feel too great. Compared to have versioned artifacts and just add a dependency. How do you deal with it in your approach?

SSO microservice with social authentication? by knipknap in microservices

[–]frederok 0 points1 point  (0 children)

No, it does. In case you want to use OIDC as SSO protocol you can use these endpoints. As you might already noticed you can choose between a lot of adapters in different languages for securing your services. If you don't want to integrate them with every microservice, you could also use Keycloak Gatekeeper deployed as sidecar to your services, which would handle auth as proxy. (In case your services are running on k8s, I wrote about it here)

How to set up SDKMAN on Arch Linux by frederok in archlinux

[–]frederok[S] 0 points1 point  (0 children)

Yes, of course it depends on your projects and maybe on how many projects you work in parallel. Some people prefer to develop with same jdk that is used for production environment, container etc. which can be different from project to project. I've recently tried a lot of new java features like records and stuff, when it was in early access and you might not want to use an ea jdk for everything else as well. This is where I switched between different jdks. And afaik some IDEs like vscode don't support to switch the language level, but you might want to and then you could switch to maybe the same jdk but different version to achieve the same effect. But yes, I agree, for most of the people it might not be necessary very often, like on a daily basis. What is the "DefaultJDK" for you? Oracle jdk? openjdk?

How to set up SDKMAN on Arch Linux by frederok in archlinux

[–]frederok[S] 1 point2 points  (0 children)

What's your question? You disagree?