You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/11/20 17:55:26 UTC
[GitHub] [camel-k] weimeilin79 opened a new issue #1821: Support for POJO, bring it back!
weimeilin79 opened a new issue #1821:
URL: https://github.com/apache/camel-k/issues/1821
Currently POJO is no longer taken in by Camel K. Instead of restricting and directly rejecting it, can we have a window open for this scenario, provide it as an optional feature.
Without the support for POJO meaning there is no easy DEV mode for Camel K, basically it’s the death of live coding. Instead of seeing the beauty of seeing code directly running on K8s, now the flow goes like this:
Developer creates another project for ANY bean/helper/util class, compiles, and uploads to jitpack, (what if it’s enterprise env? Developers go through another process of uploading it? Meaning the OPS needs to get either Nexus or Jitpack whatever ready? )
Or just do an awful long javascript like all-in-one java class?
Where is the agility? Where is the fast time to deploy?
Yes, separating it could be better for unit testing, (I understand the need for unit testing? But aren’t we pushing BDD for integration code? ) BUT!!! how about the painful process before unit test, during development? It’s not like you can run Camel K route easily locally to test the utility? Meaning the developer has to shift between local and k8s ..
It'll just be easier to do a simple Quarkus java app, at least there is no two separate env I need to work with, and two separate deployments process.
I know there would be problems for Quarkus runtime, and native compile and maybe longer build time. But having to do things separately not only breaks the train of thoughts, but also requires developers to do a lot of extra work.
And another thing is about the positioning with Kamelet, if Camel K used JUST for route? I don’t see a clear definite line between Kamelet and this?
Can we have an option for POJO, say if this is there, then default runtime won't be Quarkus or with Native build. And warning on slower build time.. etc..
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] liurui-1 edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
liurui-1 edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-846948130
@oscerd As I mentioned in https://github.com/apache/camel-k/issues/2317 , I do not see any people upload their utility class into public Maven just for private use in their own app. And we have the unique version for Camel code and the utility. Camel code is more important. I cannot imagine if you upgrade utility class with Maven but do not upgrade the Camel code at the same time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] davsclaus commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961647767
Thanks for the example @dweber019 - maybe we can add it to camel-k under examples as it demonstrate when your POJOs also need to be build with lombok or other "enrichers" that camel-k will not be able to do, as it only takes in normal java source code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] zregvart commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731643087
> This is actually not accurate
Yes, the wording doesn't pay it justice, but I don't think it's inaccurate. Let me rephrase this with an example: we moved to Linux containers that are self contained, i.e. all dependencies that are needed at runtime are present within one container image. This is something we did to achieve idempotency and immutability, which in turn gave us reliability and scalability. The model of having the Camel route the only executable bit of my integration inside of a CR and then ship dependencies separately, I think, goes against that. For development and for production I would like to bundle everything together, much as the container image bundles all dependencies together.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] arthurdm commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
arthurdm commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874943147
For me the two differentiators are:
* all of the code, including the core Route, lives outside of the Integration CR - thus removing the danger of running over the CR limit
* packaging the code and common POJOs in a container would remove the need for setting up a maven artifact for the POJO code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] arthurdm commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
arthurdm commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874892031
hey everyone - I agree with a lot of points made here from both sides. There should be a way to reuse POJOs that is lightweight and doesn't require a lot of process, to enable development teams that are pulling from a common source repo within an organization.
At the same time, having all of those POJOs duplicated inside different CRs definitely can quickly hit size limitations. I guess the CR size ceiling is something we could hit even without POJOs, just with an extremely long Route class. There may be some higher architectural decisions there in terms of is Camel K well suitable for complex projects versus smaller re-routing / transformation module?
I think @zregvart made some very good arguments for solving this via container images that have the code + dependencies. The Camel K CR could then just reference the source code image, and the Operator would take over from there in terms of creating a runnable image that has the compiled code + dependencies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961374223
We just had the same issue regarding additional code. Almost cancelled camel-k for spring/quarkus with camel as the development flow was not a good experience and Maven/Jitpack was not an option (enterprise).
If then found more of a hack, by building a jar file, providing it as a resource and loading it with the classpath but at least my route files are not not 1000 lines of code ;)
I build a example for anyone interested https://github.com/dweber019/camel-k-jar
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961374223
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] liurui-1 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
liurui-1 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-846921294
Thanks @lburgazzoli to mention this issue.
I fully agree and suggest to support POJO again, maybe with some restrictions, especially when Camel v1.4.0 isolate all Java files. As I mentioned in https://github.com/apache/camel-k/issues/2317 , we badly need some features to reuse our code. We need to install our product into many customer environments, it is not a good solution to build those constants and utility functions into Maven artifacts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] oscerd commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-846923328
Well, it's not good to use multiple class of constants and utility functions in many customer enviroments. If you need to change anything, you'll need to change it everywhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961650052
> Maven/Jitpack was not an option (enterprise).
can you provide more details about why maven was not an options and what other option were available ?
except of course putting the code in a CR :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961667286
@davsclaus I can do that ;)
I will open a PR where I copy my repository as is, into https://github.com/apache/camel-examples into a folder named examples/camel-examples-java-jar. Fine for you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731555447
>
> And another thing is about the positioning with Kamelet, if Camel K used JUST for route? I don’t see a clear definite line between Kamelet and this?
>
In essence, Kamelets are just like any regular camel component that instead of just providing support to exchnage data with a 3th party system, can be used to package complex routing logic and dependencies hiding the detail from the end user.
I don't see how it conflicts with other things.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731554705
I am the one to be blamed for have introduced and then removed this feature.
When this feature was first introduced, Camel was in its 2.x ages and features like properties binding and configuration over properties were not powerful as it is today, so having a way to easily configure components or other aspect of Camel was really needed and that's why I added it but it was never been intended to let people adding arbitrary code. As today the Camel engine is much more powerful and the reasons for which this has been introduced do not longer exist.
Unfortunately people as start abusing of this feature and I had to deal with lot of issues, some have been solved but some won't as **camel-k is not a generic build system and it will never be**.
So what issues do we have by letting people adding any arbitrary code through camel-k ?
1. each class is compiled in its own class-loader which make the resulting classes not visible from other classes (this has partially been solved but I don't want to bring yet another modular class-loader which greatly complicates things)
2. dependencies between classes is not taken into account and it will never be so the compilation may fail at runtime if any of your class depend on another class you have added (maybe you are lucky and the order do not unveil the problem but still, it is unpredictable)
3. size of the resulting CR may exceed the limit resources have (bear in mind that all your sources are stored inside etcd)
4. consistency with other languages: should we support adding arbitrary js/groovy/kotlin code ?
5. code is compiled at runtime, so every time the application starts, it will spend some time compiling your code which is not exactly what when your integration needs to quickly scale up
6. you may miss the option to use native compilation
That said I can evaluate to re introduce this feature but certainly not in its previous incarnation and you need to help me to shape an UX that do not encourage users to abuse of this capability and does not introduce yet another unmaintainable feature.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] zregvart commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
zregvart commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731602081
I think the biggest drawback of Camel K being able to address moderate to high complexity cases is in it's over-reliance on having to fit the whole implementation of the solution in the CR. I think Camel K should consider supporting container images or archives instead. So instead of putting the code into a CR, I as a developer, should be able to push an image/archive with the code instead, have the operator integrate it into an runnable image.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] davsclaus commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961647767
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] zregvart edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
zregvart edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731602081
I think the biggest drawback of Camel K being able to address moderate to high complexity cases is in it's over-reliance on having to fit the whole implementation fit in the CR. I think Camel K should consider supporting container images or archives instead. So instead of putting the code into a CR, I as a developer, should be able to push an image/archive with the code instead, have the operator integrate it into an runnable image.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] weimeilin79 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
weimeilin79 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731590191
Yes, I totally agree that we should not abuse it. But also we don’t want to completely wipe out the flexibility. In order for a better UX and more efficient engine, we need to take a closer look at their behaviour. Because sometimes I don’t code in a certain way, it’ll be good to take a look at some older issue and their problem repo to setup some rules?
> I am the one to be blamed for have introduced and then removed this feature.
>
Not blaming :) Just want to know why?
> So what issues do we have by letting people adding any arbitrary code through camel-k ?
>
> 1. each class is compiled in its own class-loader which make the resulting classes not visible from other classes (this has partially been solved but I don't want to bring yet another modular class-loader which greatly complicates things)
What is the current limitation? In what situation could it be possible for people to do it?(Sorry not expert in Quarkus app. ) Do we have an example of how their code would need to have more class loaders?
> 2. dependencies between classes is not taken into account and it will never be so the compilation may fail at runtime if any of your class depend on another class you have added (maybe you are lucky and the order do not unveil the problem but still, it is unpredictable)
Pardon my ignorance, this problem is caused by the previous independent loader issue, right?
> 3. size of the resulting CR may exceed the limit resources have (bear in mind that all your sources are stored inside etcd)
Yes, we’ll have to define some rules here.
> 4. consistency with other languages: should we support adding arbitrary js/groovy/kotlin code ?
This probably will need some help from the experts doing these DSL, but most of people I see are doing Java or XML.. (some yaml)
> 5. code is compiled at runtime, so every time the application starts, it will spend some time compiling your code which is not exactly what when your integration needs to quickly scale up
Understood. This could be a warning.
> 6. you may miss the option to use native compilation
>
Another possible option for users to decide.
> That said I can evaluate to re introduce this feature but certainly not in its previous incarnation and you need to help me to shape an UX that do not encourage users to abuse of this capability and does not introduce yet another unmaintainable feature.
From reading the cons, IMHO the biggest problem is the class loaders, which could potentially may cause the application not runnable. Others I would think it’s more like an decision for users to decide.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] weimeilin79 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
weimeilin79 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-732219071
Yes, @zregvart I think we are both thinking about the same thing, it's the packaging to deployment experience, if everything are broken down to too many pieces, and the developer were left to do everything manually, it's not ideal.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] github-actions[bot] closed issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #1821:
URL: https://github.com/apache/camel-k/issues/1821
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874900777
>
> I think @zregvart made some very good arguments for solving this via container images that have the code + dependencies. The Camel K CR could then just reference the source code image, and the Operator would take over from there in terms of creating a runnable image that has the compiled code + dependencies.
For my understanding, so that I can evaluate better, how this would be different from shipping some POJOs as jar ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] davsclaus commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-1081022883
Have a prototype for camel-java-dsl to support POJOs
https://issues.apache.org/jira/browse/CAMEL-17784
This would in theory could work for camel-k also, if the .java files are mounted so the java routes loader can detect all of them in the same scan, and make them all compile together.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] davsclaus commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961683471
Oh I wonder if you can put all together into a new folder at
https://github.com/apache/camel-k/tree/main/examples
The folder can be name `pojo-jar` or something?
As the camel-examples is for regular (non Camel K).
And this repo is outdated (we should likely remove it): https://github.com/apache/camel-k-examples
So IMHO the best place is still at: https://github.com/apache/camel-k/tree/main/examples
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961374223
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961650052
> Maven/Jitpack was not an option (enterprise).
can you provide more details about why maven was not an options and what other option were available ?
except of course putting the code in a CR :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961667286
@davsclaus I can do that ;)
I will open a PR where I copy my repository as is, into https://github.com/apache/camel-examples into a folder named examples/camel-examples-java-jar. Fine for you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] github-actions[bot] commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-1030718395
This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874945010
> For me the two differentiators are:
>
> * packaging the code and common POJOs in a container would remove the need for setting up a maven artifact for the POJO code
Yes but as a developer you have to create such container images, so ok it is not a maven artifact but still is an archive that you have to push somewhere, correct ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] arthurdm commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
arthurdm commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874951754
> but still is an archive that you have to push somewhere, correct
The pattern we're using is via git submodules. We have the common POJOs in a GitHub repo and new projects just add a submodule link to that - so it's all just code-based dependencies, we don't actually have to archive and push it anywhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] arthurdm edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
arthurdm edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874951754
> but still is an archive that you have to push somewhere
The pattern we're using is via git submodules. We have the common POJOs in a GitHub repo and new projects just add a submodule link to that - so it's all just code-based dependencies, we don't actually have to archive and push it anywhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961666076
@lburgazzoli yes sure.
We had 4 options on the table:
- Using jar with resource and classpath
- Using Maven
- Using jitpick
- Using multiple RouteBuilder files
As said our goal is to build small to medium sized routes. Will doing this we found the development process quit tedious.
We first checked Maven but found that publishing even SNAPSHOTS every time we change the source code is not what we wanted especially as there can be other process involved in pushing into our artefact storage, e.g. security scans.
The same issues we had with Jitpack. Commiting/pushing every change was not what we were looking for and felt not intuitiv. Additionally committing triggers some processes too, we don't need.
We then checked if we can split everything into separated route builder files. We almost decided to go with this solution but then we tested the camel-openapi, as you can see in the example project and got errors regarding the POJO User, which could not be processed by the camel-openapi to build the OpenAPI YAML file as User was provided as inner class.
Now we think that we will mostly start with the JAR option and try to keep our Camel implementations as small as possible to leverage Camel K but if not possible (e.g. CRD limit), we will switch to Camel with Spring/Quarkus.
I hope this helps to understand the reasons.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961667286
@davsclaus I can do that ;)
I will open a PR where I copy my repository as is, into https://github.com/apache/camel-karaf-examples into a folder named examples/camel-examples-java-jar. Fine for you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731554705
I am the one to be blamed for have introduced and then removed this feature.
When this feature was first introduced, Camel was in its 2.x ages and features like properties binding and configuration over properties were not powerful as it is today, so having a way to easily configure components or other aspect of Camel was really needed and that's why I added it but it was never been intended to let people adding arbitrary code. As today the Camel engine is much more powerful and the reasons for which this has been introduced do not longer exist.
Unfortunately people as start abusing of this feature and I had to deal with lot of issues, some have been solved but some won't as **camel-k is not a generic build system and it will never be**.
So what issues do we have by letting people adding any arbitrary code through camel-k ?
1. each class is compiled in its own class-loader which make the resulting classes not visible from other classes (this has partially been solved but I don't want to bring yet another modular class-loader which greatly complicates things)
2. dependencies between classes is not taken into account and it will never be so the compilation may fail at runtime if any of your class depend on another class you have added (maybe you are lucky and the order do not unveil the problem but still, it is unpredictable)
3. size of the resulting CR may exceed the limit resources have (bear in mind that all your sources are stored inside etcd)
4. consistency with other languages: should we support adding arbitrary js/groovy/kotlin code ?
5. code is compiled at runtime, so every time the application starts, it will spend some time compiling your code which is not exactly what you want in case you want your integration to quickly scale up
6. you may miss the option to use native compilation
That said I can evaluate to re introduce this feature but certainly not in its previous incarnation and you need to help me to shape an UX that do not encourage users to abuse of this capability and does not introduce yet another unmaintainable feature.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-874954576
But this is different from what I understood from previous comments, and I'm confused.
Can you explain me how the workflow of getting such code to camel-k would be and how it relates to container images ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] liurui-1 commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
liurui-1 commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-846948130
@oscerd As I mentioned in https://github.com/apache/camel-k/issues/2317 , I do not see any people upload their utility class into public Maven just for private use in their own app. And we have the unique version for Camel code and the utility. Camel code is more important. I cannot imagine if you upgrade utility class with Maven but not upgrade the Camel code at the same time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731554705
I am the one to be blamed for have introduced and then removed this feature.
When this feature was first introduced, Camel was in its 2.x ages and features like properties binding and configuration over properties was not powerful as it is today, so having a way to easily configure components or other aspect of Camel was really needed and that's why I added it but it was never been intended to let people adding arbitrary code. As today the Camel engine is much more powerful and the reasons for which this has been introduced do not longer exist.
Unfortunately people as start abusing of this feature and I had to deal with lot of issues, some have been solved but some won't as **camel-k is not a generic build system and it will never be**.
So what issues do we have by letting people adding any arbitrary code through camel-k ?
1. each class is compiled in its own class-loader which make the resulting classes not visible from other classes (this has partially been solved but I don't want to bring yet another modular class-loader which greatly complicates things)
2. dependencies between classes is not taken into account and it will never be so the compilation may fail at runtime if any of your class depend on another class you have added (maybe you are lucky and the order do not unveil the problem but still, it is unpredictable)
3. size of the resulting CR may exceed the limit resources have (bear in mind that all your sources are stored inside etcd)
4. consistency with other languages: should we support adding arbitrary js/groovy/kotlin code ?
5. code is compiled at runtime, so every time the application starts, it will spend some time compiling your code which is not exactly what you want in case you want your integration to quickly scale up
6. you may miss the option to use native compilation
That said I can evaluate to re introduce this feature but certainly not in its previous incarnation and you need to help me to shape an UX that do not encourage users to abuse of this capability and does not introduce yet another unmaintainable feature.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731554705
I am the one to be blamed for have introduced and then removed this feature.
When this feature was first introduced, Camel was in its 2.x ages and features like properties binding and configuration over properties was not powerful as it is today, so having a way to easily configure components or other aspect of Camel was really needed and that's why I added it but it was never been intended to let people adding arbitrary code. As today the Camel engine is much more powerful and the reasons for which this has been introduced do not longer exists.
Unfortunately people as start abusing of this feature and I had to deal with lot of issues, some have been solved but some won't as **camel-k is not a generic build system and it will never be**.
So what issues do we have by letting people adding any arbitrary code through camel-k ?
1. each class is compiled in its own class-loader which make the resulting classes not visible from other classes (this has partially been solved but I don't want to bring yet another modular class-loader which greatly complicates things)
2. dependencies between classes is not taken into account and it will never be so the compilation may fail at runtime if any of your class depend on another class you have added (maybe you are lucky and the order do not unveil the problem but still, it is unpredictable)
3. size of the resulting CR may exceed the limit resources have (bear in mind that all your sources are stored inside etcd)
4. consistency with other languages: should we support adding arbitrary js/groovy/kotlin code ?
5. code is compiled at runtime, so every time the application starts, it will spend some time compiling your code which is not exactly what you want in case you want your integration to quickly scale up
6. you may miss the option to use native compilation
That said I can evaluate to re introduce this feature but certainly not in its previous incarnation and you need to help me to shape an UX that do not encourage users to abuse of this capability and does not introduce yet another unmaintainable feature.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-731604664
This is actually not accurate, we need the route as it is what drives the
materialization of various aspects of the integration but we actually
recommend providing additional logic through artifacts
On Sat, 21 Nov 2020 at 17:33, Zoran Regvart <no...@github.com>
wrote:
> I think the biggest drawback of Camel K being able to address moderate to
> high complexity cases is in it's over-reliance on having to fit the whole
> implementation of the solution in the CR. I think Camel K should consider
> supporting container images or archives instead. So instead of putting the
> code into a CR, I as a developer, should be able to push an image/archive
> with the code instead, have the operator integrate it into an runnable
> image.
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/camel-k/issues/1821#issuecomment-731602081>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAOIJBIOI6B3WMUSLZ5IGNTSQ7TVLANCNFSM4T5CPGOA>
> .
>
--
--
Luca Burgazzoli
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] dweber019 edited a comment on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
dweber019 edited a comment on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961667286
@davsclaus I can do that ;)
I will open a PR where I copy my repository as is, into https://github.com/apache/camel-examples into a folder named examples/camel-examples-java-jar. Fine for you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] lburgazzoli commented on issue #1821: Support for POJO, bring it back!
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1821:
URL: https://github.com/apache/camel-k/issues/1821#issuecomment-961650052
> Maven/Jitpack was not an option (enterprise).
can you provide more details about why maven was not an options and what other option were available ?
except of course putting the code in a CR :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org