Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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)

  • Oct 23 2020 23:50

    ai on next

    Add encryptActions docs (compare)

Bjørn Stabell
@beorn
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.
14 replies
Imad Bouziani
@imadbz
I am considering Logux for a production project. I have couple questions:
  1. What happens to the state if server crashes? How about actions that are not processed yet?
  2. How do you scale servers?
2 replies
Eduard Aksamitov
@euaaaio
  1. Server state is what you have in your database. Nothing more. And I think, after server crush, client will save all actions in the log, that will be processed after reconnection.
    “Logux is based on the offline-first idea. If the node is offline right now, new actions will wait for a connection in the node’s log. Offline is a standard mode for Logux application.”
cosminv6u
@cosminv6u
Hi, I created some tests to see how Logux resend actions to different browser instances. I used webdriver.io and for some reason I get some racing conditions. Some WD disconnect as well.
40 replies
My backend is NodeJs, I implemented increment and decrement (the Counter) example.
When I test it manually it works fine. When I run each testcase individually it works fine. But when I run all 8 test cases, sometimes they fail, always different, there's no rule.
cosminv6u
@cosminv6u
Is there a way to disconnect the client without losing the logs? I want to do some tests with offline mode. And I see Chrome doesn't disconnect the WS when set to offline mode.. there's a bug since 2014 for that
1 reply
cosminv6u
@cosminv6u
Hi again 😁 I was doing some tests with 2 browsers updating the same thing in offline mode. I was expecting LWW, but for some reason it seems that it matters who's getting online first, instead of the absolute order of the actions in time. Also when going online they don't have the same value..
43 replies

UseCase1: OK

B1 -> Logux
B2 = Logux
B1 OFF
B1 -> Logux2
B2 OFF
B2 -> Logux3
B1 ON
B2 ON
B1 = Logux3
B2 = Logux3

UseCase2: NOK

B1 -> Logux
B2 = Logux
B1 OFF
B1 -> Logux2
B2 OFF
B2 -> Logux3
B2 ON
B1 ON
B1 = Logux2 !NOK!
B2 = Logux3

Imad Bouziani
@imadbz

Hi , Technical question here, I wonder how you solved it before.

I am subscribing to a channel: users/:id, it might respond with the userData or deniedAccess or notFound.
In case I get the data, I can just show a loader until the data shows up in the frontend, however, how do I handle the other two cases since Logux only respond with a logux/undo event

I am new to CRDT architectures, I am sure its an obvious one but I couldn't think of a solution yet!

thanks a lot.

4 replies
asedsami
@asedsami
Hi I'm having a 'WS Error' which is seen only in development mode. I was wondering how can I catch that error in redux and let the user know that they're offline in production mode? thank you for any help you are able to provide.
4 replies
asedsami
@asedsami
Pouchdb uses Couchdb and there's no need to write server code like in logux(server.type) and the browser can connect to the Database directly which makes developing apps faster. but pouchdb does not resolve conflicts automatically and I don't wanna show the conflict to the user. I would also like to understand what's going on and have full control and that's the reason I'd like to implement the app in logux instead of pouchdb. say I create an Offline First Todo App. in two offline devices, I edit and change the title of the first todo, when they both go online, what should happen to the title? Is CRDT(and logux) the solution to this problem? 'likes/add' is an atomic action whereas 'likes/set' isn't, what could be the atomic action for editing text in a todo or in a note app?
11 replies
asedsami
@asedsami
In logux's Docs I found a missing comma. I couldn't edit and add the comma. I checked all document pages. in these four pages, the edit buttons don't link to the related markdown file: Redux API, Vuex API, Node API, Branding.
Maksim Semenov
@maksimsemenov

I'm trying to implement an optimistic update pattern with some store on the client. When I add an action to the logux, I apply this action to the store (I'm trying to use storeon). Then if the action fails, I receive a logux/undo action from the server. I'm trying to get this action from logux store and revert the changes in the store.

The problem is that, if I'm trying to listen for logux/undo in log.on('add') and use log.byId, the original action is no longer in log, because it was already cleared. So I can not use it to revert my changes in store.
When I'm trying to listen for logux/undo in log.on('preadd'), the logux/undo is fired only for the leading tab and is not fired in other tabs.

So what would be a canonical way to revert optimistic updates in multiple tabs?

8 replies