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

New release #57

Closed
ilyalatt opened this issue Mar 21, 2021 · 14 comments
Closed

New release #57

ilyalatt opened this issue Mar 21, 2021 · 14 comments
Labels
enhancement New feature or request

Comments

@ilyalatt
Copy link
Owner

ilyalatt commented Mar 21, 2021

Because of @GihanSoft recent activity I got interest to Telega. I wanted to simplify the public interface a long time ago. I realized that it is too hard for a lot of developers. Because of that some devs avoid the library. Now I feel that I can spend a few days to implement my plan. I want to gather what I made and what I want to make for the new release.

  • simplified union tag access
  • documentation prototype
  • YAML-like DTO string representation (check out this page)
  • simplified auth for playground without config
  • automatic dto generation without need of ./generate-dto.sh
  • Roslyn analyzer to force ConfigureAwait(false)
  • IReadOnlyList<T> instead of Arr<T>
  • T? instead of Option<T>
  • LanguageExt dependency removal
@ilyalatt ilyalatt added the enhancement New feature or request label Mar 21, 2021
@ilyalatt
Copy link
Owner Author

@tarasverq @GihanSoft
If you have any ideas about how to simplify Telega submit them here please

@GihanSoft
Copy link
Contributor

You can use immutable arrays instead of read only list. It's part of .net standard (I think 2.1, and can be added to net standard 2.0 with nuget)

@GihanSoft
Copy link
Contributor

Check function for still connection stable.

@GihanSoft
Copy link
Contributor

Use SignInResult instead of exception.
Exceptions have impact that effect performance a lot.

@GihanSoft
Copy link
Contributor

GihanSoft commented Mar 22, 2021

Proxy. Specially socks5 and mt proto
(Http can be added too)

@GihanSoft
Copy link
Contributor

Set xml document in code for all public APIs. Start from Telegram Client.
And web document and guides.

@GihanSoft
Copy link
Contributor

Use rasolyn addins for async that can be added with nuget (don't include in build, just compile time.) Can help fix async problems.

@GihanSoft
Copy link
Contributor

Change Upload to IO or UpDowdLoad or File or something like that. Because it uses for download too.

@ilyalatt
Copy link
Owner Author

Use SignInResult instead of exception.
Exceptions have impact that effect performance a lot.

Performance is not critical on the sign in step. Much more CPU time is used for generating request. And a lot of time is just awaiting a call result. That's from pragmatic point of view.
From theoretical point of view there is RpcResult that resembles needed behavior. CallUnsafe can be introduced that creates exception but not throws it. SignIn can check an exception and return an error instead of throwing an exception.
But I am not sure because looks like it will complicate things more than needed.

@GihanSoft
Copy link
Contributor

Use SignInResult instead of exception.
Exceptions have impact that effect performance a lot.

Performance is not critical on the sign in step. Much more CPU time is used for generating request. And a lot of time is just awaiting a call result. That's from pragmatic point of view.
From theoretical point of view there is RpcResult that resembles needed behavior. CallUnsafe can be introduced that creates exception but not throws it. SignIn can check an exception and return an error instead of throwing an exception.
But I am not sure because looks like it will complicate things more than needed.

Ok, if it's not easy, no problem

@tarasverq
Copy link
Contributor

Hi everybody!

My wish list is:

  1. Async version of Match methods
  2. Public ctor for TelegaClient (not sure if it is acceptable in functional style)
  3. ISessionStore with sessionKey in argument of Load method (I use more than one account at once, so I have to create SessionStore for each account)

@ilyalatt ilyalatt pinned this issue Mar 27, 2021
@tarasverq
Copy link
Contributor

One more request: parallel download and upload of file parts inside of TelegramClientUpload class.
It should increase the speed of downloading and uploading.

May be I'll do it if you don't mind?

@ilyalatt
Copy link
Owner Author

One more request: parallel download and upload of file parts inside of TelegramClientUpload class.
It should increase the speed of downloading and uploading.

May be I'll do it if you don't mind?

Yeah, Sure. You'll need to modify DelayMiddleware. Right now it puts all calls in a task queue. So it should ignore a task queue for file requests. Then you need to modify TaskQueue to allow count to be more than one. It will be used in Downloading/Uploading. Then you need to create a task queue with degree 4 for example and put calls in it. It will look like fileRequests.Select(x => _taskQueue.Put(_tg.Call(x))).

@ilyalatt
Copy link
Owner Author

ilyalatt commented Dec 7, 2021

There is a lot of stuff that was planned and never happened. What is done is published under v0.5.0. The rest is moved to #80.

@ilyalatt ilyalatt closed this as completed Dec 7, 2021
@ilyalatt ilyalatt unpinned this issue Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants