Galène videoconferencing server discussion list archives
 help / color / mirror / Atom feed
From: Dianne Skoll <dianne@skoll.ca>
To: galene@lists.galene.org
Cc: Juliusz Chroboczek <jch@irif.fr>
Subject: [Galene] Re: Galene API frozen?
Date: Thu, 2 May 2024 16:17:33 -0400	[thread overview]
Message-ID: <20240502161733.600f42d3@gato.skoll.ca> (raw)
In-Reply-To: <87bk5ovuy8.wl-jch@irif.fr>

On Thu, 02 May 2024 22:07:43 +0200
Juliusz Chroboczek <jch@irif.fr> 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.

  reply	other threads:[~2024-05-02 20:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 17:32 [Galene] " Juliusz Chroboczek
2024-05-02 19:22 ` [Galene] " Dianne Skoll
     [not found] ` <171467774184.1473.5473206404325247014@gauss.local>
2024-05-02 20:07   ` Juliusz Chroboczek
2024-05-02 20:17     ` Dianne Skoll [this message]
     [not found]     ` <171468106125.1473.12323438012415538261@gauss.local>
2024-05-02 20:33       ` Juliusz Chroboczek
2024-05-02 20:53         ` Dianne Skoll
2024-05-03 18:26   ` Juliusz Chroboczek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240502161733.600f42d3@gato.skoll.ca \
    --to=dianne@skoll.ca \
    --cc=galene@lists.galene.org \
    --cc=jch@irif.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox