Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:35
    msftbot[bot] labeled #8298
  • 10:35
    EquineSolutions opened #8298
  • 09:44
    christiansparre closed #8275
  • 09:44
    christiansparre commented #8275
  • 07:38
    saiganov starred dotnet/orleans
  • 07:25
    ThokerWD starred dotnet/orleans
  • 05:52
    SimTsai commented #8290
  • 04:58
    ningpp starred dotnet/orleans
  • 02:50
    SimTsai commented #8290
  • 01:35
    TheFo2sh commented #8252
  • 00:04
    jkonecki commented #8289
  • 00:03
    ReubenBond commented #8289
  • Jan 30 21:48
    mmccord-processunity edited #8297
  • Jan 30 21:43
    jkonecki commented #8289
  • Jan 30 21:34
    mmccord-processunity edited #8297
  • Jan 30 21:32
    mmccord-processunity edited #8297
  • Jan 30 21:30
    msftbot[bot] labeled #8297
  • Jan 30 21:30
    mmccord-processunity opened #8297
  • Jan 30 20:50

    ReubenBond on main

    Implement DeleteStateOnClear fo… (compare)

  • Jan 30 20:50
    ReubenBond closed #8296
Reuben Bond
@ReubenBond
Especially if it needs to also be fault tolerant. I would opt for a simpler approach unless you need some precise semantics
Alexander-Bartosh
@Alexander-Bartosh
Thus a [reentrant] grain with a regular semaphore
OK thx will try
This approach does need all the requests/response data to be sent around the cluster ... which is might be considerable downside to some use-cases.
Joep van Diessen
@joepvand
Does anyone have experience with hosting orleans in k8s? with a seperate client and Silo project.I just cant figure it out
Reuben Bond
@ReubenBond

Reminder: we are on Discord now: https://aka.ms/orleans-discord

@joepvand yes, it's doable. What kind of clustering provider are you using? Best to discuss on discord
johnenginelab
@johnenginelab
Hi, I am looking for 2-3 C# engineers with experience in Orleans to help me with my project. Good rates and 6-12 months of work. Can anybody point me in the right direction?
Vincent
@vincent:librem.one
[m]
Here is a good place, do you have more info?
johnenginelab
@johnenginelab
It's a crypto project Vincent. Is there a way to PM so i can give you more details?
erikljung
@erikljung
Saw that @sergeybykov said the following "Calls (including stream events) to non-reentrant grains should not interleave. Timer callback are the only exception, a bug that became a feature over tme." You could use this.GetStreamProvider(..).GetStream<T>(id, namespace)from within a grain, but you could as well use IClusterClient.GetStreamProvider(..).GetStream(id, namespace). What is it that defines that the stream is coupled to the grain, because it seems like the two options does more or less the same thing, but the second doesn't necessarily seemed tied to the grain (if it's not done through the streamId). Please advice me.
erikljung
@erikljung
Resolving both of these stream providers from within a grain gives me the same provider instance.
erikljung
@erikljung
Or is it based on whether the method passed to stream.SubscribeAsync(someMethod) is a grain method? If so, does the grain method needs to be part of the grain interface or could it just be any method (even private) on the grain?
Tom Bohonan
@bohonan
Just starting to learn Orleans. I'm interested in how you might do standard reporting using something like power bi off data from say an order entity in Orleans. Reporting over a persisted grain state doesn't really the right thing to do. Would you just use a grain that listens to events to update data in a reporting db?
carlcamilleri
@carlcamilleri

Hi, I have a question to confirm understanding of https://dotnet.github.io/orleans/docs/grains/external_tasks_and_grains.html

I want to perform two concurrent asynchronous operations to a) read a record from a database (a record in Postgres) and b) read any related events from an event queue (in this case a list in Redis).

I am unsure of which of these approaches would be best:

Approach A


