Wednesday, July 1, 2020

How to increase a Kong timeout with no down time?

I have a Kong API gateway deployment with several services. The default Kong timeout is set to 1 mins, which fails several of our API requests. Now I want to change them to 10 mins, without going through too much trouble. What should I do? I found this nice tool called Deck, thanks to a blogpost.

The default status of a service configuration
First, install Deck.

Then, we test backup, alter, and restore Kong configurations.

To test, let's create a service definition.
$ curl -i -X POST --url http://localhost:8001/services/ --data 'name=v4' --data 'url='

Check the services via a browser (or a curl command, if you prefer it that way).


Notice the timeouts are 60,000. This is 60,000 ms. i.e., 1 min by default. Let's increase it to 10 min, with Deck!


1. Dump the configuration:

$ deck dump

This creates a kong.yaml in the current directory.

$ cat kong.yaml
_format_version: "1.1"
- connect_timeout: 60000
  name: v4
  path: /services/v4
  port: 9099
  protocol: http
  read_timeout: 60000
  retries: 5
  write_timeout: 60000

  Modify the connect_timeout, read_timeout, and write_timeout as 600000 (from their default value of 60000) via a text editor.

2.  Check the changes:

  $ deck diff

updating service v4  {
-  "connect_timeout": 60000,
+  "connect_timeout": 600000,
-  "created_at": 1.593636546e+09,
   "host": "",
   "id": "5c25f92f-d3d0-486f-9a8e-9c406a130501",
   "name": "v4",
   "path": "/services/v4",
   "port": 9099,
   "protocol": "http",
-  "read_timeout": 60000,
+  "read_timeout": 600000,
   "retries": 5,
-  "updated_at": 1.593636546e+09,
-  "write_timeout": 60000
+  "write_timeout": 600000

  Created: 0
  Updated: 1
  Deleted: 0

3. Commit the changes:

$ deck sync

Confirm the changes are reflected, from the browser. Yep, it worked. Everything updated with zero downtime.

Timeouts are set to 10 mins (600,000) now, from 1 mins!

Monday, June 29, 2020

Pandemic Atlanta Lockdown - Week 15

Mochi from Trader Joes
After the grant deadline and the conference, this week, everything is back to normal. I made my project into open source, after cleaning it up. Still, a long way to go, to make it flexible and readily usable by anyone. I also made some progress in my research, which is good. I am working on a paper with a deadline on July 15th. I foresee myself getting busy with that the coming week. I aim to seek more collaborators after my current deadline. Need to wear that researcher hat strong. :)

Not many updates this week. I got some excellent desserts such as Mochi from Trader Joe's. I have been waiting for these for almost four months now. I am happy I have them now. Trader Joe's never fails to amuse me. My fridge is also filled with liquors now. I must stop buying more liquors until I finish what I already have. I may buy Everclear, though. :)

I have had some fun conversations with friends and strangers this week on Twitter. Two questions that stood out and made me think:

A photo thread on countries that I have visited (still on-going at the time of writing this blog post):
These days, I am just continuing the boring cycle. Boring and uneventful, but still alive. Being thankful is part of the COVID19 lifestyle. See you again next week, as a long weekend reaches us this Friday!

Friday, June 26, 2020

Niffler: A DICOM Framework for Machine Learning Pipelines against Real-Time Radiology Images

I have been developing Niffler for quite some time. It is a DICOM network framework for machine learning pipelines. It retrieves the DICOM images from the PACS real-time and retrospectively based on the queries. It has been running for 19 months in our lab stable now, and has powered several machine learning research.

It extracts and stores metadata from the PACS in real-time, and also retrieves studies retrospectively for each specific studies on-demand.

Now it is time to make this project public for the broader scientific community. Please find it at This is still an alpha release. But we are working around the clock to make it usable by anyone in the universe of radiology!

 For more details and citation, please follow our pre-print: 

Kathiravelu, Pradeeban, Ashish Sharma, Saptarshi Purkayastha, Priyanshu Sinha, Alexandre Cadrin-Chenevert, Imon Banerjee, and Judy Wawira Gichoya. Developing and Deploying Machine Learning Pipelines against Real-Time Image Streams from the PACS. arXiv preprint arXiv:2004.07965 (2020).

We will keep you updated! Please feel free to send me if you have any questions or suggestions for improvement. I am also up for collaborations, as always! :)

