fbrausse / ksc Goto Github PK
View Code? Open in Web Editor NEWC Library with Python bindings to access the service API of the Signal messenger
License: GNU General Public License v3.0
C Library with Python bindings to access the service API of the Signal messenger
License: GNU General Public License v3.0
The current implementation uses the json_store
to do 2 things:
libsignal-protocol-c
expectsusername
, deviceId
, password
(to connect to the server), signalingKey
(to decrypt Envelopes sent by the server), but also contacts
and groups
.This information is crucial, if it is corrupted the account (or device, if it is a multi-device account) is gone and - depending on what data is corrupted - the sessions with others are lost (and their messages will fail to decrypt) or the server will entirely refuse to speak with you or both.
All this information is in a single JSON file. The reason for this design in ksc
is interoperability with the signal-cli
software family which only has this storage option.
Unfortunately, on every message - sent or received - the JSON file has to be updated. This is prone to errors as all the information gets replaced. We already do an open(tmp-file), write, fsync, close, rename procedure each time, however, this only gives us atomicity, not durability. As Ted points out, fsync
-ing the directory would provide durability in case of an unexpected crash (and can be implemented quickly).
However, there is the question of whether an approach like axc of using a transactional backend (SQLite in this case) might not be better than fiddling with JSON...
If the (internal) facil.io
event-loop could either
urwid
, orthis would eliminate the need for synchronizing between threads and allow scli
to use ksc
as a pure library in a single-threaded fashion. urwid
's requirements for its EventLoop do not seem to be very high, maybe the first option is viable?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.