Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 27 05:38
    fomkin commented #362
  • Jan 26 15:40
    morozov11 synchronize #362
  • Jan 26 15:12
    morozov11 synchronize #362
  • Jan 26 15:11
    morozov11 synchronize #362
  • Jan 26 15:04
    morozov11 opened #362
  • Jan 26 07:41
    Tvaroh opened #361
  • Jan 26 07:40
    Tvaroh opened #360
  • Jan 23 11:02
    fomkin edited #63
  • Jan 22 13:22
    fomkin unlabeled #359
  • Jan 22 07:57
    fomkin labeled #359
  • Jan 22 07:57
    fomkin labeled #359
  • Jan 22 07:57
    fomkin labeled #359
  • Jan 22 07:57
    fomkin opened #359
  • Jan 22 07:01
    fomkin labeled #316
  • Jan 22 07:00
    fomkin commented #358
  • Jan 22 06:58
    fomkin labeled #358
  • Jan 22 06:58
    fomkin labeled #358
  • Jan 22 06:58
    fomkin labeled #358
  • Jan 22 06:58
    fomkin opened #358
  • Jan 22 06:51
    fomkin labeled #288
Zhenhao Li
@Zhen-hao
I'm using access.evalJs(js"""$element.innerHTML =${html}""") to render a raw HTML string. but I'd like to have a functional way to do it.
Zhenhao Li
@Zhen-hao
BTW, it seems that I can not run that in an extension. I got value js is not a member of StringContext
1 reply
Zhenhao Li
@Zhen-hao
good morning @fomkin, can you explain "Change behavior of page reloading after server shutdown. Now it do pull page reload instead of DOM reload."? what's the difference?
5 replies
Zhenhao Li
@Zhen-hao
@fomkin what can I do to deploy server changes without breaking user experience? I understand that Korolev has a stateless design. the only solution I can think of now is to make sure each page has a unique path and the state loader will reload the "same" page from data persistent in the backend.
are there better approaches?
5 replies
Aleksey Fomkin
@fomkin
@Zhen-hao About fomkin/korolev#328 You have three Korolev servers behind Nginx, right? Did you ensure that all request from same device going to a same server? It is very important because Korolev keeping state in memory of the server (at least in default StateStorage). Add hash $cookie_deviceId consistent to your balancing configuration (see "Generic hash section" in https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/).
3 replies
Alex
@CodeCombiner

Hi Alexey, @fomkin

Sorry for silly question, I wonder where I can find ssl setup for Korolev app?

3 replies
Alex
@CodeCombiner
Could you tell me couple words about this issue, why it might happen?
[ERROR] [10/26/2020 18:42:29.454] [default-akka.actor.default-dispatcher-6] [akka.actor.ActorSystemImpl(default)] Response stream for [GET /static/fonts/SanFran/SFProDisplay-Medium.ttf] failed with 'Input buffer overrun'. Aborting connection.
java.lang.IllegalStateException: Input buffer overrun
    at akka.stream.impl.fusing.ActorGraphInterpreter$BatchingActorInputBoundary.onNext(ActorGraphInterpreter.scala:192)
    at akka.stream.impl.fusing.ActorGraphInterpreter$BatchingActorInputBoundary$OnNext.execute(ActorGraphInterpreter.scala:98)
    at akka.stream.impl.fusing.ActorGraphInterpreter$SimpleBoundaryEvent.execute(ActorGraphInterpreter.scala:54)
    at akka.stream.impl.fusing.ActorGraphInterpreter$SimpleBoundaryEvent.execute$(ActorGraphInterpreter.scala:52)
    at akka.stream.impl.fusing.ActorGraphInterpreter$BatchingActorInputBoundary$OnNext.execute(ActorGraphInterpreter.scala:95)
    at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:600)
    at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:769)
    at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:784)
    at akka.actor.Actor.aroundReceive(Actor.scala:537)
    at akka.actor.Actor.aroundReceive$(Actor.scala:535)
    at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:691)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:577)
    at akka.actor.ActorCell.invoke(ActorCell.scala:547)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
    at akka.dispatch.Mailbox.run(Mailbox.scala:231)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:283)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.localPollAndExec(ForkJoinPool.java:977)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1605)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
1 reply
Alex
@CodeCombiner

Aleksey @fomkin , I also have the issue with this :

[DEBUG] [10/27/2020 14:59:09.799] [default-akka.actor.internal-dispatcher-14] [akka://default/system/IO-TCP/selectors/$a/0] New connection accepted

This is printed plenties of times in console. What is it related to?

1 reply
hanbo1990
@hanbo1990
Hi, @fomkin I want to have a clickable list where the list item comes from the database. Is there a way that I can use to append list items into a component from a scala function? Thank you in advance!
1 reply
Alex
@CodeCombiner
@hanbo1990 you need to send events from javascript and process them with scala

@CodeCombiner Hi Alex. onscroll is an element attribute. If you want to handle scroll event, you should type event("scroll") { ... }. Korolev is not good to handle events like "scroll" or "mousemove", because everything is processing on the server. I recomend to use CustomElement which will handle scroll and emit domain event which will be handed by Korolev.

@hanbo1990 like this

Zhenhao Li
@Zhen-hao
@CodeCombiner it seems some issue in Akka. are you sure it's from korolev?
Alex
@CodeCombiner
Not sure, will test this.
Hi @fomkin , please suggest how can I return state with Status.NotFound response?
e.g. user clicks the link and it either shell redirect correctly or display "not found" page
Alex
@CodeCombiner

I use

 document = state => optimize {

Do I need to switch to

document = maybeResult => optimize {

But the best to combine them, how can I do that?

Alex
@CodeCombiner
As well how to redirect with State ?
1 reply
Zhenhao Li
@Zhen-hao
I need someone to help me improve the UI we've built with Korolev. If you are interested in doing this kind of work as a freelancer, feel free to connect with me on LinkedIn to discuss the details.
Zhenhao Li
@Zhen-hao
is there a way to re-render part of a page/state?
instead of state transition, I'd like to have something like div transition
Alex
@CodeCombiner
Hi Alexei, @fomkin
Please give a suggestions for this issue:
Response stream for [GET /static/fonts/SanFran/SFProDisplay-Medium.ttf] failed with 'Input buffer overrun'. Aborting connection.
Zhenhao Li
@Zhen-hao
hi @fomkin , do you already know when the release is? is there anything I can help?
Aleksey Fomkin
@fomkin
Sorry guys, I have lack of time this month. 'Input buffer overrun' is known problem. I thought I fixed it in 0.16.0 (fomkin/korolev@ff449e3) but it continue to occur on larger files than I tested. I will be glad to take any help with this issue. Entry point is KorolevStreamPublisher. Akka requests more chunks than it could handle.
Zhenhao Li
@Zhen-hao
ok. the input buffer issue is new to me since I haven't used any file IO. I'll have a look to see if I can make a meaningful contribution. akka stream should provide back pressure
Zhenhao Li
@Zhen-hao
@fomkin can you update the certificate of the documentation page? it just expired
3 replies
Zhenhao Li
@Zhen-hao
I noticed that delayed effects won't get executed again when the state transition to itself (with different parameters)
is there a way to force the delayed execution every time?
1 reply
Zhenhao Li
@Zhen-hao
@fomkin I'm writing my own StateStorage. reading the source code of korolev.state.javaSerialization, it seems to me it is the only implementation of StateSerializer. so all Korolev states use Java serialization?
1 reply
Zhenhao Li
@Zhen-hao
@fomkin can you explain why StateSerializer and StateDeserializer are required for states? the default SimpleInMemoryStateManager doesn't actually use any serializer or deserializer. Onlyu DevModeStateManager uses them.
Zhenhao Li
@Zhen-hao
fomkin/korolev#338
comments are welcome
Zhenhao Li
@Zhen-hao
hi, does anyone know how to create a button for the user to close the tab?
Aleksey Fomkin
@fomkin
@/all I planning online meetup at Feb 2021. If you want to share your story about using of Korolev please write me email at aleksey.fomkin@gmail.com.
Zhenhao Li
@Zhen-hao
will do. it the meetup in English?
Aleksey Fomkin
@fomkin
Yes.
Zhenhao Li
@Zhen-hao
@fomkin can components have their own extensions?
I have a general pattern: on leaving a given page, I want an extension to do some resource clean up. what's the best way to implement this kind of page exit hook in extensions? it feels like a missing feature
Zhenhao Li
@Zhen-hao
hi, how to pass an ElementId to a piece of JS code that uses it as an event target?
2 replies
Zhenhao Li
@Zhen-hao
@fomkin it seems 0.16.3 is broken in some way. buttons stopped doing anything and there were no logs. I had to revert to 0.16.2
17 replies
Zhenhao Li
@Zhen-hao
sorry, it has nothing to do with the version. it just happens when some libraries get updated. I don't know why this is happening
Zhenhao Li
@Zhen-hao
I don't know if it is related to the fact that I'm testing it on two browsers on the same machine at the same time
ylaurent
@ylaurent
is it possible to display streaming graph data (eg plotly.js) using korolev? Is there an example somewhere?
Zhenhao Li
@Zhen-hao
ylaurent
@ylaurent
yeah saw that, i guess i will have to experiment
thank you
by the way, is the migration to scala3/dotty planned at some point ? I guess it is still early now and probably not worthit yet
2 replies
Zhenhao Li
@Zhen-hao
hi, I have need some advise.
I'd like to add a calendar to my app where I can drag and drop events and switch between week view and month view. based on my research, the best options are either 1. integrate the JS library FullCalendar, or 2. implement it myself with Korolev. which do you think would be easier?
2 replies
Zhenhao Li
@Zhen-hao
with 0.17-M3, I see korolev.Context.ElementId does not take type parameters
how should I migrate existing code like ElementId[Future]?
Zhenhao Li
@Zhen-hao
never mind. just need to remove the type parameters
Aleksey Fomkin
@fomkin
Zhenhao Li
@Zhen-hao
even with 0.17-M3, I noticed a problem. state recovery from a persistent (distributed) state storage doesn't always work when the server reboots. sometimes times it works sometimes times the page stalls, e.g., no button works, and the user has to refresh the page. what can be the cause? I noticed Firefox works better than Chrome or Brave on that
13 replies
Zhenhao Li
@Zhen-hao
it seems access is lost sometimes. no logs on the server-side whenever access is called