Tuesday, June 23, 2020

Pandemic Atlanta Lockdown - Week 14

My drinks collection
After I completed my grant submission deadline, this week got busier with remote conferences. We also had some virtual annual meetings. The country has been introducing some additional visa restrictions amid the pandemic. This has made us ex-pats a bit more nervous about our future.

Not going to lie. Every day it takes me a considerable effort/time to comfort myself that things will be alright, despite the COVID-19, forced separation of families due to the travel restrictions, increasing othering and vilification of ex-pats by the governments, and uncertainty of future. I want to let you know, if you too feel like this, you aren't alone. Probably you are literally alone, just like me. But we both are alone together on this if that makes sense. Let's see where this wave takes us. I'm adventurous and nomadic. Still, this scene is new to me. In me, is a fight of known vs unknown: Should I move to the past/known or future/unknown? Sometimes, I like to return to places I enjoyed. Other times, I want to find new places that can be better. Hence my weird migration pattern: Sri Lanka Portugal → Sweden Portugal → CroatiaPortugal → USA Portugal → Belgium → Saudi ArabiaPortugal →USA.

These days, I am testing my skills in making cocktails. So far, I have tested a few cocktails and their variations, including, white Russian, Black Russian, Hairy Navel, Sex on the beach, Daiquiri, Cuba Libre, Gin Cuba Libre, Brown Cow, and Bahama Mama. I am sure the lockdown is making me into a bartender. lol. I am also watching some random documentaries on different countries. First, I watched one about Pakistan. It is about "The last Kalash of the Hindu Kush." It is a nice one.

This June 21st, it has been 2 years since we moved to Atlanta for our 2nd stint in Atlanta. There were many things that didn’t go as I wanted, incl things outside my control, such as COVID-19. Still, 2019 was my best year so far. I hope to fix the rest of my 2020. Never give up. Cheers.

Monday, June 22, 2020

Remote conferences - Conferences during the COVID19 Era

Lisboa, 2013 NY, and my Zoom background
COVID19 has made the conferences go remote. Some conferences, such as SDS 2020, were postponed in the hope that COVID19 will end soon. But eventually, COVID19 became a deadly pandemic that no conference could survive. Some conferences, such as DisCoTec 2020 became free to attend for any participants while charging the authors a negligible fee. Other conferences offered discounted rates, such as 50%. For those who have already paid the full registration fees, refunds for the overpayment were issued.

DisCoTec used the Zoom webinar for the conference. Unlike a Zoom meeting that lets you see and listen to every participant, Zoom webinar gives a monologue-kind of environment. Most, if not all, presenters had recorded their presentation as videos. It is similar to the SDS 2020 presentation that I am supposed to give by the end of June. We all have recorded PowerPoint presentations with our voice over and uploaded them as videos for the conference. DisCoTec had a similar approach, with the videos uploaded to YouTube, unlisted. I mostly attended the tutorials (Monday), and DAIS sessions (Tuesday - Thursday). I skipped the workshops (Friday).

There are several advantages in conferences going remote. First, remote online conferences let us continue conferences as usual, without giving up. Now the options are: remote conferences or postpone or cancel the conference. With the pandemic still going strong, postponing does not seem to work. That leaves us with either no conference for 2020 or a remote conference. Something is better than nothing! So remote conferences, it is. Second, they open up the conferences to a wider community - those who couldn't travel to conferences due to funding and visa limitations. Now, with less funding, we could join more conferences. OK, these advantages are quite obvious.

Now, let's look into the shortcomings of a remote conference, done in the DisCoTec way.

1. No scientific interaction between participants

Following the recorded presentations, there were live Q&A sessions that lasted up to 5 minutes. But, mostly, it was just listening to recordings. With time, I am sure the conference will list those uploads, making it possible for everyone to go and watch them on YouTube, on-demand. To incentivize attending to the conference session remotely, conferences must put additional efforts, beyond the Q&A. Otherwise, I may just watch them at leisure, and send my questions as emails to the authors.

Of course, the conference organizers created a slack channel (on Tuesday) for questions and answers from the sessions. Each conference session had its room. DisCoTec is an umbrella event with a parallel conference (including DAIS) and workshop sessions. So it had several rooms in the Slack channel with one general channel. 

