RuedigerMoeller / kontraktor

distributed Actors for Java 8 / JavaScript
GNU Lesser General Public License v3.0
344 stars 48 forks source link

Can we build a web framework based on kontraktor? #50

Open cih-y2k opened 7 years ago

RuedigerMoeller commented 7 years ago

Ofc (who is "we" ;) ). Actually there is already kind of a web framework (SPA focussed). Kontraktor http provides html import/script/css inlining, transpiler support, a browser client lib, ...

While kontraktor http is mostly library style, kontraktor-web provides a minimalistic 'frameworky' webapp support covering fundamentals like session invalidation, server side per session state, session resurrection (important for SPA's). I am in the process of documenting this stuff as I find time ..

cih-y2k commented 7 years ago

hi @RuedigerMoeller, by "we", I mean anyone who is impressed by the simplicity and the performance of kontraktor and somehow find it useful :). You know, to be used as a web framework for SPA and rich apps, we need more features, right!

RuedigerMoeller commented 7 years ago

some stuff is there, but lacks documentation

cih-y2k commented 7 years ago

yes, I see, I'm trying to figure out what is going on under the hood.

davidwynter commented 7 years ago

We use it with a React front end and the simplicity of the js4k interface to the server makes life very easy. In the backend the simplicity of setting up Actors means failover was really easy to implement using round robin pools of remote Actors providing services, message timeouts and the heartbeat/pulse pattern. Scaling is also really easy to implement.

RuedigerMoeller commented 7 years ago

FYI I ported the webapp basic example to 4.0 + new front end libs yesterday.

1 request, 5.6 kb when running in production mode (everything inlined in index.html)

cih-y2k commented 7 years ago

@RuedigerMoeller @davidwynter thank you for sharing your usecase, can you give me more details about how to scale out kontraktor backend to clusters in multiple machine setup? Thank you!

RuedigerMoeller commented 7 years ago

Examples for kontraktor scaleout: this is the original system kontraktor was developed for: http://java-is-the-new-c.blogspot.de/2013/12/big-data-reactive-way.html

distributed Lambda execution: https://www.juptr.io/juptrblogs/a2b6139f-b273-42bd-b533-e4695e27e353.html

sharded NLP + document query https://www.juptr.io/juptrblogs/c7839e9a-da8b-4a60-bc66-94558c30c4da.html