dotnetgram | Unsorted

Telegram-канал dotnetgram - .NET Dev

-

Try to keep discussions on topic. Any job posting = ban. Spam/ads = deleted. Spam again = ban. Piracy, porn, gore = guess what? Ban. English only. No begging! No job posting allowed.

Subscribe to a channel

.NET Dev

Execute the task when a message received.

Читать полностью…

.NET Dev

RabbitMQ can specify that messages should only be consumed exactly once

Читать полностью…

.NET Dev

This kind of queue systems have mechanisms to help with that

Читать полностью…

.NET Dev

You may want to look into stuff like Azure Queues, RabbitMQ etc

Читать полностью…

.NET Dev

If you're worried that they might grab tasks and lead to multiple executions, you may need to ensure idempotence in your code

Читать полностью…

.NET Dev

No need for a transaction,

You can create a property "state" a enum with possible values as

New
Inprogress
Completed
Error
Needtoretry



While querying in service check for task that are in state new

Читать полностью…

.NET Dev

So you’ll need to check that

Читать полностью…

.NET Dev

👋there is a microservice A that adds tasks to the database, there is a service B that takes tasks from the database to execute. Both can work simultaneously in a distributed format (several instances at once) on different machines. Do I need to worry about synchronizing access to the database (MS SQL on Azure) or is it synchronized out of the box?

Читать полностью…

.NET Dev

Here anyone working on c# (in vscode) and (for database) postgre

Читать полностью…

.NET Dev

this one is much much better

Читать полностью…

.NET Dev

I've just tested espeak-ng... But its pronunciation of Mandarin is extremely wired...

That sounds like.... a robot.... a robot that made by an American..

Читать полностью…

.NET Dev

Anything recommended?

Читать полностью…

.NET Dev

Reena [6192545206] warned (1 of 2).
Due to: use @dot_jobs

Читать полностью…

.NET Dev

I’ve tried writing a similar context class but for some reason the source generation doesn’t work. Is there any way to see error output from source generators?

Читать полностью…

.NET Dev

oh that's easy, with net8 you can build aspnet apps using AOT, even if only minimal APIs are supported right now, but to (de)serialize DTOs you normally need reflection, which won't work in that scenario

using builder.Services.ConfigureHttpJsonOptions() you can configure the json options aspnet will use

this object has a list property called TypeInfoResolverChain, you can just add your generated context there to let aspnet know about it

Читать полностью…

.NET Dev

you can add a consumer to the execution app, subscribe a same topic

Читать полностью…

.NET Dev

Yep. Message Queue is designed to resolve such kind of problems..

Читать полностью…

.NET Dev

https://redis.io/docs/manual/patterns/distributed-locks/

Читать полностью…

.NET Dev

and also, you can use RedLock to prevent multiple executions...

Читать полностью…

.NET Dev

Reason behind no transaction is


Let's say service B tried to process the task xyz and it failed

In this case as per the transaction record's state will be updated as new again. I don't think it makes sense

Читать полностью…

.NET Dev

but if I am doing 2 operations (get new task from db and then mark it as "inprogress" to prevent others get it) I should use transactions, right?

Читать полностью…

.NET Dev

Worker can take same tasks potentially

Читать полностью…

.NET Dev

Don't ask to ask !!

Just asking for "help" or "someone" won't get you any answer.

➡️ Directly ask your question with sufficient details so that people can immediately look into it and answer you if they know enough on that subject to help.

Читать полностью…

.NET Dev

Right, we also need to build stuff we can come and replace once stakeholders realize how much it sucks 😎

Читать полностью…

.NET Dev

Wired 😂
Normal for a robot

Читать полностью…

.NET Dev

Perhaps piper, I did see it as one of the suggested options for Home Assistant

Читать полностью…

.NET Dev

Hey guys, I need an offline TTS engine that can run under Linux environment

Читать полностью…

.NET Dev

I am implementing google login in login logout but getting this error can anyone help me to solve this error of unhandled execption error

Читать полностью…

.NET Dev

even when not in AOT mode, using that you can skip the reflection step at app startup, which is nice

Читать полностью…

.NET Dev

nice, thank you very much
(i didn't understand the last paragraph but i can eventually dig by myself)

Читать полностью…
Subscribe to a channel