2. No coffee-hour friendships and networking

One thing I usually love about conferences is the coffee hour discussions. We meet the presenter and ask questions or compliment their work. I am an extrovert when it comes to conferences. I roam around with a cup of coffee during the coffee breaks. I go and introduce myself to any lone participant and discuss their work. Penetrating an already existing group is harder. Sometimes, participants from the same university, company, or friends from the same country make a group and stick to each other. I always avoid that. Such groups usually appear less open to make new friends. On the other hand, I have always made friends with diverse groups that were formed on the spot. I have made groups at conferences, by joining several participants over the coffee hours. Then we all go for dinner or sightseeing together. The best of the conferences, indeed!

3. Less opportunity to find long-term collaborators

Conferences are an excellent opportunity to find long-term collaborators and even employers! During IC2E/SDS conference, I met my supervisor from Croatia for the first time. She had attended my presentation and found that her research aligned with my on-going Ph.D. research (which was still in its infancy). That's how I ended up in Croatia, spending a summer in a short-term scientific mission (STSM)! That STSM contributed to the core of my Ph.D. research. Such fruitful interactions won't happen easily in online conferences. At least not in this format. I tried to interact with participants on Twitter via the hashtags. But not much luck except for some minor chats. The potential to meet collaborators is highly limited in remote conferences such as this and almost non-existent for the audience. I hope that at least presenters got some visibility and interaction beyond the Q&A. Communications with potential future collaborators are the key motivation for conferences. Otherwise, I would rather publish my work in a journal instead. In fact, journals are even valued highly in academia. So there must be more incentives to submit and present our papers in conferences when the advantage of meeting researchers physically is no more.

4. Timezone differences

The timezone difference is the biggest challenge, even for an introvert who doesn't like to network with random researchers. The conference was in Malta timezone, as it was originally scheduled to be in Malta. So for the 10:00 - 18:30 sessions, I had to wake up early in the morning, as it is 4:00 - 12:30 in Atlanta time. I was planning to sleep early and wake up early. But I also had other work meetings, and I could not escape my work duties for the week. Hence, I ended up having to spend most of the week without proper sleep. I went to bed at regular times and woke up as early as 4 a.m. Given a chance, I would go to bed earlier and adjust my timing to the conference timezone, including the meal hours. That would have made me virtually travel to Malta!

Although when we travel to conferences, I still end up with little sleep - as I have to prepare my presentations and try to find some time to explore the city. I am used to timezone shifts. But the last week was like double work since I had the conference sessions followed by my regular work hours. If the conference sessions were held at Atlanta time, of course, I would have to sacrifice one of the two - either the work for the week or the conference.

Can we do better?

Yes. My university in Portugal (IST/Instituto Superior Técnico, Universidade de Lisboa) is hosting remote seminars on Mathematics, Physics & Machine Learning weekly. I joined the session on "Learning from Distributed Datasets: An introduction with two examples" last week. It was interactive. The session was hosted in a Zoom meeting. So the participants were able to see each other and even interact with the presenters before the event. It was nice to introduce myself to my ex-colleagues remotely. It was my first IST seminar after two years. Also, it is my first remote IST seminar ever. These online open seminars are one good thing that happened out of the pandemic. The recordings are, of course, available to watch later.

So in my opinion, such Zoom meetings that allow the participants to see and interact with each other before the sessions and during the "virtual coffee breaks" is a better option. Of course, zoombombing will be an issue. Password-protected conference zoom meetings can fix that.

The current move towards online conferences to combat COVID-19 travel limitations is a welcome move. However, it is not sure how long this will last. It will depend on the COVID-19 as well as the associated travel restrictions. The conference committees should take extra measures to make the conferences more interactive, to encourage communications between the participants and networking, rather than merely playing the recorded videos followed by a customary Q&A. This is new to all of us. So, of course, this is going to take a lot of iterations. Moreover, I empathize with all the conference organizers. They all have made tremendous efforts to organize the conferences physically. But they had to cancel their plans and again prepare for the online conferences.

Now CoopIS 2020 has gone online. It is one of the conferences I have presented in the past (I had papers there in 2015 and 2016). I am looking forward to attending more remote conferences whenever the topic is relevant to me, as long as the registration is free for the participants. I am yet not sure whether paying the registration fee is justified for a remote session, unless my paper is published in the conference.