Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 12 01:26

    ai on next

    Update dev practices (compare)

  • Dec 11 2020 17:44

    dependabot[bot] on npm_and_yarn

    (compare)

  • Dec 11 2020 17:44

    ai on main

    Bump ini from 1.3.5 to 1.3.7 (#… (compare)

  • Dec 11 2020 17:44
    ai closed #79
  • Dec 11 2020 17:43
    dependabot[bot] labeled #79
  • Dec 11 2020 17:43
    dependabot[bot] opened #79
  • Dec 11 2020 17:43

    dependabot[bot] on npm_and_yarn

    Bump ini from 1.3.5 to 1.3.7 B… (compare)

  • Dec 01 2020 23:01

    ai on next

    Fix branch name (compare)

  • Dec 01 2020 01:11

    ai on next

    Update dependencies (compare)

  • Dec 01 2020 01:10

    ai on master

    (compare)

  • Dec 01 2020 01:09

    ai on main

    (compare)

  • Nov 17 2020 15:18

    ai on next

    Typo (compare)

  • Nov 08 2020 23:59

    ai on next

    Use resend shortcut (compare)

  • Nov 07 2020 15:05

    ai on next

    Use nameless single job (compare)

  • Nov 07 2020 15:05

    ai on next

    FIx job name (compare)

  • Nov 07 2020 15:04

    ai on next

    Update dependencies Add cache to CI (compare)

  • Nov 06 2020 13:03

    ai on next

    Fix workflow format (compare)

  • Nov 06 2020 01:22

    ai on next

    Clean up GitHub Action config (compare)

  • Oct 24 2020 06:18

    ai on next

    Add 0/clean action docs (compare)

  • Oct 24 2020 02:33

    ai on next

    Simplify docs Simplify another example (compare)

Andrey Sitnik
@ai
@cosminv6u you do not need to authenticate users for subscriptions and actions. Logux Server already authenticated users in auth phase of the connection and now you can trust to user ID from meta.id
6 replies
Gil Rosenthal
@gilrosenthal
Hi, I was wondering the purpose of the control server? It breaks my express in production, can it be disabled?
5 replies
cosminv6u
@cosminv6u

Hello, basic usecase (Logux Vuex, Logux Proxy, Java Spring Boot Rest Backend):

  • I use Logux to persist a new object (a Car)
  • The DB persist is done async, when it finishes it returns an UUID
  • How do I broadcast to all Subscribers that a new object was persisted? and send the object/uuid

ps: I know that a better approach would have been to set the UUID in Vuex, so the RESEND action would have taken care of all this,
but is there a best practice for my scenario?

  • Do I send a SEND_BACK REST call from the Backend to the Proxy (as it's done when the user first subscribes to a channel)?
46 replies
Illia Osmanov
@ilajosmanov
@ai Hey! Could you tell me, which strategy you using when need to show a loader for connection to a socket and then use an optimistic update?
My problem: if I go to offline mode, I have an infinite switch between connection and disconnected status and my loader also infinite
1 reply
Vuex includes isSubscribing key, but it's key to wait when an application will connect to a some channel
Illia Osmanov
@ilajosmanov
Or another case: I want to check connection 10 times, then stop this check 10 seconds and repeat again
1 reply
Shakirov Ruslan
@_sh_ruslan__twitter
Hello!
I've just starting learning about logux. Could you help me to understand one thing?
Initially, I thought that logux is a transparrent wrapper above Redux. I though, that redux actions will be executed locally and logux will send actions to the backend in the background.
I've tried to create a simple example, and I see that, in fact, the actions are not reduced on the client.
Is it by design or I'm missing something?
12 replies
James Devereux
@jjmountain
I've tried to follow your official tutorials for both the proxy server and node.js server and in both cases the same thing happens. I get my client and server started and in the browser console i just see a cycle of 'logux state is connecting..' 'logux state is disconnected' that continues indefinitely. Where could I start debugging?
1 reply

the client terminal tab says:
```Compiled successfully!
You can now view client-logux in the browser.

Local: http://localhost:3000
On Your Network: http://192.168.11.5:3000```

but nothing displays on the local address. It only displays on the 'on your network' address which seems odd too.

(also why doesn't markdown formatting of code work - I'm following the help tip)
linearza
@linearza
Hi all! We recently came across Logux in search of a viable offline first solution for out PWA. Currently our stack is Laravel/Node/Emberjs - would it be the right fit for us?
17 replies
Neville Franks
@getclibu_twitter
@ai I'm a little confused about the Logux.io docs. Specifically the Redux API and VuexAPI topics seem to have little content specific to Redux and Vuex and more importantly contain content of general use not covered elsewhere. For example Client, CrossTabClient etc. etc. are only covered in these topics . I would have thought all the content which is Framework independent should have it's own Topic and Redux/Vuex topics only contain info specific to there use.
20 replies
Andrey Sitnik
@ai

@getclibu_twitter logux/logux#51

sorry, in this month I spending all time for PostCSS 8 release :(

Neville Franks
@getclibu_twitter
@ai No probs as we say here in Oz.
Neville Franks
@getclibu_twitter

It would be great if logux/undo included the failed action that is being undone. I understand from https://logux.io/guide/concepts/action/#system-actions that:

action.id will be equal to meta.id of reverted action

however that means I need to keep a queue of added actions in order to find the id and know what the action being undone was.
Or am I missing something here?

28 replies
Boris Chumichev
@BorisChumichev
Hi there! I'm using logux redux client and want to disable crosstab event sync. Is there a way to do that? I want dispathc.sync call to send events only to the server, but not to the other tabs.
2 replies
Neville Franks
@getclibu_twitter
@ai I'm trying to 'Sign Out' the current user and revert back to a guest/anonymous user. I'm doing: 'logux/unsubscribe' and then Client.changeUser( guestUserId, undefined ).
After the changeUser() I get a "logux/subscribe" with resubscribe: true and the original user.
What is the best way to accomplish a Sign Out back to the guest user?
3 replies
Neville Franks
@getclibu_twitter
@BorisChumichev I'm not a Redux user but from the docs dispatch.local() looks like what you want. See: https://logux.io/recipes/cross-tab/
Neville Franks
@getclibu_twitter
@ai I'm confused about the Login process using your example https://logux.io/recipes/authentication/#method-2:-everything-in-logux
After the client gets 'login/done' I assume client.changeUser( action.userId, action.token ) needs to called to change from anonymous to the logged in user.
When I do this and then do a logux/subscribe the client is in a incorrect state as it still has the anonymous login which hasn't received alogux/sychronized leaving setSynchronized() in status() never passing if (Object.keys(processing).length === 0) because it has the anonymous item still present. Apologies for the long winded explanation.
The only way I've been able to get the login changing from the anonymous user to the real user is to client.destroy() and then client.start() with the logged in users credentials.
3 replies
cosminv6u
@cosminv6u
When using Logux Vuex, can I change the Token that is set when creating the store? Or I need to destroy the store and recreate it ?
4 replies
    const Logux = createLogux({
      subprotocol: config.subprotocol,
      server: config.loguxProxy,
      userId: someUserId
      token: i-want-to-change-this-when-user-pushes-a-button
    });
\o/
@kungosan_twitter
Hi! Related to the Server Proxy, isn't the idea that it knows how to communicate with a Logux Client, and then we implement some mappings in the Proxy so that it also knows how to communicate with the legacy backend? Acts like a bridge so that we don't have to bring any changes to the legacy backend?
Currently the documentation suggests to use Django or Rails library or implement your own inside the legacy backend, which makes me wonder why not then use that library to communicate directly with the Client?
4 replies
Neville Franks
@getclibu_twitter
@ai You might be interested in https://twitter.com/mikeal/status/1289655954443706368 I can't DM you on Twitter.
Taras Vozniuk
@ambientlight
To explore logux, I have built logux synchronization with auth on top of redux example todo app, might be helpful for someone: https://github.com/ambientlight/logux-todomvc
Bjørn Stabell
@beorn
Hi — I'm looking into doing a co-editor (RTC editor). Essentially a tree of nodes, some of which contain text strings. I see that Logux Data is on the horizon, which seems to allow us to model our state as a schema of CRDT types, or am I understanding it correctly?
7 replies
It also seems like Logux Data may not have a suitable text type initially — vs Yjs and Automerge, which seem to have working ones.
For the text type: My questions are whether I should wait for Logux Data (if it's a few weeks, or?) or try to find a way to use Automerge's CRDT with Logux — is that even feasible?
For the node tree: Would I be able to use Logux Data to model a tree of nodes?
I would also like to materialize some views, to index some data, on the client — could Logux do this, or help me keep those views up-to-date?
15 replies
Bjørn Stabell
@beorn
I also had a question on how you think about the cross-over between full-history-saved-by-CRDT vs only-last-state saved. It seems like we want history to be able to do optimistic updates, merging, offline, sync, but it's also unreasonable to store all history for all time. So I think in practice we'll have to have both. So there should be some kind of design decision where that boundary lies, and perhaps configurable some way. For example, design a system that will "finalize" state after T amount of time, but allow any kind events to "rewrite history" until T time has passed? I just haven't seen anything like this — in Logux it seems to be the server that finalizes state when it sees events, or?
5 replies
Bjørn Stabell
@beorn
Thanks for the replies!
Ruslan Shakirov
@ru-sh
Hi guys,
Is it possible to reduce the amount of logging events or configure logger to truncate log entries written to the console, so they won't spam the console?
10 replies
Neville Franks
@getclibu_twitter
@ai When a client comes back online and has a log of updates to send to the server, how can I find out when they've all been sent. This is all handled y Logux client code and I can't see how to see what it is doing.
I need to know this so the server db is updated before I get the server to send the client it's updates.
2 replies
cosminv6u
@cosminv6u
Hi. Is it possible that Logux unsubscribes from all channels and resubscribes after a big period of time without doing anything? And hence have the mutations called again (Vuex)
Eduard Aksamitov
@euaaaio
@cosminv6u can you describe your use case in more detail?
cosminv6u
@cosminv6u
@euaaaio for some reason the Logux client keeps disconnecting and connecting again to the proxy on our Dev server after few minutes . But on my local Logux proxy works fine, no disconnect and connect.
Eduard Aksamitov
@euaaaio
@cosminv6u oh, I can’t help with proxy 😩 Let’s call @ai
cosminv6u
@cosminv6u
@euaaaio the only difference of the servers is that the Dev one uses wss, the local server uses ws
Eduard Aksamitov
@euaaaio
What does the server log show?
cosminv6u
@cosminv6u

INFO Client was disconnected at 2020-08-27 12:55:50
Node ID: 1....

INFO Client was connected at 2020-08-27 12:55:51
Connection ID: 16
IP address: 1...

Around each 40 seconds
cosminv6u
@cosminv6u
I see a new connection being created in the Chrome>DevTools>Network> each 1 minute.
I restarted the Logux Proxy Server and it behaves the same
Doesn't matter on what page I am so I think the reason is not bad code
Maybe a network issue 🤔
12 replies
Alexey Naumov
@anaumov

Hey, guys! I try to build a simple app with rails backend but faild with this. The connection from client goes to proxy and rails well, but when I try to add something to logs proxy does not receive any message.

I suspect that client does not send action to server. What I did wrong? client send action code below

loguxClient.log.add({
    type: 'question/pick',
    payload
  });
11 replies
Alexey Naumov
@anaumov
Guys, what about auth for logux-rails+devise? Do I need to implement JWT and use it like I saw in example https://logux.io/guide/concepts/node/#authentication or you have 'in box' solution for devise somewhere?
3 replies
Neville Franks
@getclibu_twitter
I've got an issue with client Log entries being ignored. Here's the steps:
1) Client is offline
2) Client does CRUD actions which are added to the log.
3) Client Signs Out of app.
4) Client Signs In to App and connects to the server.
4a) This does log.add( { "signin" } with user = "anonymous" which is added to the log.
4b) Client connects to server, auth is done and client does syncSince()
4c) syncSince() -> syncSinceQuery() -> outFilter() matches the "anonymous" signin log entry and discards the earlier unsent crud log items.
15 replies
Neville Franks
@getclibu_twitter
@ai Did you see my reply?
Bobrov Dmitry
@bobredobre_gitlab
Привет! У нас есть клиент (Vue) и сервер (nodejs) на logux, сервер работает с PostgreSQL. Помимо logux сервера есть административная панель с SSR на php, которая работает с той же БД. Мы столкнулись со следующей проблемой: нам нужно по изменению, например, ролей пользователя, из административной панели отправить сообщение в channel. Похоже, что выходом будет поднятие вместе с logux сервером на nodejs рядом http сервера (express) и принятие сообщений от PHP событий и отправка их в logux channels. Подскажи, есть ли возможность вне описания экшнов и каналов отправлять экшны в каналы (например, из обработчика express)?
4 replies