Comments (8)
Definitely. I also recently worked through how to do leverage non-blocking streaming IO (in my case, streaming MBs of elasticsearch results without keeping them in memory or blocking worker threads for IO reading/writing). I could do that as a second tutorial if you think it would be helpful for others.
I'm presently on vacation, but can put together an initial document for review as soon as I get back.
from javalin.github.io.
I could do that as a second tutorial if you think it would be helpful for others.
I think it would! High quality tutorials are always welcome.
from javalin.github.io.
@bchristenson gentle nudge.
from javalin.github.io.
I started working on this on the plane last weekend, but haven't been able to get back to it. I'm modeling it off of https://javalin.io/tutorials/jetty-session-handling-java (have a Java+Kotlin project for examples, README using https://github.com/javalin/javalin.github.io/blob/master/_posts/tutorials/2018-09-02-jetty-session-handling-java.md as a template).
I'll post a link to the repo once it is ready for some feedback.
from javalin.github.io.
Great, thanks for the update!
from javalin.github.io.
@tipsy I have not had any time to put towards this, and will be traveling more the next two weekends, but I did clean it up enough to get it up on my GitHub in case anyone else wants to contribute.
https://github.com/bchristenson/javalin-async-tutorial
Is this roughly the direction you were looking for?
from javalin.github.io.
I'll give it a read through in the weekend!
from javalin.github.io.
@bchristenson This is better than what I was looking for! The intro is very well written and has the perfect amount of detail.
If I could nitpick one thing, I would ask that you don't use the fluent syntax + routes
call in the example.
I think rewriting this:
Javalin app = Javalin.create()
.routes(() -> {
get("simple", context -> {
// Make a call resulting in the initial completable future
CompletableFuture<Result> future = simulatedAsyncCall();
// Return the result future
context.json(future);
});
});
Into this:
Javalin app = Javalin.create();
app.get("simple", context -> {
// Make a call resulting in the initial completable future
CompletableFuture<Result> future = simulatedAsyncCall();
// Return the result future
context.json(future);
});
Would make it easier to understand for beginners.
I'm really excited about this though, please take your time!
from javalin.github.io.
Related Issues (20)
- Add javalin-rendering to plugin list HOT 2
- List bundled plugins
- [PLUGIN REPORTS] - Javalin Rendering
- Document `WsContext#enableAutomaticPings`
- Make Javalin more GraalVM friendly HOT 5
- Java version of simple-frontends-with-javalin-and-vue
- Update HTTP2 docs reference/tutorial HOT 2
- Document Javalin 6 plugin changes
- Jte tutorial provides invalid/confusing examples
- I am running HelloWorld in idea and the following error occurs, I am using Javalin 5.6.1 and jdk 11 HOT 1
- Community tutorials link HOT 2
- Unclear docs
- Server configuration guide references outdated API
- Pin version in past documentation HOT 2
- Javalin modules mentioned in download section are outdated HOT 1
- `javalin-rendering` integration docs are outdated HOT 3
- Enhance Documentation for the section Other web servers HOT 1
- What is the proper Hello World snippet for 6.1.3 HOT 1
- Outdated docs for SSL plugin
- [PLUGIN REPORTS] - Micrometer Plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javalin.github.io.