NCATSTranslator / Relay

Autonomous relay system for NCATS Biomedical Data Translator
MIT License
5 stars 24 forks source link

Compress data being sent to Appraiser #683

Closed MarkDWilliams closed 2 weeks ago

MarkDWilliams commented 2 months ago

Not for implementation right away (we'll need to wait for the corresponding changes to appraiser which will allow them to accept compressed data), but I've been talking with @maximusunc about this, and I believe this is the plan

  1. Changes will be made to Appraiser to allow it to accept compressed (gzip) data or plain JSON
  2. It will return responses in the same form as it received the request (i.e. If you send a JSON, you'll get a JSON. If you send gzip, you'll get gzip)

This should save us some "over the wire" time and increase performance. On our end, we will need to alter appraise() to compress the data it sends (or perhaps just don't UNcompress the Message/data before we send it over. I'll have to look). I would recommend that we uncompress the data we receive even if we could technically just save it as is to the database with slightly better performance. Saving it directly in zipped form, we wouldn't be able to see if there were any issues. Decompressing and compressing are cheap operations. Better safe than sorry.

ShervinAbd92 commented 2 months ago

I agree with you. overheard Max telling Chris about it this morning and i believe thats good call.

MarkDWilliams commented 2 months ago

It came up last night over dinner, thus justifying us staying around for the hackathon. Important work really DOES get done outside the core hours!

ShervinAbd92 commented 2 weeks ago

i believe this is implemented!