....grain code...
var tskLoadData = Task.Run(async () =>
{

    var tskLoadEntityFromDatabase = LoadEntityFromDatabase(_entityId);       
    var tskLoadEvents = LoadEvents(_entityId);
    await Task.WhenAll(tskLoadEntityFromDatabase, tskLoadEvents);
    return new { entity = await tskLoadEntityFromDatabase, events = await tskLoadEvents };
});

var resLoadData = await tskLoadData;
....grain code...

Approach B

....grain code...
var tskLoadEntityFromDatabase = LoadEntityFromDatabase(_entityId);       
var tskLoadEvents = LoadEvents(_entityId);
await Task.WhenAll(tskLoadEntityFromDatabase, tskLoadEvents);
var entity = await tskLoadEntityFromDatabase;
var events = await tskLoadEvents;
....grain code...

Is it the correct understanding that in Approach B, tskLoadEntityFromDatabase and tskLoadEvents would run sequentially, as they are scheduled on the Orleans turn-based task-scheduler ?

COCPORN
@COCPORN
Hey, sorry guys, it is just me again. I am strulling with the RequestContext-stuff in Orleans 4 preview-1. And I am sure "it is just me". I am using it inside of an incoming grain filter. As far as I can tell, I am setting it correctly, and the next time the filter is hit, it gets a non-null value with RequestContext.Get, but it is all default values in the object. Is this a known issue, or is it just I who lack the ability to code myself out of a wet paper bag?
COCPORN
@COCPORN
Could the problem be that the RequestContext is thread static, and await context.Invoke() switches threads?
COCPORN
@COCPORN
No, that doesn't seem to be it. It seems to not being able to do complex types, at least not mine.
I rewrote it to use simple types and that works.
    [Serializable]
    [GenerateSerializer]
    public class DiagnosticsPayload
    {
        public string CorrelationId { get; set; }

        public DateTimeOffset CreatedAt { get; set; }

        public int HopCount { get; set; }

        public string PreviousGrainName { get; set; }

        public string PreviousMethodName { get; set; }

        public string GrainName { get; set; }

        public string MethodName { get; set; }

        public string RequestSource { get; set; }

        public override string ToString()
        {
            if (PreviousMethodName != null)
            {
                return $"{PreviousGrainName}.{PreviousMethodName} => {GrainName}.{MethodName} ({HopCount}) {CreatedAt.Ticks} {CorrelationId} {RequestSource}";
            }
            else
            {
                return $"{GrainName}.{MethodName} ({HopCount}) {CreatedAt.Ticks} {CorrelationId} {RequestSource}";
            }

        }
    }
It doesn't seem to be able to do this.
Sorry for not formatting correctly, I cannot remember how to add snippets.
COCPORN
@COCPORN
I rewrote it to individually care about all the fields, but that seems like an exhaustive endeavor in tomfoolery. It is probably me doing something wrong, tho.
COCPORN
@COCPORN
Did you guys move to another chat service?
Boris Molodyi
@BMol1
It's all on Discord now...
COCPORN
@COCPORN
Ah, OK. Do you have an invite link?
Boris Molodyi
@BMol1
I got it from the project's site.
COCPORN
@COCPORN
image.png
I still see this:
1 reply
No rush, I will join you in a bit, I am unblocked.
COCPORN
@COCPORN
Thank you, friend! :) See you there.
Boris Molodyi
@BMol1
You're welcome!
Reuben Bond
@ReubenBond
I missed your messages, apologies :) Yep, we're all on Discord https://aka.ms/orleans-discord
bouyeijiang
@bouyeijiang
System.InvalidOperationException:“Unable to resolve service for type 'Orleans.IMembershipTable' while attempting to activate 'Orleans.Runtime.MembershipService.MembershipTableManager'.”
what that mean
Reuben Bond
@ReubenBond
It means no clustering is configured, @bouyeijiang - by the way, use Discord instead of Gitter: https://aka.ms/orleans-discord
E1adi
@E1adi

Hello everyone,
Based on the following reply of @ReubenBond:

@chillitom it's an ignorable internal detail which shouldn't be being logged at info level - ought to change that. It shouldn't affect your application. It usually means that a race occurred and the error is printed by the process which lost the race

I'd like to ask a question
I have few "Failed to forward message {Message} from {OldAddress} to {ForwardingAddress} after Non-existent activation. Attempt 2" log records and I'm trying to figure out what is going on..
Based on @ReubenBond answer, I assume that having a Non-Existent activation is quite common and should not be counted as anything special.
My hypothesis is that it may happen twice on the same activation and in such case reach the maximum forwarding attempts count and reject the message.
I assume that bumping up this number (maximum attempts for forwarding) will decrease the chances for it to happen.
My questions are:

  1. Is my hypothesis correct?
  2. Is my solution valid?
  3. What are the implications of increasing this number (maximum attempts for forwarding message)

Thanks!

2 replies
Marc Thompson
@ecliptec.mobile.ltd_gitlab

I'm trying to figure out performace issues with Orleans. Specifically, I am sending a packet from Unity client to Orleans, to initiate a combat action. Once the packet is received, a hit check is started via a timer (mimics an update loop). This timer performs a raycast hit check via a third-party physics engine.

There is a notable delay between receiving the packet and the commencement of the hit check (and timer), but I'm struggling to figure out what's causing the bottleneck.

I've tried to run the process through a profiler, namely DotNetTrace, but it's difficult to interpret the profile due to the threaded nature of Orleans. I realise you can't help with this specific problem without reviweing our code, however are you able to provide any steps/procedures that can help me with profiling.

immanuelFENNG
@immanuelFENNG
hello
immanuelFENNG
@immanuelFENNG
I 'm trying to build a C/S architecture system, but orleans is not open to the Internet, how can the client access orleans? any suggestion
1 reply
Tamás Balogh
@Lapeno94

Hello,

for in memory streaming (provider is a tcp stream) Grain methods could return Channel<byte[]> or should I use the Streaming api?
thanks in advance!!

Tom Rathbone
@chillitom
Hi, I'm writing a grain that owns a TcpClient connection to a remote API, when data arrives how can I schedule the work to be handled on the grain thread?
Reuben Bond
@ReubenBond

Periodic reminder: the Orleans community has migrated to discord: https://aka.ms/orleans-discord

Dilip Ramakrishnan
@diliprk95
Hello,
I am new to Orleans.
@sergeybykov
I am trying to refactor a existing Orleans implementation to handle long running grains timeout. Any suggestion on how to implement or how to identify the long running grain and handle the timeout exception.
Thanks in advance.
Reuben Bond
@ReubenBond
@diliprk95 please see the above message
vrecluse
@vrecluse
no SerializationProviders any more in 7.0, how to use ProtobufSerializer?
Reuben Bond
@ReubenBond
@vrecluse please see the above message 👆 https://gitter.im/dotnet/orleans?at=6320cb0f9994996293624700
Skeferstat
@Skeferstat

Hello, i am new to orleans. i am trying to build a client with .net47.
Have set up on the Hello World program with .net7.
Have changed the interface for grain to netstandard2 for this, the client and silo are unchanged. The interface project has the nuget packages Microsoft.Orleans.Core.Abstractions and Microsoft.Orleans.CodeGenerator.MSBuild.

I get an exception:
Exception while trying to run client: Unable to find an IGrainReferenceActivatorProvider for grain type hello

What I am doing wrong? Thanks for help!

Davies Harold
@harolddavies0610_gitlab
Resolving both of these stream providers from within a grain gives me the same provider instance. https://gitter.im/dotnet/orleans?at=6320cb0f9994996293624700/ https://cookieclicker.one/
ShreekantG
@ShreekantG
Does any one explain how threads are being created from orleans?
Reuben Bond
@ReubenBond
@ShreekantG Orleans does not create threads. It uses the .NET ThreadPool
Peter Bons
@Expecho
Question: it seems like calls done by the whole reminder system are not passing the IncomingGrainCallFilter, is this by design or am I wrong? I was hoping to see the call to ReceiveReminder in the filter.