Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Distributed .NET with Microsoft Orleans

You're reading from   Distributed .NET with Microsoft Orleans Build robust and highly scalable distributed applications without worrying about complex programming patterns

Arrow left icon
Product type Paperback
Published in May 2022
Publisher Packt
ISBN-13 9781801818971
Length 262 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Bhupesh Guptha Muthiyalu Bhupesh Guptha Muthiyalu
Author Profile Icon Bhupesh Guptha Muthiyalu
Bhupesh Guptha Muthiyalu
Suneel Kumar Kunani Suneel Kumar Kunani
Author Profile Icon Suneel Kumar Kunani
Suneel Kumar Kunani
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Section 1 - Distributed Applications Architecture
2. Chapter 1: An Introduction to Distributed Applications FREE CHAPTER 3. Chapter 2: Cloud Architecture and Patterns for Distributed Applications 4. Section 2 - Working with Microsoft Orleans
5. Chapter 3: Introduction to Microsoft Orleans 6. Chapter 4: Understanding Grains and Silos 7. Chapter 5: Persistence in Grains 8. Chapter 6: Scheduling and Notifying in Orleans 9. Chapter 7: Engineering Fundamentals in Orleans 10. Section 3 - Building Patterns in Orleans
11. Chapter 8: Advanced Concepts in Orleans 12. Chapter 9: Design Patterns in Orleans 13. Section 4 - Hosting and Deploying Orleans Applications to Azure
14. Chapter 10: Deploying an Orleans Application in Azure Kubernetes 15. Chapter 11: Deploying an Orleans Application to Azure App Service 16. Other Books You May Enjoy

Naming a grain

When we create an object of a class using a new operator, what we get is the reference to the memory location. The variable identity is the name we define. If we create another object of the same class, we will get a reference to some other memory space.

As we learned before, grains represent some real-world entities. They exist virtually always. So, grains must have an identity to activate or interact with them. This is fundamentally the primary key of the grain. The scope of the key is the grain type. In the example that we saw in the previous section, Distel.Agra is the primary key of the hotel grain that we created. It represents the hotel with the name Distel.Agra. The scope of this identity is limited to hotel grains.

In Orleans, we have three main types of primary keys:

  • Integer
  • GUID
  • String

In addition to these, there are compound keys:

  • Integer + string
  • GUID + string

The grain key is determined by the interface...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime