Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 17 02:57

    ai on main

    Move Logux Vue Devtools to Vuex (compare)

  • Jun 17 02:55

    ai on main

    Add Logux Vue Devtools part (#8… (compare)

  • Jun 17 02:55
    ai closed #83
  • Jun 17 00:39
    euaaaio synchronize #83
  • Jun 16 10:42
    euaaaio opened #83
  • Jun 10 09:30

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jun 10 09:30

    ai on main

    Bump normalize-url from 4.5.0 t… (compare)

  • Jun 10 09:30
    ai closed #82
  • Jun 10 08:10
    dependabot[bot] labeled #82
  • Jun 10 08:10
    dependabot[bot] opened #82
  • Jun 10 08:10

    dependabot[bot] on npm_and_yarn

    Bump normalize-url from 4.5.0 t… (compare)

  • Jun 07 21:13

    ai on main

    Remove Logux State from parts (compare)

  • Jun 02 02:08

    ai on main

    Clean up fs import (compare)

  • May 26 03:44

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 26 03:44
    ai closed #81
  • May 26 03:44

    ai on main

    Bump dns-packet from 5.2.1 to 5… (compare)

  • May 26 03:42
    dependabot[bot] labeled #81
  • May 26 03:42
    dependabot[bot] opened #81
  • May 26 03:42

    dependabot[bot] on npm_and_yarn

    Bump dns-packet from 5.2.1 to 5… (compare)

  • May 21 01:46

    ai on main

    Add Logux State (compare)

Cosmin Vacaroiu
@cosmin.vacaroiu_gitlab
ps: I'm cosminv6u but I can't log in with github ... so i used gitlab
Simon Lemieux
@simlmx

Hi! I'm very very new to logux (have only read the doc so far) but it looks awesome. I have a tricky use-case and I'm wondering if it fits logux. Basically I want my main server to have all the state, but hide some informations to clients, so the clients would have a different state. So I want client A to send an action to the server, but have the server send a different action to client B, one that hides the information I don't want client B to know about.

Is that something possible? If so how would I go about it? Send a new action in the action's "process" callback?

4 replies
Cosmin Vacaroiu
@cosmin.vacaroiu_gitlab

Hi, when using Vuex, is it true that when there's an UNDO (no matter on which fragment of the Vuex store), all actions from the Client Session are replayed (except the failed one) and similarly, when you Disconnect and Reconnect, all actions since the Client Session was created, are replayed?

ps: when I say Client Session: I mean when you access the page (via GET) or you do a refresh

3 replies
It's a little bit weird that if I have an UNDO on an action that on a certain fragment of the Vuex State, some other mutations on a fragment totally not related to the failed one, are called, only because that mutation was called during the Client Session
Yet by working like this, it seems to solve many complex scenarios rather easy
Simon Lemieux
@simlmx
Hi! Is there a way for the client to be notified that the authentication didn't work? I'm using createLoguxCreator({... user: ..., token:...}) and I want my client to be able to react to a wrong token being passed.
7 replies
Mezriss
@Mezriss
Hi, could someone explain the usecase for CrossTabClient? The difference I see between it and Client my very limited testing is that it isn't syncing with anything - server or other tabs. Why is this desirable?
12 replies
Max
@MaxNamazov
Hi. I'm trying to implement some chat functionality in my app using Logux. Currently, I can't come up with an idea of how to update a participants list when someone leaving the app. I think that the most obvious way should be listening to a disconnected event on the server and then send back some action to all channel members. But it looks like the event object doesn't contain information about client channels. Or maybe I'm missing something and there is another way of doing such things? Thanks in advance
5 replies
Oleg Ermakov
@ol-lo

Hello.

I'm trying to understand the subscription/resubscription logic.
Could you refine the moment about meta.channels on the client side. https://github.com/logux/client/blob/64c7e442de0e7ccca2372c68c8877d82960796f1/client/index.js#L136

How client can get channels from the server if server cuts all meta except pointed in ALLOWED_META? Cut on server side happens here https://github.com/logux/server/blob/90bde83d65a9efad731395b8ea6f74448933a4b0/server-client/index.js#L175

5 replies
Simon Lemieux
@simlmx

Hi! I have a high-level question.

Let's say I have an action with a slow "process" function. If that action is followed by a second action that is faster to "process", I could effectively see the effects of that second action before the first one, correct?

Since my redux client is processing the actions synchronously, this could mean that the (effective) order of actions could be different on the server and the client?

And this is what the following ticket is about, correct? logux/logux#54

65 replies
Julien Bernard
@jbernard-s4m
Hi, I have a performance issue with Vuex integration, we received elements stored in an array in a Vuex state. We received like hundred element every 1ms, we add each element into an array. This operation take a lot of time and more when the list is growing. I suspect that it caused by deepCopy inside replaceState in Vuex integration. When I stringified all items and store all strings in the array, the processing time is ok. Have you an idea why this method is so slower? And have you already eard about a similar issue ?
11 replies
Sergey Korolev
@zumkorn_twitter
Hi! Is there a way to somehow tell on the client that the Logux proxy (Rails or Django) is not available? Now logux sends the message: LoguxError: Logux received an invalid credential error (bad credentials). It sends the same message if authentication fails.
2 replies
Arian Zargaran
@arianzf_gitlab

Hi guys!
I am working on a project where we have this Main App that consumes a React Component's subtree from our own private Components Library. In a modular microfront-end kind-of way.

Just for extra clarification, the Components Lib exposes a subtree that will be consumed by the Main App. Each (the Main App and the Components Lib) have their own Redux store.

What we are trying to achieve here is having both Redux stores in sync (actually just some State slices), even-though both Stores are always working in the same Tab.

Is there any trade-offs for using Logux model? To me, each app will have its own Id and will communicate through Logux proxy. So, I feel it might work. But, since I heard Andrey many times talking just about cross-tab communication, I wanted to be 100% sure.

4 replies
Neville Franks
@getclibu_twitter

@ai The app I've been working on for ages no longer authenticates with the Logux Server. Everything was working fine yesterday and then it broke. I've gone back to an earlier set of code from a week ago and same issue. I've updated logux client & server and restarted Windows twice and same problem.

So far I can't work out why it's broken. I've tried FF, Edge and Chrome - same issue.

I almost suspect this was an issue waiting to happen, but going back to earlier code has the same problem. I'm not aware of a Windows update yesterday.

I'm just reaching out in case you happen to be aware of something breaking recently.

Neville Franks
@getclibu_twitter

Ok, I think I may have found the problem. Each User needs to have their own Logux Client Log. I need to create the CrossTabClient before I can talk to the server and get the Users ID etc. And I need the Users ID to identify the users IndexedDb store - new IndexedStore( userId ).

So I have a catch 22. ie. I need the userId to instantiate the CrossTabClient but don't have it yet.

I hope that makes sense.

Andrey Sitnik
@ai
I have no solution for this case right now
Neville Franks
@getclibu_twitter
Can I change the store once the user has been authenticated?
2 replies
Emilian Sorin Decianu
@aemilianvs
Hello :)
Trying to use redux with Vue but @logux/redux has the react peer dependency (uses createElement, useEffect hook from react, etc). This seems a bit counter-intuitive, to have logux/redux depend on react, which makes it impossible to use redux + logux + vue. Is there any hack I can use to make this work? Shouldn't logux/redux be more library independent and not couple with react, since redux can be used independently as well?
Thank you!
18 replies
Eduard Aksamitov
@euaaaio
All that you listed is part Vue and pure js helpers, not Vuex.
Eduard Aksamitov
@euaaaio
Cool 🤘🏻
Neville Franks
@getclibu_twitter

I have a number of scenarios where server.auth() can fail, other than incorrect credentials. For example a database issue. I need to report the specifics of the failure back to the client so the user has detailed info about the underlying issue. Is there any way to do this?

Related to this is the need to fail server.auth() otherwise the client will immediately start sending its Log to the server which can't be processed because of the database etc. issue. I can't see any way to prevent the client from sending it's log to the server once a connection + auth is established?

6 replies
Neville Franks
@getclibu_twitter

Is there a way for a CrossTabClient to find out if there are other CrossTabClient instances (Tabs) for the same client?

What I'm trying to find out is when does the last CrossTabClient close for a client, so that I can release resource for that client on the server.

Does the server need to keep track of each CrossTabClient instance and use server.on( 'disconnected' ) to see when they have all disconnected?

6 replies
Neville Franks
@getclibu_twitter
I have an issue CrossTabClient where I have two Tabs open to the same client. I Sign out of both Tabs which does CrossTabClient#destroy() in each Tab. Both Tabs are still open in the Browser.
Then when I sign in startElection() -> getLeader() returns a clientId from localStorage which can be the other Tab, in which case the Tab I'm signing in never becomes the leader and never connects to the server.
9 replies
cosminv6u
@cosminv6u
Question, does Logux work fine with React and MicroFrontends? Where you can't have a global Redux store, but one redux store per MicroFrontend. Any thoughts about MicroFrontends?
5 replies
Vladimir
@Vladimirb87
How I can correctly handle custom exceptions in my actions? I just get an error "Server undid Logux action because of error" with action logux/undo and reason "error" in action dispatch promise
7 replies
Neville Franks
@getclibu_twitter
I've updated logux server to 0.10.0 and I can no longer see how to specify cli arguments as mapArgs() in options-loader throws Error('Unknown argument ..' ).
ex. node js/index.js --dev thows re. --dev
6 replies
Neville Franks
@getclibu_twitter
I've updated from Node V15 to Node V16 for Logux as it engines spec doesn't include V15. Unfortunately I'm having issues with Parcel.js and Node v16 which I can't resolve at the moment. I briefly tried Vite but it had issues with Logux which I don't have time to investigate.
Is there any reason not to support Node V15?
4 replies
Neville Franks
@getclibu_twitter
I've spent most of the day working on https://gitter.im/logux/logux?at=60776a8d1f84d71853b9a092
My conclusion is when you have multiple tabs open then disconnect them onStorage() is still called after destroy() -> window.removeEventListener('storage', this.onStorage) has been called.
This in turn calls watchForLeader() -> startElection() even though all tabs are disconnected.
This in turn cycles through changing localStorage - leader value and then depending on where the cycle is connecting a Tab can see 'follower' and never connect to the server.
The solution to this needs someone with a better understanding of the code than I do.
4 replies
Neville Franks
@getclibu_twitter
Following on this is also manifesting with an issue on the server where both tabs have disconnected and the server is in a "connect" - "timeout" endless loop. ie.
LoguxError: A timeout was reached (20000 ms)
    at FilteredNode.syncError (file:///c:/webapps/clibuNotes/node_modules/@logux/core/base-node/index.js:225:15)
    at Timeout.<anonymous> (file:///c:/webapps/clibuNotes/node_modules/@logux/core/base-node/index.js:253:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  type: 'timeout',
  options: 20000,
  description: 'A timeout was reached (20000 ms)',
  received: false,
  connectionId: '31'
}
Ben Teichman
@effervescentia
Hi logux community! 🤘 I'm happy to have stumbled across your corner of the internet!
I am curious if there are any established patterns for "awareness" information, specifically for high-throughput information such as cursor location where the clients don't need to be notified of their action being distributed to other clients and no history state is required just applying a LWW algorithm
Ben Teichman
@effervescentia
Furthermore I'm waiting to hear back from the team currently but curious if anyone here has any details on the feature set that is available with the "pro" server? I'm guessing some sort of leader election / action re-broadcasting on server peers via redis based on one of the jsdoc comments for the Server options to allow for a setup with multiple servers for redundancy
2 replies
Neville Franks
@getclibu_twitter
Prior to Logux v0.10.0 we could specify a Server.loadOptions( .. { reporter: () => {} } to stop console output. With v0.10.0 reporter has changed to logger and so far I haven't found a way to stop this going to the console. How can I accomplish this?
4 replies
cosminv6u
@cosminv6u
Hi, I want to play a little bit with logux/state , is there any documentation or example I can use? I saw something in the readme on git, but seems not enough
4 replies