Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 24 06:18

    ai on next

    Add 0/clean action docs (compare)

  • Oct 24 02:33

    ai on next

    Simplify docs Simplify another example (compare)

  • Oct 23 23:50

    ai on next

    Add encryptActions docs (compare)

  • Oct 23 07:45

    ai on next

    Add new log.type() (compare)

  • Oct 23 06:44

    ai on next

    Add colors to CI (compare)

  • Oct 23 05:08

    ai on next

    Use Node.js >= 14 on GitHub Update dependencies (compare)

  • Oct 23 05:07

    ai on next

    Ask for Node.js >= 14 (compare)

  • Oct 14 20:14

    ai on next

    Update unified api imports (#78… (compare)

  • Oct 14 20:14
    ai closed #78
  • Oct 14 20:06
    euaaaio synchronize #78
  • Oct 14 20:03
    euaaaio synchronize #78
  • Oct 14 20:01
    euaaaio synchronize #78
  • Oct 14 19:59
    euaaaio synchronize #78
  • Oct 14 19:56
    euaaaio synchronize #78
  • Oct 14 19:50
    ai commented #78
  • Oct 14 19:44

    ai on next

    Update Logux Redux API (compare)

  • Oct 14 19:41
    euaaaio opened #78
  • Oct 13 10:01
    ai commented #77
  • Oct 13 10:01

    ai on master

    added meta parameter (#77) (compare)

  • Oct 13 10:01
    ai closed #77
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
cosminv6u
@cosminv6u
Hi, is there some documentation about what's currently missing in Logux to support CRDT 100%?
And what's logux-data? (issue #11)
5 replies
Mario Meisenberger
@laborc8
Hi. It seams that logux is exactly what I was looking for. :) Great work I have to say - congrats! Can I use logux with angular? I already use a state tool (aktia) - Can I combine them? Is there any example server and client? I need to connect to php rest api (as backend) via server - is this doable. Are there any other projects like logux? So many questions :) I hope you can help me there - thanks
19 replies
nnn3d
@nnn3d

Привет! Обнаружил проблему с рассинхронизацией после обрыва интернета. На фронте есть subscribe на channel сущности (character), load (на сервере) которого отдает всю сущность целиком. Последовательность такая:

  • Отключается интернет
  • Выполняется действие - добавляется action (setRaceChoice), который меняет одно поле данной сущности
  • Включается интернет
  • Одновременно отправляются 2 запроса - отправка setRaceChoice и подписка на channel character
  • Соответственно, setRaceChoice не успевает обработаться до того, как прилетает load от channel character - и приходят устаревшие данные

Используется NoSQL БД - нормальную блокировку сделать проблематично
WS лог выглядит так - http://prntscr.com/us7lok
Есть ли возможность это решить?

7 replies
Gunnar Beutner
@gunnarbeutner

Hello, I've run into a problem and I'm not sure if it's a known bug or some issue with my own code:

  1. Client is offline and subscribed to the "groups" channel.
  2. Client updates an existing group (add_group action, stored locally for now).
  3. Client reconnects.
  4. Server processes add_group - but it takes a while (async DB query).
  5. Server sees client's subscription and sends add_group actions for groups (in the channel's load function)
  6. Server finishes processing the client's add_group message.

Because the DB query hasn't finished yet step 6 sends outdated group information. This seems to happen no matter whether my load/process functions are async or not. Is this what's being addressed by logux/logux#54

4 replies
cosminv6u
@cosminv6u
Hi, I'm coming back with an old issue we have. We use Logux Proxy and expose Rest Endpoints using Spring Boot Java. We want all the incoming rest requests to contain the Auth token we send from UI. This token is sent with the AUTH Action, but it's not sent with subsequent actions. Putting a firewall and whitelist the Logux Proxy is not an option because in that token we have more data, not only for authentication. We use Logux Vuex. Can we somehow intercept the outgoing WebSocket Messages and add in the meta the token? I don't want to use vanilla JS Logux, as I like Logux Vuex. I think it's a very common requirement for Spring Boot, so it might be helpful. I can help with the Logux code if you want.
85 replies
cosminv6u
@cosminv6u
Or Logux Proxy can keep in memory the Token and send it with every request. That would be the best
cosminv6u
@cosminv6u
Hello @ai, we started to rewrite Logux Core and Logux Server in Java, as we don't want to use Logux Proxy anymore.
It would be nice if you can give us a small guidance of what needs to be done. Right now we're using the documentation and we reverse engineer the JavaScript code, but it's a little bit hard for us.
I know we need to take care of each nodes time, put logs in order and so on. Maybe we can create on gitter a separate channel and have a longer discussion
7 replies
Maksim Semenov
@maksimsemenov
Hi, is it possible to change token on the logux client without changing user? Let's say I have an authentication token, that is about to expire, and I want to refresh it and replace it on logux client. I found only changeUser user method, that I might use, but I don't want to disconnect/reconnect, etc.
2 replies