here

advertisement
Philip A. Bernstein, Sergey Bykov, Alan Geller, Gabriel Kliot, Jorgen Thelin
Motivation:
• It should handle millions of requests per hour.
Problem:
S c a l a b l e Fault Tolerance
Data Consistency
High Availability
Unpredictability
Performance
Load Balancing
Reliability
Latency
Orleans
liberating the developers from dealing with those concerns)
• Enables applications to attain high performance, reliability
and scalability.
Traditional 3-tier architecture
Could make
consistency
issues
Orleans 3-tier architecture
Actor*
•
•
•
*The actor model was introduced in 1973
Actor
Virtual
1.



2.



3.



Virtual



Orleans
#2,548,308
Activation #1 @ 192.168.1.1
#2,031,769
Activation #1 @ 192.168.1.5
Orleans
Silo




cloud
Actors











Actors






Runtime








Runtime




Runtime





Runtime








Runtime
 Distributed
Directory
 How can it find each actor location?


 Each server hold a partition of the directory.
 On activation\deactivation a request is sent to the appropriate directory partition.
 Could be replicated on several servers.

Runtime
 Reliability
 Actor’s persistent state is the programmer responsibility. (The state should be
saved to some network storage)




Each server hold a membership view of all other servers.
Servers automatically detect failures via periodic heartbeats (practical 30-60 sec).
If a server fails, actors will be instanced on other servers on next message.
If the directory partition is lost, surviving servers will purge their directory based
on cache and state.
<Video>
Skill &
Ranking
Presence &
Matchmaking
Cheat
Detection
Challenges &
Unlockables
Game History
Profile
User
Generated
Content
Content
Management
Service




really bad
Search
Azure
Load-Balancer
Azure Storage
Front Door
Compute
Worker Roles
HDInsight
Hadoop
Visualization
Search
Azure
Load-Balancer
Azure Storage
Front Door
Compute
Worker Roles
HDInsight
Hadoop
Visualization
public class Presenceactor : actorBase, IPresenceactor
{
public Task Heartbeat(byte[] data)
{
HeartbeatData heartbeatData
= Heartbeat.Decrypt(data);
IGameactor game = GameactorFactory.Getactor(heartbeatData.Game);
return game.UpdateGameStatus(heartbeatData.Status);
}
}





Test Lab Numbers



Test Lab Numbers



Test Lab Numbers

What’s a Server?



Virtual
Machines
Physical
Machines

http://orleans.codeplex.com/

http://research.microsoft.com/en-us/projects/orleans/

Download