Adding http(s) compatibility to a component (for discoverable service compatibility)

2023-12-30 Thread Steve973
Hello.  In my component, I have a control channel component that services a
few types of administrative messages that configure the component in
certain ways.  I would like to experiment with making the control component
endpoint a discoverable service, so I would like to try to clarify some
things before I start.

First, I assume that I will need to create another component-endpoint pair
that uses HTTP.  That seems really obvious, but I wanted to make sure that
I am not missing something.  It certainly would not be the first time that
has happened!

Next, is the Undertow component the best example for me to learn how I
should approach it?  I should only need basic http/https functionality to
accept the request information.  If possible, I would like to be able to
reuse the logic that my non-http control channel already implements.  If
there is another component that provides an http endpoint as (mostly) an
additional access point, I would be interested in seeing that.  The
undertow component is pretty substantial, and I do not know if it would be
worth that additional complexity and code to integrate with component
discovery.

Lastly, what else should I be aware of?  The "Service Registry" page in the
Camel online manual does not seem to be directed toward
developers, other than the idea of implementing DiscoverableService.  If I
end up doing all of this with my component, would it be helpful to add a
more detailed section to the manual to help others get started with
implementation?

Thanks,
Steve


Re: Adding http(s) compatibility to a component (for discoverable service compatibility)

2023-12-30 Thread Claus Ibsen
Hi

A discoverable service? Do you mean some kind of external service registry
ala Consul, Kubernetes ?
Camel is not everyhing, and if you need a service registry then favour to
use those kind of products that does that.
Then you can make your component enlist itself into their service
registries.

However beware to not make your component doing too much and being to
complex.

Your component is a dynamic router that was intended to be for routing
internally in Camel.








On Sat, Dec 30, 2023 at 3:31 PM Steve973  wrote:

> Hello.  In my component, I have a control channel component that services a
> few types of administrative messages that configure the component in
> certain ways.  I would like to experiment with making the control component
> endpoint a discoverable service, so I would like to try to clarify some
> things before I start.
>
> First, I assume that I will need to create another component-endpoint pair
> that uses HTTP.  That seems really obvious, but I wanted to make sure that
> I am not missing something.  It certainly would not be the first time that
> has happened!
>
> Next, is the Undertow component the best example for me to learn how I
> should approach it?  I should only need basic http/https functionality to
> accept the request information.  If possible, I would like to be able to
> reuse the logic that my non-http control channel already implements.  If
> there is another component that provides an http endpoint as (mostly) an
> additional access point, I would be interested in seeing that.  The
> undertow component is pretty substantial, and I do not know if it would be
> worth that additional complexity and code to integrate with component
> discovery.
>
> Lastly, what else should I be aware of?  The "Service Registry" page in the
> Camel online manual does not seem to be directed toward
> developers, other than the idea of implementing DiscoverableService.  If I
> end up doing all of this with my component, would it be helpful to add a
> more detailed section to the manual to help others get started with
> implementation?
>
> Thanks,
> Steve
>


-- 
Claus Ibsen
-
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Adding http(s) compatibility to a component (for discoverable service compatibility)

2023-12-30 Thread Claus Ibsen
Hi

There is this ticket
https://issues.apache.org/jira/browse/CAMEL-18546

Its about being able to have a list of hosted services by the current Camel
application, that can be exposed for tooling and end users.
This is not intended as a distributed service registrt ala Consul or
whatever. But a quick way to find out if there is a service in this running
Camel application,
and if so, how to access it.

However for your dynamic router component, it seems you talk about being
able to manage it via HTTP.

Camel components are usually made managable via JMX, and then you can also
make a "dev console" that is intended for developers to quickly see some
information
from it via a http web console (not for production management), but those
dev consoles also comes with a HTTP JSon apit that can be used for basic
management.
This is some of the stuff we use for camel-jbang.




On Sat, Dec 30, 2023 at 3:57 PM Claus Ibsen  wrote:

> Hi
>
> A discoverable service? Do you mean some kind of external service registry
> ala Consul, Kubernetes ?
> Camel is not everyhing, and if you need a service registry then favour to
> use those kind of products that does that.
> Then you can make your component enlist itself into their service
> registries.
>
> However beware to not make your component doing too much and being to
> complex.
>
> Your component is a dynamic router that was intended to be for routing
> internally in Camel.
>
>
>
>
>
>
>
>
> On Sat, Dec 30, 2023 at 3:31 PM Steve973  wrote:
>
>> Hello.  In my component, I have a control channel component that services
>> a
>> few types of administrative messages that configure the component in
>> certain ways.  I would like to experiment with making the control
>> component
>> endpoint a discoverable service, so I would like to try to clarify some
>> things before I start.
>>
>> First, I assume that I will need to create another component-endpoint pair
>> that uses HTTP.  That seems really obvious, but I wanted to make sure that
>> I am not missing something.  It certainly would not be the first time that
>> has happened!
>>
>> Next, is the Undertow component the best example for me to learn how I
>> should approach it?  I should only need basic http/https functionality to
>> accept the request information.  If possible, I would like to be able to
>> reuse the logic that my non-http control channel already implements.  If
>> there is another component that provides an http endpoint as (mostly) an
>> additional access point, I would be interested in seeing that.  The
>> undertow component is pretty substantial, and I do not know if it would be
>> worth that additional complexity and code to integrate with component
>> discovery.
>>
>> Lastly, what else should I be aware of?  The "Service Registry" page in
>> the
>> Camel online manual does not seem to be directed toward
>> developers, other than the idea of implementing DiscoverableService.  If I
>> end up doing all of this with my component, would it be helpful to add a
>> more detailed section to the manual to help others get started with
>> implementation?
>>
>> Thanks,
>> Steve
>>
>
>
> --
> Claus Ibsen
> -
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
Claus Ibsen
-
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2