Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.activities.sugarlabs.org #939

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

quozl
Copy link
Contributor

@quozl quozl commented Jan 27, 2021

No description provided.

- change from http to https,

- change to new server.
We are no longer using even numbered releases to indicate source
stability.
@quozl
Copy link
Contributor Author

quozl commented Jan 27, 2021

Tested. I had to switch from my non-default updater to the Sugar default with;

gsettings set org.sugarlabs.update backend 'aslo.AsloUpdater'

It worked, but it was really slow. Looking at it with tcpdump, Sugar is making one connection for each installed activity. The connection is not cached. Since the connection now uses https, the encryption setup time is multiplied by the number of installed activities. With me in Australia, the server in the USA, and 39 activities, it took 42 seconds. We need a way to cache and re-use the connection.

  • cache and re-use the connection,

@srevinsaju
Copy link
Member

Tested. I had to switch from my non-default updater to the Sugar default with;

gsettings set org.sugarlabs.update backend 'aslo.AsloUpdater'

It worked, but it was really slow. Looking at it with tcpdump, Sugar is making one connection for each installed activity. The connection is not cached. Since the connection now uses https, the encryption setup time is multiplied by the number of installed activities. With me in Australia, the server in the USA, and 39 activities, it took 42 seconds. We need a way to cache and re-use the connection.

  • cache and re-use the connection,

Another possible solution is to use Cloudflare to manage our DNS. This would provide a faster Cache to any other country, including but not limited to Australia, as they have data centers all around the world. Alex and I had been recently talking about this. So, using this would be a huge benefit especially for children in countries with poor internet connection.

@quozl
Copy link
Contributor Author

quozl commented Jan 27, 2021

I don't think so; the DNS lookup occurs once and is cached.

@srevinsaju
Copy link
Member

srevinsaju commented Jan 27, 2021

I don't think so; the DNS lookup occurs once and is cached.

Migrating our DNS to cloudflare would also help us to proxy certain domains through cloudflare's servers. Data which is transfered through their servers gets cached, and this cache would be served later on. This could possibly improve speed.
This would be an improvement, along with using a single connection instance.

image

image

@srevinsaju
Copy link
Member

srevinsaju commented Jan 27, 2021

@codewiz gave me another idea of using a single http request to get the data of multiple activities. This would however, require client side as well as server side changes.

Proposed plan
POST a json with the bundle id's of required activities to

https://v4.activities.sugarlabs.org/services/multipleAsloUpdater/

aslo4-server should reply with the data required for updating for all activities. The size of response will increase, for reducing the number of connections. What do you think?

@quozl
Copy link
Contributor Author

quozl commented Jan 27, 2021

Sounds complicated. Can't we just fix our use of Soup.Session in downloader.py and aslo.py so that the connection is not closed unless it needs to be closed?

@quozl
Copy link
Contributor Author

quozl commented Jan 27, 2021

Regarding CDN, this doesn't fix slow last mile links, as experienced by school children sharing a limited connection. It will be even worse for them than it is for me.

@srevinsaju
Copy link
Member

Sounds complicated. Can't we just fix our use of Soup.Session in downloader.py and aslo.py so that the connection is not closed unless it needs to be closed?

Agreed, I was suggesting something to be done along with Soup.Session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants