From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass (mailfrom) smtp.mailfrom=skoll.ca (client-ip=144.217.161.9; helo=dianne.skoll.ca; envelope-from=dianne@skoll.ca; receiver=) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; secure) header.d=skoll.ca header.i=@skoll.ca header.a=rsa-sha256 header.s=canit2 header.b=BdkPRkiC Received: from dianne.skoll.ca (dianne.skoll.ca [144.217.161.9]) by mail.toke.dk (Postfix) with ESMTPS id 7B2FEA675DB for ; Thu, 2 May 2024 22:17:39 +0200 (CEST) Received: from pi4.skoll.ca ([192.168.84.18]) by dianne.skoll.ca (8.17.1.9/8.17.1.9/Debian-2) with ESMTPS id 442KHYpU003397 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 2 May 2024 16:17:35 -0400 Received: from gato.skoll.ca (gato.skoll.ca [192.168.83.21]) by pi4.skoll.ca (Postfix) with ESMTPS id 4VVlbf48Xxzgd52Y; Thu, 2 May 2024 16:17:34 -0400 (EDT) Date: Thu, 2 May 2024 16:17:33 -0400 From: Dianne Skoll To: galene@lists.galene.org Message-ID: <20240502161733.600f42d3@gato.skoll.ca> In-Reply-To: <87bk5ovuy8.wl-jch@irif.fr> References: <87frv0w24k.wl-jch@irif.fr> <171467774184.1473.5473206404325247014@gauss.local> <87bk5ovuy8.wl-jch@irif.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skoll.ca; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=canit2; bh=aiZZZtvQTSPxg3D7qzwq69D4X1meWZINVe5QOhsQwSw=; b=BdkPRkiCBU6M NNOJHcNVOfccfvGQJ4WljG8ksoS/God+XBITRCfzfTFhXTJUH+tV4wfcE870XPxc NVAEygzalxtCIWYUS+Phtwo9qeN6kQEniJrgJXOK9WLs3jTr1e1O4PU/aTd0Jeyf JB4wnOvXN8OvfW6Qz3LgYC690u+gJ6Qb1zo5VSwZfz8whooBOsokOP7dBMoZ94ft YH6jVJKnrHTUcb7dIlg7Wn45CV69kOqMba/i9MoIKeuzhZ1DeTk+ospRc8TO+SJ4 oh3+DpMU9vQMhB36Cinn6hNeA/y6BpOqajdFAQNjrF4TS3XcRyk1cu01epMuUIyM 3Gbc7XaLfQ== X-Scanned-By: CanIt (www . roaringpenguin . com) X-Scanned-By: mailmunge 3.16 on 192.168.83.18 X-Spam-Score: undef - relay 192.168.84.18 marked with skip_spam_scan X-CanIt-Geo: No geolocation information available for 192.168.84.18 X-CanItPRO-Stream: outbound (inherits from default) X-Canit-Stats-ID: Bayes signature not available X-CanIt-Archive-Cluster: tWKWaF/NcZkqjWIj0BEJTBHJhwY X-CanIt-Archived-As: base/20240502 / 01cikhz07 Message-ID-Hash: QSHCCB6UZSLOIMB7T7UUQUNN7JDLDEOB X-Message-ID-Hash: QSHCCB6UZSLOIMB7T7UUQUNN7JDLDEOB X-MailFrom: dianne@skoll.ca X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Juliusz Chroboczek X-Mailman-Version: 3.3.9 Precedence: list Subject: [Galene] Re: Galene API frozen? List-Id: =?utf-8?q?Gal=C3=A8ne_videoconferencing_server_discussion_list?= Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 02 May 2024 22:07:43 +0200 Juliusz Chroboczek wrote: > > For the API endpoints: > > GET /galene-api/0/.groups/ > > GET /galene-api/0/.groups/groupname/.users/ > > rather than returning plain-text, one-per-line, wouldn't it make > > more sense to return a JSON array? > No objection if people feel strongly that way, but what's the > advantage? Consistency. If all the API endpoints return JSON, then the client code can simply deserialize the JSON objects and not worry about having to use different parsers for different endpoints. > JSON cannot be streamed, at least not without some hacks, > while a stream of lines can easily be scanned in constant space. Do any Galene installations have enough users or groups that this will be an issue? I can't imagine it would matter unless you have several thousand users. The usual way to handle this case is to provide a paged API where you can ask for users N through N+M (and the API therefore needs to provide them in a consistent order), but IMO this is not needed for Galene. > If the goal is to make the format extensible, then we'll want to send > either an array of dictionaries or a JSONL stream, but I really > cannot see any advantage to switching to just an array of strings. Extensibility is also a consideration, so an array of dictionaries might be better, but consistency in serializing/deserializing the objects IMO is a more important consideration. Regards, Dianne.