dependabot[bot] on npm_and_yarn
ai on main
Bump ini from 1.3.5 to 1.3.7 (#… (compare)
dependabot[bot] on npm_and_yarn
Bump ini from 1.3.5 to 1.3.7 B… (compare)
ai on next
Fix branch name (compare)
ai on next
Update dependencies (compare)
ai on master
ai on main
ai on next
Typo (compare)
ai on next
Use resend shortcut (compare)
ai on next
Use nameless single job (compare)
ai on next
FIx job name (compare)
ai on next
Update dependencies Add cache to CI (compare)
ai on next
Fix workflow format (compare)
ai on next
Clean up GitHub Action config (compare)
ai on next
Add 0/clean action docs (compare)
ai on next
Simplify docs Simplify another example (compare)
ai on next
Add encryptActions docs (compare)
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
});
syncSince()
syncSince()
-> syncSinceQuery()
-> outFilter()
matches the "anonymous" signin log entry and discards the earlier unsent crud log items.
Привет! Обнаружил проблему с рассинхронизацией после обрыва интернета. На фронте есть subscribe на channel сущности (character
), load (на сервере) которого отдает всю сущность целиком. Последовательность такая:
setRaceChoice
), который меняет одно поле данной сущностиsetRaceChoice
и подписка на channel character
setRaceChoice
не успевает обработаться до того, как прилетает load от channel character
- и приходят устаревшие данныеИспользуется NoSQL БД - нормальную блокировку сделать проблематично
WS лог выглядит так - http://prntscr.com/us7lok
Есть ли возможность это решить?
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:
add_group
action, stored locally for now).add_group
- but it takes a while (async DB query).add_group
actions for groups (in the channel's load function)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
changeUser
user method, that I might use, but I don't want to disconnect/reconnect, etc.
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
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.
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?
I have a question about action processing on the server. We have access
, resend
and process
callbacks. And resend
is called before the process
. I'm curious, what was the reasoning behind that?
The use case that I have in mind, is that if the process
callback fails (error while saving to the database, or maybe an error in some API call), I will need to send an undo
action to all notified clients and revert it on them. I think that in this use case, resending action after it was successfully processed might be more efficient and will require less work.
Also, a related use case is data validation. When using validation schema (like joi) it allows to validate incoming data and remove all unknown keys (sort of "sanitize" payload). And with the current order of callbacks, it is not clear where to put this validation:
access
callback, then we have to somehow pass the sanitized payload to the process
(passing it in ctx
alongside the action
seems wacky, but at the same mutating an action seems like a bad idea as well).process
we might end up with a lot of validation exceptions and a little bit of hustle reverting this action on all clients.So I wonder what are the author's thoughts on that?
import { Server } from '@logux/server';
// fake http to avoid Logux on server /
const fakehttp = { on: (event, cb) => console.log('FAKE HTTP: ', event, cb) };
const logux = new Server(
Server.loadOptions(process, {
subprotocol: '1.0.0',
supports: '1.x',
root: __dirname,
fakehttp,
}),
);
logux.ws = new WebSocket.Server({ noServer: true });
// hack to http
http.on('upgrade', (request, socket, head) => {
logux.ws.handleUpgrade(request, socket, head, (ws) => {
logux.ws.emit('connection', ws);
});
});
// apply server module
logux.listen();
INFO Client was disconnected at 2021-01-26 21:33:42
but there's no call from Proxy to Backend to inform that this happened. I need to do some cleanups on the Backend when a user disconnects. Is it possible? 10x
cosminv6u
but I can't log in with github ... so i used gitlab