{"id":1388,"date":"2017-05-16T20:43:24","date_gmt":"2017-05-16T17:43:24","guid":{"rendered":"https:\/\/gokhan-gokalp.com\/?p=1388"},"modified":"2017-12-11T22:07:20","modified_gmt":"2017-12-11T19:07:20","slug":"orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma","status":"publish","type":"post","link":"https:\/\/gokhan-gokalp.com\/tr\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/","title":{"rendered":"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma"},"content":{"rendered":"<p>Merhaba arkada\u015flar.<\/p>\n<p>Daha \u00f6nceki <em><a href=\"https:\/\/gokhan-gokalp.com\/microsoft-orleans-ile-distributed-virtual-actor-model-e-giris\/\" target=\"_blank\" rel=\"noopener noreferrer\">Orleans&#8217;a Giri\u015f<\/a><\/em> makalem i\u00e7erisinde, bu aralar <strong>Orleans<\/strong> ve <strong>Actor-based<\/strong> sistemler \u00fczerinde durdu\u011fumdan bahsetmi\u015ftim. Bu makale konusu alt\u0131nda ise Orleans&#8217;\u0131 middle-tier olarak kullan\u0131p, loosely coupled ve scalable <strong>RESTful<\/strong> service&#8217;ler nas\u0131l olu\u015ftururuz konusuna de\u011finmeye \u00e7al\u0131\u015faca\u011f\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2017\/05\/reinvent-the-wheel.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-1393 lazyload\" data-src=\"\/wp-content\/uploads\/2017\/05\/reinvent-the-wheel.jpg\" alt=\"\" width=\"579\" height=\"347\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/reinvent-the-wheel.jpg 938w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/reinvent-the-wheel-300x180.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/reinvent-the-wheel-768x460.jpg 768w\" data-sizes=\"(max-width: 579px) 100vw, 579px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 579px; --smush-placeholder-aspect-ratio: 579\/347;\" \/><\/a><\/p>\n<p>Orleans&#8217;\u0131n bize kazand\u0131rd\u0131\u011f\u0131 pratikli\u011fin yan\u0131 s\u0131ra, mimari boyutta da yeni bir yakla\u015f\u0131m getiriyor asl\u0131nda. Data neredeyse business logic&#8217;in orada execute ediliyor oldu\u011fundan tutun, <strong>Reentrancy<\/strong> ve <strong>Concurrency<\/strong> gibi problemlerden de ka\u00e7\u0131n\u0131lm\u0131\u015f bir \u015fekilde her \u015feyin <strong>Scalable Grain<\/strong>&#8216;ler (Virtual Actor) taraf\u0131ndan handle ediliyor olmas\u0131 kula\u011fa ne kadar \u00e7ok harika geliyor, de\u011fil mi?<\/p>\n<p>Her neyse, actor-based sistemler her ne kadar fazlas\u0131yla ilgimi \u00e7ekiyor olsa da, Microsoft&#8217;un Orleans project&#8217;i ile neredeyse 10 y\u0131ll\u0131k yaz\u0131l\u0131m hayat\u0131ma farkl\u0131 bir bak\u0131\u015f a\u00e7\u0131s\u0131 geldi diyebilirim.<\/p>\n<h3>Orleans&#8217;\u0131 Middle-Tier Olarak Kullanmak<\/h3>\n<p>Orleans&#8217;\u0131n bize sunmu\u015f oldu\u011fu geli\u015fmi\u015f actor modeli ile, distributed ve high-scale uygulamalar\u0131 herhangi bir\u00a0reliability, distributed resource management veya scalability bottleneck&#8217;leri gibi concern&#8217;ler ve complexity&#8217;ler\u00a0olmadan geli\u015ftirebilmemize olanak sa\u011fl\u0131yor. Peki, bu kadar g\u00fc\u00e7l\u00fc bir framework&#8217;\u00fc RESTful service&#8217;lerimizin arkas\u0131nda bir middle-tier olarak kullanmak nas\u0131l olurdu?<\/p>\n<p>Dilerseniz konunun devam\u0131na bir \u00f6rnek ile devam edelim. Kullan\u0131c\u0131lar i\u00e7in bir ara\u00e7 takip sistemi geli\u015ftirdi\u011fimizi d\u00fc\u015f\u00fcnelim. \u0130htiyac\u0131m\u0131z olan ara\u00e7 verisini ise, s\u00fcr\u00fcc\u00fclerin arac\u0131 \u00e7al\u0131\u015ft\u0131rd\u0131klar\u0131 an\u00a0topluyor olaca\u011f\u0131z. Bu verilerin sonucunda ise \u00f6rne\u011fimiz gere\u011fi sisteme subscribe olan client&#8217;lara, arac\u0131n nerede oldu\u011fu bilgisini notification olarak g\u00f6nderece\u011fiz.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-1391 lazyload\" data-src=\"\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg\" alt=\"\" width=\"836\" height=\"348\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg 960w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture-300x125.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture-768x320.jpg 768w\" data-sizes=\"(max-width: 836px) 100vw, 836px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 836px; --smush-placeholder-aspect-ratio: 836\/348;\" \/><\/a><\/p>\n<p>Uygulayacak oldu\u011fumuz mimari tasar\u0131m, neredeyse yukar\u0131daki diyagram gibi olacakt\u0131r. Bir adet REST endpoint&#8217;i ve arkas\u0131nda \u00e7al\u0131\u015fan bir Silo.<\/p>\n<h4>Siloyu Olu\u015fturmak<\/h4>\n<p>\u0130lk olarak &#8220;VehicleTracking.Common&#8221; isminde bir class library olu\u015ftural\u0131m. Bu library i\u00e7erisinde Grainler aras\u0131 aktaracak oldu\u011fumuz message&#8217;lar\u0131 tan\u0131mlayaca\u011f\u0131z.<\/p>\n<p>&#8220;VehicleInfo&#8221; message&#8217;\u0131n\u0131, a\u015fa\u011f\u0131daki gibi tan\u0131mlayal\u0131m.<\/p>\n<pre class=\"lang:c# mark:6 decode:true\">using System;\r\nusing Orleans.Concurrency;\r\n\r\nnamespace VehicleTracking.Common\r\n{\r\n    [Immutable]\r\n    public class VehicleInfo\r\n    {\r\n        public long DeviceId { get; set; }\r\n        public string Location { get; set; }\r\n        public string Direction { get; set; }\r\n        public DateTime Timestamp { get; set; }\r\n    }\r\n}<\/pre>\n<p>Yukar\u0131da yer alan &#8220;[Immutable]&#8221; attribute&#8217;\u00fcn\u00fc, serialization i\u015flemleri s\u0131ras\u0131nda performans kazand\u0131rabilmek i\u00e7in kulland\u0131k. Orleans i\u00e7erisinde farkl\u0131 Silo&#8217;larda bulunan object&#8217;ler, Grain&#8217;ler aras\u0131nda <strong>binary serializer<\/strong> ile <strong>serialize<\/strong> edilip, tekrar\u00a0<strong>deserialize<\/strong>\u00a0edilerek g\u00f6nderilmektedir.<\/p>\n<blockquote><p><strong>[Immutable] Messages<\/strong><\/p>\n<p>Serialization i\u015flemi, object&#8217;lerin <strong>farkl\u0131<\/strong> Silo&#8217;larda bulunan Grain&#8217;lere ula\u015fabilmesi i\u00e7in ger\u00e7ekle\u015ftirilir. Bir di\u011fer yandan ise\u00a0<strong>ayn\u0131<\/strong> Silo \u00fczerinde bulunan Grain&#8217;lerin, ayn\u0131 object&#8217;e eri\u015fmemeleri ve internal state&#8217;lerini de\u011fi\u015ftirememeleri i\u00e7in <strong>deep-copy<\/strong> i\u015flemi ger\u00e7ekle\u015ftirilir. Fakat bu i\u015flem ayn\u0131 Silo \u00fczerinde bulunan Grain&#8217;ler i\u00e7in, biraz daha performansl\u0131 bir hale getirilebilinir. Performans optimizasyonu i\u00e7in Orleans i\u00e7erisinde ise bu serialization i\u015flemini, object&#8217;in immutable olup olmad\u0131\u011f\u0131na karar verebilerek, bypass edebilmek m\u00fcmk\u00fcnd\u00fcr.<\/p><\/blockquote>\n<p>&#8220;VehicleTracking.GrainInterfaces&#8221; isminde bir class library daha olu\u015ftural\u0131m ve i\u00e7erisine &#8220;IVehicleGrain&#8221; isminde bir interface tan\u0131mlayal\u0131m.<\/p>\n<pre class=\"lang:c# decode:true\">using System.Threading.Tasks;\r\nusing Orleans;\r\nusing VehicleTracking.Common;\r\n\r\nnamespace VehicleTracking.GrainInterfaces\r\n{\r\n    public interface IVehicleGrain : IGrainWithIntegerKey\r\n    {\r\n        Task SetVehicleInfo(VehicleInfo info);\r\n    }\r\n}<\/pre>\n<p>Tan\u0131mlam\u0131\u015f oldu\u011fumuz &#8220;IVehicleGrain&#8221; interface&#8217;i, s\u00fcr\u00fcc\u00fclerin konumlar\u0131n\u0131 takip edebilmemiz i\u00e7in ihtiya\u00e7 duydu\u011fumuz function&#8217;\u0131 i\u00e7ermektedir. Function ad\u0131na dikkat ederse e\u011fer, daha \u00e7ok bir\u00a0<strong>RPC<\/strong> tan\u0131mlas\u0131na benzedi\u011fini g\u00f6rebiliriz. \u00c7\u00fcnk\u00fc Orleans client&#8217;lar\u0131 ve Grain&#8217;leri, birbirleri ile RPC \u00fczerinden haberle\u015fmektedir.<\/p>\n<p>&#8220;IVehicleTrackingGrain&#8221; isminde yeni bir interface daha tan\u0131mlayal\u0131m.<\/p>\n<pre class=\"lang:c# decode:true\">using System.Threading.Tasks;\r\nusing Orleans;\r\nusing VehicleTracking.Common;\r\n\r\nnamespace VehicleTracking.GrainInterfaces\r\n{\r\n    public interface  IVehicleTrackingGrain : IGrainWithIntegerKey\r\n    {\r\n        Task SetVehicleTrackingInfo(VehicleInfo info);\r\n        Task Subscribe(IVehicleTrackingObserver observer);\r\n        Task Unsubscribe(IVehicleTrackingObserver observer);\r\n    }\r\n}<\/pre>\n<p>&#8220;IVehicleTrackingGrain&#8221; interface&#8217;i ile arac\u0131n hareket etti\u011fi durumlarda, &#8220;IVehicleGrain&#8221; \u00fczerinden arac\u0131n bulundu\u011fu konum bilgisini &#8220;SetVehicleTrackingInfo&#8221; method&#8217;u ile aktar\u0131yor olaca\u011f\u0131z. Sonras\u0131nda ise\u00a0sisteme subscribe olan client&#8217;lara, arac\u0131n hareket etti\u011fi durumlarda tracking bilgisini notification olarak g\u00f6nderece\u011fiz.<\/p>\n<p>Notification i\u015flemini ger\u00e7ekle\u015ftirebilmemiz i\u00e7in, bir observer tan\u0131mlayaca\u011f\u0131z. Bunun i\u00e7in &#8220;IVehicleTrackingObserver&#8221; isminde bir interface daha tan\u0131mlayal\u0131m.<\/p>\n<pre class=\"lang:c# decode:true\">using Orleans;\r\nusing VehicleTracking.Common;\r\n\r\nnamespace VehicleTracking.GrainInterfaces\r\n{\r\n    public interface IVehicleTrackingObserver : IGrainObserver\r\n    {\r\n        void ReportToVehicle(VehicleInfo info);\r\n    }\r\n}<\/pre>\n<p>Art\u0131k Grain implementasyonlar\u0131na ba\u015flayabiliriz.<\/p>\n<p>\u00d6ncelikle observe i\u015flemlerini ger\u00e7ekle\u015ftirece\u011fimiz, &#8220;IVehicleTrackingGrain&#8221; interface&#8217;ini implemente edelim.<\/p>\n<pre class=\"lang:c# decode:true\">using System;\r\nusing System.Threading.Tasks;\r\nusing Orleans;\r\nusing VehicleTracking.Common;\r\nusing VehicleTracking.GrainInterfaces;\r\nusing Orleans.Concurrency;\r\n\r\nnamespace VehicleTracking.Grains\r\n{\r\n    [Reentrant]\r\n    public class VehicleTrackingGrain : Grain, IVehicleTrackingGrain\r\n    {\r\n        private ObserverSubscriptionManager&lt;IVehicleTrackingObserver&gt; _observers;\r\n        private VehicleInfo _vehicleInfo;\r\n\r\n        public override Task OnActivateAsync()\r\n        {\r\n            _observers = new ObserverSubscriptionManager&lt;IVehicleTrackingObserver&gt;();\r\n\r\n            RegisterTimer(Callback, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5));\r\n\r\n            return base.OnActivateAsync();\r\n        }\r\n\r\n        Task Callback(object callbackState)\r\n        {\r\n            if (_vehicleInfo != null)\r\n            {\r\n                _observers.Notify(x =&gt; x.ReportToVehicle(_vehicleInfo));\r\n\r\n                _vehicleInfo = null;\r\n            }\r\n\r\n            return TaskDone.Done;\r\n        }\r\n\r\n        public Task SetVehicleTrackingInfo(VehicleInfo info)\r\n        {\r\n            _vehicleInfo = info;\r\n\r\n            return TaskDone.Done;\r\n        }\r\n\r\n        public Task Subscribe(IVehicleTrackingObserver observer)\r\n        {\r\n            _observers.Subscribe(observer);\r\n\r\n            return TaskDone.Done;\r\n        }\r\n\r\n        public Task Unsubscribe(IVehicleTrackingObserver observer)\r\n        {\r\n            _observers.Unsubscribe(observer);\r\n\r\n            return TaskDone.Done;\r\n        }\r\n    }\r\n}<\/pre>\n<p>Observe i\u015flemlerini Orleans i\u00e7erisinde bulunan &#8220;ObserverSubscriptionManager&#8221; helper&#8217;\u0131 ile ger\u00e7ekle\u015ftirece\u011fiz. <strong>Subscribing<\/strong> ve <strong>notification <\/strong>g\u00f6nderme gibi i\u015flemleri kolay bir \u015fekilde handle etmektedir. Override etti\u011fimiz &#8220;OnActivateAsync&#8221; method&#8217;u ise, Grain&#8217;in aktive edilme i\u015fleminin en son k\u0131sm\u0131nda call edilen bir method&#8217;dur. Burada ise &#8220;RegisterTimer&#8221; method&#8217;unu kullanarak, <strong>periodic<\/strong> olarak Grain&#8217;ler \u00fczerinde callback i\u015flemlerini ger\u00e7ekle\u015ftirebilmeyi sa\u011flad\u0131k. Callback method&#8217;una bakt\u0131\u011f\u0131m\u0131zda ise &#8220;_vehicleInfo&#8221; field&#8217;\u0131 null de\u011filse, subscribe olmu\u015f t\u00fcm client&#8217;lara &#8220;ReportToVehicle&#8221; method&#8217;u \u00fczerinden bir notification g\u00f6nderece\u011fiz.<\/p>\n<blockquote><p><strong>[Reentrant] Attribute<\/strong><\/p>\n<p>Yukar\u0131da decorate etimi\u015f oldu\u011fumuz &#8220;[Reentrant]&#8221; attribute&#8217;\u00fcn\u00fc de, network&#8217;de olu\u015fabilecek bottleneck&#8217;lere kar\u015f\u0131 ve performans optimizasyonunu artt\u0131rabilmek i\u00e7in kulland\u0131k. <em>Carl Hewitt<\/em>&#8216;in dedi\u011fi gibi, kavramsal olarak actor model i\u00e7erisinde message&#8217;lar birer birer i\u015flenmektedir. Orleans i\u00e7erisinde ise baz\u0131 maliyetli i\u015flerin oldu\u011fu durumlarda Grain&#8217;i block&#8217;lamamak i\u00e7in ihtiya\u00e7 duyulabilecek noktalarda, &#8220;[Reentrant]&#8221; attribute&#8217;\u00fc gibi tekniklerle\u00a0<strong>concurrent processing<\/strong> sa\u011flanabilmektedir. Fakat, kullanmam\u0131z gereken noktalarda dikkatli olmam\u0131z \u00f6neriliyor, aksi halde\u00a0<strong>race-conditions<\/strong> durumlar\u0131 ile kar\u015f\u0131 kar\u015f\u0131ya gelebiliriz.<\/p><\/blockquote>\n<p>Art\u0131k &#8220;IVehicleGrain&#8221; interface&#8217;ini a\u015fa\u011f\u0131daki gibi implemente edebiliriz.<\/p>\n<pre class=\"lang:c# decode:true\">using System.Threading.Tasks;\r\nusing Orleans;\r\nusing Orleans.Concurrency;\r\nusing VehicleTracking.Common;\r\nusing VehicleTracking.GrainInterfaces;\r\n\r\nnamespace VehicleTracking.Grains\r\n{\r\n    [Reentrant]\r\n    public class VehicleGrain : Grain, IVehicleGrain\r\n    {\r\n        private long _currentGrainId;\r\n\r\n        public override Task OnActivateAsync()\r\n        {\r\n            _currentGrainId = this.GetPrimaryKeyLong();\r\n\r\n            return base.OnActivateAsync();\r\n        }\r\n\r\n        public async Task SetVehicleInfo(VehicleInfo info)\r\n        {\r\n            \/\/some business logics...\r\n\r\n            var vehicleTrackingGrain = GrainFactory.GetGrain&lt;IVehicleTrackingGrain&gt;(_currentGrainId);\r\n\r\n            await vehicleTrackingGrain.SetVehicleTrackingInfo(info);\r\n        }\r\n    }\r\n}<\/pre>\n<p>Ara\u00e7lardan gelecek olan konum bilgisini &#8220;SetVehicleInfo&#8221; method&#8217;u\u00a0ile al\u0131p, sonras\u0131nda baz\u0131 business logic&#8217;ler do\u011frultusunda i\u015fledi\u011fimizi d\u00fc\u015f\u00fcnelim. Business logic&#8217;lerin i\u015flenmesinden sonra ise message&#8217;\u0131, \u00f6rne\u011fimiz gere\u011fi notification g\u00f6nderebilmek i\u00e7in &#8220;VehicleTrackingGrain&#8221;\u00a0e aktar\u0131yoruz.<\/p>\n<p>Art\u0131k implementasyonlar\u0131n\u0131 tamamlad\u0131k ve \u015fimdi a\u015fa\u011f\u0131daki gibi &#8220;VehicleTracking.TestSilo&#8221; isminde bir Orleans Dev\/Test Host&#8217;u olu\u015ftural\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2017\/05\/orleans-dev-silo-host.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-1417 lazyload\" data-src=\"\/wp-content\/uploads\/2017\/05\/orleans-dev-silo-host.jpg\" alt=\"\" width=\"911\" height=\"448\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-dev-silo-host.jpg 1581w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-dev-silo-host-300x147.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-dev-silo-host-768x377.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-dev-silo-host-1024x503.jpg 1024w\" data-sizes=\"(max-width: 911px) 100vw, 911px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 911px; --smush-placeholder-aspect-ratio: 911\/448;\" \/><\/a><\/p>\n<p>Sonras\u0131nda ise a\u015fa\u011f\u0131daki gibi &#8220;VehicleTrackingObserver&#8221; isminde bir class tan\u0131mlayal\u0131m.<\/p>\n<pre class=\"lang:c# decode:true\">using System;\r\nusing VehicleTracking.Common;\r\nusing VehicleTracking.GrainInterfaces;\r\n\r\nnamespace VehicleTracking.TestSilo\r\n{\r\n    public class VehicleTrackingObserver : IVehicleTrackingObserver\r\n    {\r\n        public void ReportToVehicle(VehicleInfo info)\r\n        {\r\n            Console.WriteLine($\"The vehicle id {info.DeviceId} moved to {info.Direction} from {info.Location} at {info.Timestamp.ToShortTimeString()} o'clock.\");\r\n        }\r\n    }\r\n}<\/pre>\n<p>Burada ise daha \u00f6nce tan\u0131mlam\u0131\u015f oldu\u011fumuz &#8220;IVehicleTrackingObserver&#8221; interface&#8217;ini implemente ettik. Arac\u0131n hareket haline ge\u00e7mesi ile birlikte gelen notification&#8217;lar\u0131, console \u00fczerine yazd\u0131raca\u011f\u0131z.<\/p>\n<p>&#8220;Program.cs&#8221; i\u00e7erisini ise, a\u015fa\u011f\u0131daki gibi de\u011fi\u015ftirelim.<\/p>\n<pre class=\"lang:c# mark:30-35 decode:true\">using System;\r\nusing Orleans;\r\nusing Orleans.Runtime.Configuration;\r\nusing VehicleTracking.GrainInterfaces;\r\n\r\nnamespace VehicleTracking.TestSilo\r\n{\r\n    \/\/\/ &lt;summary&gt;\r\n    \/\/\/ Orleans test silo host\r\n    \/\/\/ &lt;\/summary&gt;\r\n    public class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            \/\/ The Orleans silo environment is initialized in its own app domain in order to more\r\n            \/\/ closely emulate the distributed situation, when the client and the server cannot\r\n            \/\/ pass data via shared memory.\r\n            AppDomain hostDomain = AppDomain.CreateDomain(\"OrleansHost\", null, new AppDomainSetup\r\n            {\r\n                AppDomainInitializer = InitSilo,\r\n                AppDomainInitializerArguments = args,\r\n            });\r\n\r\n            var config = ClientConfiguration.LocalhostSilo();\r\n            GrainClient.Initialize(config);\r\n\r\n            \/\/ TODO: once the previous call returns, the silo is up and running.\r\n            \/\/       This is the place your custom logic, for example calling client logic\r\n            \/\/       or initializing an HTTP front end for accepting incoming requests.\r\n\r\n            Console.WriteLine(\"Orleans Silo is running.\\nPress Enter to terminate...\");\r\n\r\n            var vehicleTrackingObserver = new VehicleTrackingObserver();\r\n            var vehicleTrackingObserverRef = GrainClient.GrainFactory\r\n                                                    .CreateObjectReference&lt;IVehicleTrackingObserver&gt;(vehicleTrackingObserver).Result;\r\n\r\n            var vehicleTrackingGrain = GrainClient.GrainFactory.GetGrain&lt;IVehicleTrackingGrain&gt;(1);\r\n            vehicleTrackingGrain.Subscribe(vehicleTrackingObserverRef).Wait();\r\n\r\n            hostDomain.DoCallBack(ShutdownSilo);\r\n\r\n            Console.ReadLine();\r\n        }\r\n\r\n        static void InitSilo(string[] args)\r\n        {\r\n            hostWrapper = new OrleansHostWrapper(args);\r\n\r\n            if (!hostWrapper.Run())\r\n            {\r\n                Console.Error.WriteLine(\"Failed to initialize Orleans silo\");\r\n            }\r\n        }\r\n\r\n        static void ShutdownSilo()\r\n        {\r\n            if (hostWrapper != null)\r\n            {\r\n                hostWrapper.Dispose();\r\n                GC.SuppressFinalize(hostWrapper);\r\n            }\r\n        }\r\n\r\n        private static OrleansHostWrapper hostWrapper;\r\n    }\r\n}<\/pre>\n<p>Burada ise &#8220;IVehicleTrackingGrain&#8221; tipinde bir Grain instance&#8217;\u0131 alarak, &#8220;IVehicleTrackingObserver&#8221; \u00fczerinden subscribe i\u015flemini ger\u00e7ekle\u015ftirdik. Bu proje \u00fczerinde test ama\u00e7l\u0131 hem Orleans Silo&#8217;sunu aya\u011fa kald\u0131raca\u011f\u0131z, hem de observer \u00fczerinden gelen notification&#8217;lar\u0131 da console \u00fczerine yazd\u0131raca\u011f\u0131z.<\/p>\n<h4>REST Endpoint&#8217;ini\u00a0Tan\u0131mlamak<\/h4>\n<p>Art\u0131k REST endpoint&#8217;ini kodlamaya ba\u015flayabiliriz. Bunun i\u00e7in &#8220;VehicleTracking.Api&#8221; isminde empty bir Web API projesi olu\u015ftural\u0131m ve ard\u0131ndan a\u015fa\u011f\u0131daki gibi NuGet Package Manager \u00fczerinden, &#8220;Microsoft.Orleans.Core&#8221; paketini dahil edelim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2017\/05\/orleans-core.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1423 lazyload\" data-src=\"\/wp-content\/uploads\/2017\/05\/orleans-core.jpg\" alt=\"\" width=\"670\" height=\"211\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-core.jpg 670w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-core-300x94.jpg 300w\" data-sizes=\"(max-width: 670px) 100vw, 670px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 670px; --smush-placeholder-aspect-ratio: 670\/211;\" \/><\/a><\/p>\n<p>Bu i\u015flemin ard\u0131ndan, Silo ile ileti\u015fim kurabilmemiz i\u00e7in &#8220;Global.asax&#8221; i\u00e7erisinde test Silo&#8217;sunu a\u015fa\u011f\u0131daki gibi initialize etmemiz gerekiyor.<\/p>\n<pre class=\"lang:c# mark:12-13 decode:true\">using Orleans;\r\nusing System.Web.Http;\r\n\r\nnamespace VehicleTracking.Api\r\n{\r\n    public class WebApiApplication : System.Web.HttpApplication\r\n    {\r\n        protected void Application_Start()\r\n        {\r\n            GlobalConfiguration.Configure(WebApiConfig.Register);\r\n\r\n            var config = Orleans.Runtime.Configuration.ClientConfiguration.LocalhostSilo();\r\n            GrainClient.Initialize(config);\r\n        }\r\n    }\r\n}<\/pre>\n<p>Art\u0131k Silo ile ileti\u015fim kurabiliriz. Hemen &#8220;VehicleTracking&#8221; isminde bir controller olu\u015ftural\u0131m ve a\u015fa\u011f\u0131daki gibi kodlayal\u0131m.<\/p>\n<pre class=\"lang:c# mark:15-25 decode:true\">using Orleans;\r\nusing System;\r\nusing System.Threading.Tasks;\r\nusing System.Web.Http;\r\nusing VehicleTracking.Common;\r\nusing VehicleTracking.GrainInterfaces;\r\n\r\nnamespace VehicleTracking.Api.Controllers\r\n{\r\n    public class VehicleTrackingController : ApiController\r\n    {\r\n        [Route(\"api\/vehicle-trackings\")]\r\n        public async Task Post(long deviceId, string location, string direction)\r\n        {\r\n            var vehicleGrain = GrainClient.GrainFactory.GetGrain&lt;IVehicleGrain&gt;(deviceId);\r\n\r\n            VehicleInfo trafficInfo = new VehicleInfo()\r\n            {\r\n                DeviceId = deviceId,\r\n                Location = location,\r\n                Direction = direction,\r\n                Timestamp = DateTime.Now\r\n            };\r\n\r\n            await vehicleGrain.SetVehicleInfo(trafficInfo);\r\n        }\r\n    }\r\n}<\/pre>\n<p>Art\u0131k POST i\u015flemini ger\u00e7ekle\u015ftirebilece\u011fimiz bir\u00a0endpoint&#8217;e sahibiniz. Burada &#8220;deviceId&#8221; ile bir &#8220;VehicleGrain&#8221; initialize edip,\u00a0ara\u00e7 bilgilerini &#8220;SetVehicleInfo&#8221; method&#8217;u ile ilgili Grain&#8217;e aktar\u0131yoruz.<\/p>\n<p>Implementasyon i\u015flemleri bu kadar ve art\u0131k test i\u015flemi i\u00e7in haz\u0131r\u0131z. Test i\u015flemini ger\u00e7ekle\u015ftirebilmemiz i\u00e7in \u00f6nce Silo&#8217;yu initialize etmemiz gerekiyor. Bunun i\u00e7in &#8220;VehicleTracking.TestSilo&#8221; projesini start etmemiz yeterli olacakt\u0131r\u00a0ve sonras\u0131nda ise &#8220;VehicleTracking.Api&#8221; projesini start edece\u011fiz.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2017\/05\/orleans-silo.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1425 lazyload\" data-src=\"\/wp-content\/uploads\/2017\/05\/orleans-silo.jpg\" alt=\"\" width=\"979\" height=\"512\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-silo.jpg 979w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-silo-300x157.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-silo-768x402.jpg 768w\" data-sizes=\"(max-width: 979px) 100vw, 979px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 979px; --smush-placeholder-aspect-ratio: 979\/512;\" \/><\/a><\/p>\n<p>Bu i\u015flemin ard\u0131ndan &#8220;VehicleTracking.Api&#8221; projesini de start edelim ve <strong>Postman<\/strong> \u00fczerinden a\u015fa\u011f\u0131daki gibi &#8220;<em>\/api\/vehicle-trackings?deviceId=1&amp;location=Taksim Square&amp;direction=Bagdat Street<\/em>&#8221; endpoint&#8217;ine, bir POST iste\u011finde bulunal\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2017\/05\/restful-orleans-test.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1426 lazyload\" data-src=\"\/wp-content\/uploads\/2017\/05\/restful-orleans-test.gif\" alt=\"\" width=\"1550\" height=\"592\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1550px; --smush-placeholder-aspect-ratio: 1550\/592;\" \/><\/a><\/p>\n<p>Sonu\u00e7 olarak REST endpoint&#8217;i \u00fczerinden g\u00f6ndermi\u015f oldu\u011fumuz message&#8217;\u0131n notification i\u015fleminin, yukar\u0131da observer arac\u0131l\u0131\u011f\u0131 ile console \u00fczerine yazd\u0131r\u0131ld\u0131\u011f\u0131n\u0131 g\u00f6rebiliriz.<\/p>\n<h3>Sonu\u00e7 Olarak<\/h3>\n<p>Olu\u015fturmu\u015f oldu\u011fumuz REST endpoint&#8217;i ve middle-tier olarak \u00e7al\u0131\u015fan Orleans Silo&#8217;su ile, herhangi bir thread locking ve concurrency concern&#8217;leri olmadan loosely coupled ve scalable \u00e7al\u0131\u015fan bir sistem in\u015fa etmi\u015f olduk.<\/p>\n<p>Umar\u0131m faydal\u0131 bir blog yaz\u0131s\u0131 olmu\u015ftur. Bu aralar Orleans&#8217;\u0131n Docker Swarm ile beraber \u00e7al\u0131\u015fmas\u0131 \u00fczerine ara\u015ft\u0131rmalar\u0131m\u0131 s\u00fcrd\u00fcr\u00fcyorum\u00a0ve bu s\u00fcre\u00e7 i\u00e7erisinde edinebildi\u011fim veya kar\u015f\u0131la\u015faca\u011f\u0131m\u00a0tecr\u00fcbeleri sizlerle ba\u015fka bir blog konusu alt\u0131nda aktarmaya \u00e7al\u0131\u015faca\u011f\u0131m.<\/p>\n<p>\u0130lgili \u00f6rne\u011fe buradan eri\u015febilirsiniz:\u00a0<em><a href=\"https:\/\/github.com\/GokGokalp\/orleans-vehicletracking-sample\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/GokGokalp\/orleans-vehicletracking-sample<\/a><\/em><\/p>\n<blockquote><p>Kaynaklar:<\/p>\n<p>https:\/\/dotnet.github.io\/orleans\/Tutorials\/Front-Ends-for-Orleans-Services.html<\/p>\n<p>https:\/\/dotnet.github.io\/orleans\/Tutorials\/Concurrency.html<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Merhaba arkada\u015flar. Daha \u00f6nceki Orleans&#8217;a Giri\u015f makalem i\u00e7erisinde, bu aralar Orleans ve Actor-based sistemler \u00fczerinde durdu\u011fumdan bahsetmi\u015ftim. Bu makale konusu alt\u0131nda ise Orleans&#8217;\u0131 middle-tier olarak kullan\u0131p, loosely coupled ve scalable RESTful service&#8217;ler nas\u0131l olu\u015ftururuz konusuna de\u011finmeye \u00e7al\u0131\u015faca\u011f\u0131m. Orleans&#8217;\u0131n bize kazand\u0131rd\u0131\u011f\u0131 pratikli\u011fin yan\u0131 s\u0131ra, mimari boyutta&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/gokhan-gokalp.com\/tr\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/\">Devam\u0131n\u0131 okuyun<span class=\"screen-reader-text\">Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":1391,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,413,68],"tags":[391,414,416,390,389,415],"class_list":["post-1388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-actor-programming-model","category-architectural","tag-actor-model","tag-actor-programming-model","tag-front-end-for-orleans","tag-microsoft-orleans","tag-orleans","tag-restful-orleans","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"tr","enabled_languages":["en","tr"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"tr":{"title":true,"content":true,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma - G\u00f6khan G\u00f6kalp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma - G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/\" \/>\n<meta property=\"og:site_name\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-16T17:43:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-11T19:07:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/\"},\"author\":{\"name\":\"G\u00f6khan G\u00f6kalp\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"headline\":\"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma\",\"datePublished\":\"2017-05-16T17:43:24+00:00\",\"dateModified\":\"2017-12-11T19:07:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/\"},\"wordCount\":2514,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"image\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/orleans-web-server-architecture.jpg\",\"keywords\":[\"actor model\",\"actor programming model\",\"front end for orleans\",\"microsoft orleans\",\"orleans\",\"restful orleans\"],\"articleSection\":[\".NET\",\"Actor Programming Model\",\"Architectural\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/\",\"name\":\"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma - G\u00f6khan G\u00f6kalp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/orleans-web-server-architecture.jpg\",\"datePublished\":\"2017-05-16T17:43:24+00:00\",\"dateModified\":\"2017-12-11T19:07:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/orleans-web-server-architecture.jpg\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/orleans-web-server-architecture.jpg\",\"width\":960,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building Loosely Coupled and Scalable RESTful Services using Orleans\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"description\":\"C# &amp; Python lover\",\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gokhan-gokalp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"pronouns\":\"he\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"caption\":\"G\u00f6khan G\u00f6kalp\"},\"logo\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\"},\"sameAs\":[\"https:\\\/\\\/gokhan-gokalp.com\"],\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/tr\\\/author\\\/gok-gokalp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma - G\u00f6khan G\u00f6kalp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/","og_locale":"tr_TR","og_type":"article","og_title":"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma - G\u00f6khan G\u00f6kalp","og_url":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/","og_site_name":"G\u00f6khan G\u00f6kalp","article_published_time":"2017-05-16T17:43:24+00:00","article_modified_time":"2017-12-11T19:07:20+00:00","og_image":[{"width":960,"height":400,"url":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg","type":"image\/jpeg"}],"author":"G\u00f6khan G\u00f6kalp","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"G\u00f6khan G\u00f6kalp","Tahmini okuma s\u00fcresi":"18 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#article","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/"},"author":{"name":"G\u00f6khan G\u00f6kalp","@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"headline":"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma","datePublished":"2017-05-16T17:43:24+00:00","dateModified":"2017-12-11T19:07:20+00:00","mainEntityOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/"},"wordCount":2514,"commentCount":0,"publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"image":{"@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#primaryimage"},"thumbnailUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg","keywords":["actor model","actor programming model","front end for orleans","microsoft orleans","orleans","restful orleans"],"articleSection":[".NET","Actor Programming Model","Architectural"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/","url":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/","name":"Orleans ile Loosely Coupled ve Scalable RESTful Service Olu\u015fturma - G\u00f6khan G\u00f6kalp","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#primaryimage"},"image":{"@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#primaryimage"},"thumbnailUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg","datePublished":"2017-05-16T17:43:24+00:00","dateModified":"2017-12-11T19:07:20+00:00","breadcrumb":{"@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/"]}]},{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#primaryimage","url":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2017\/05\/orleans-web-server-architecture.jpg","width":960,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/gokhan-gokalp.com\/orleans-ile-loosely-coupled-ve-scalable-restful-service-olusturma\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gokhan-gokalp.com\/"},{"@type":"ListItem","position":2,"name":"Building Loosely Coupled and Scalable RESTful Services using Orleans"}]},{"@type":"WebSite","@id":"https:\/\/gokhan-gokalp.com\/#website","url":"https:\/\/gokhan-gokalp.com\/","name":"G\u00f6khan G\u00f6kalp","description":"C# &amp; Python lover","publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gokhan-gokalp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe","name":"G\u00f6khan G\u00f6kalp","pronouns":"he","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","url":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","caption":"G\u00f6khan G\u00f6kalp"},"logo":{"@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659"},"sameAs":["https:\/\/gokhan-gokalp.com"],"url":"https:\/\/gokhan-gokalp.com\/tr\/author\/gok-gokalp\/"}]}},"_links":{"self":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/1388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/comments?post=1388"}],"version-history":[{"count":53,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/1388\/revisions"}],"predecessor-version":[{"id":2007,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/1388\/revisions\/2007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media\/1391"}],"wp:attachment":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media?parent=1388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/categories?post=1388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/tags?post=1388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}