mdedetrich commented on PR #2156:
URL: https://github.com/apache/pekko/pull/2156#issuecomment-3261720137

   > We are currently using Spring-Ai and MCP SDK at work, which are totally 
built the the reactor-core. I always wondered, why can't it be Pekko-stream.
   > 
   > And nowadays, the virtual thread makes direct style programming possible, 
see how ox-stream and ox-actor are being implemented, yes, the blocking should 
be managed, but may not be a problem when you are running the actor/stream with 
virtual thread.
   > 
   > There is a Jox library being implemented with pure java, so I think Pekko 
Stream should be quite simple and friendly for Java developers too. <img 
alt="image" width="1213" height="507" 
src="https://private-user-images.githubusercontent.com/501740/486385462-d0ffe44f-46d2-4608-a3c5-39e63f037c92.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTcxNTI0MzEsIm5iZiI6MTc1NzE1MjEzMSwicGF0aCI6Ii81MDE3NDAvNDg2Mzg1NDYyLWQwZmZlNDRmLTQ2ZDItNDYwOC1hM2M1LTM5ZTYzZjAzN2M5Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwOTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDkwNlQwOTQ4NTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNTkyOWIzMmQzNTE5ODZjMmMzM2M2Yzg0ODQxZGFmYjExN2YzN2M3OWE4ZmFiNWMyYzMzZWU3ODZjNTA1YjczJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eqERrPxqxHH6ATU3RhKPWbFPLey4h7bsvPfyEQ2kJIQ";>
 This code is from a system 
 where we leverage pekko stream to do translation for Taobao English, you can 
see the long
   > 
   > ```
   > withAttributes(
   >                 ActorAttributes.withSupervisionStrategy(
   >                     (org.apache.pekko.japi.function.Function<Throwable, 
Supervision.Directive>) param -> {
   >                         log.error("AsyncOvsTranslator error", param);
   >                         return (Supervision.Directive) 
Supervision.resume();
   >                     }))
   > ```
   > 
   > In Reactor-core will just be an `onErrorContinue`.
   
   Whether you use loom or not is not relevant here, the question is does the 
new Java 1.8 stream block the thread while its waiting for a new element? If it 
does (which I do think is the case as I see no evidence from the API that its 
properly async), then its just as dangerous as the `InputStream`/`OutputStream` 
converters.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to