Re: [undertow-dev] Lightweight integration tests
by Robin Anil
Hi Undertow-dev
Could you see this request. Apologies for pinging Stuart directly. But I am
looking for ways to write tests that exercise the undertow handler chain
tests going through the network.
Robin
On Wed, Mar 20, 2019 at 6:11 PM Stuart Douglas <sdouglas(a)redhat.com> wrote:
> Not in the near future. I have mostly been working on Quarkus for the
> moment, and Flavia has taken over as Undertow lead (I am still involved in
> the project, I just don't have as much time to spend on it).
>
> Stuart
>
> On Thu, Mar 21, 2019 at 2:02 AM Robin Anil <robin.anil(a)gmail.com> wrote:
>
>> Stuart, just checking in again, is doing a local invocation of handlers
>> without involving network on your radar?
>>
>> Robin
>>
>> On Thu, Mar 15, 2018 at 4:44 PM Robin Anil <robin.anil(a)gmail.com> wrote:
>>
>>> Not a lot of data. But most of our handlers are very fast and out test
>>> suite is in the 2000 range and increasing
>>>
>>> - from a phone, xquz typoz
>>>
>>> On Mar 15, 2018 4:35 PM, "Stuart Douglas" <sdouglas(a)redhat.com> wrote:
>>>
>>> For servlet there
>>> is io.undertow.servlet.handlers.ServletInitialHandler#dispatchMockRequest,
>>> however it is Servlet only at the moment and it pretty basic.
>>>
>>> That said though I am currently looking at adding support for a new
>>> client+proxy implementation, and one of the things I want to support is
>>> local invocation without involving the network, so doing a more general
>>> version of this was on my radar.
>>>
>>> I am still surprised that the network is causing issues for your
>>> integration tests though. How much data are these tests sending?
>>>
>>> Stuart
>>>
>>> On Fri, Mar 16, 2018 at 6:14 AM, Robin Anil <robin.anil(a)gmail.com>
>>> wrote:
>>>
>>>> Hi Stuart,
>>>>
>>>> Is there a way to bring up undertow programmatically where the
>>>> underlying HTTP/https transport is removed in favor or direction function
>>>> calls
>>>>
>>>> Effectively, we have accumulated a lot of integration tests and are
>>>> looking for ways to speed them up and at the moment, 80% of CPU time in the
>>>> test is pretty data copies back and forth at the HTTP client and HTTP
>>>> server.
>>>>
>>>> Before I start refactoring our HTTP-handler chains to fake-undertow, I
>>>> thought it might be good to ask.
>>>>
>>>>
>>>> Robin
>>>>
>>>
>>>
>>>
>>
>> --
>>
>> [image: Tock]
>> <https://www.exploretock.com/?utm_source=email&utm_medium=signature>
>>
>> Robin Anil
>> Director of Engineering
>>
>> Tock / exploretock.com
>> <https://www.exploretock.com/?utm_source=email&utm_medium=signature>
>>
>
--
[image: Tock]
<https://www.exploretock.com/?utm_source=email&utm_medium=signature>
Robin Anil
Director of Engineering
Tock / exploretock.com
<https://www.exploretock.com/?utm_source=email&utm_medium=signature>
7 years, 2 months
How to feed data to websockets from an external source
by Mátyás Bene
Hi all,
I would appreciate any kind of guidance and information about how to use undertow in a scenario where we'd like to poll an external source for messages (e.g. kafka) and feed those messages to all the connected websocket sessions.
So far the only examples I've found were about mirroring the messages received from http/websockets back to other websocket sessions or write those messages to Kafka. What we'd ideally need is READ from kafka (e.g. using a dedicated thread, busy-spinning and polling) and pass the retrieved data to undertow (ideally within the JVM without going through HTTP / REST) that would then send them over websockets to the connected clients.
A separate, but related question is, assuming that we were to use the websocket-JSR interface, that is it safe to assume that undertow ensures that at any given time only a single thread is writing to a specific websocket session, especially when using the asyncremote.send() method? Would undertow be able to paralellize all the async send operations using multiple threads to speed up sending?
M.
7 years, 2 months