Wednesday, September 28, 2011

Object Oriented Concurrency: A Deep Dive into Celluloid (Part 1)

There's a quote from Alan Kay I've often cited as a source of inspiration in my various projects, from Revactor to Reia to Celluloid:
"I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages"--Alan Kay, creator of Smalltalk, on the meaning of "object oriented programming"
This conception of objects likens them to things in the world which are very much concurrent. Every cell in your body is running at the same time, and cells communicate with each other using chemical signals. Computers on a network are all running at the same time, sending each other messages via network protocols.

In Alan Kay's conception of object oriented programming, it should be a natural model for concurrency. However, most languages that describe themselves as "object oriented" today bolt on concurrency as an afterthought, just a thin abstraction layer around the concurrency primitives provided by the operating system, such as threads, conditions, and mutexes. The hardware and OS people went through the herculean effort of abstracting hardware-level concurrency into threads, and from there, for the most part the programming language people haven't done much, at least in mainstream object oriented languages.

The exception lies in the functional language domain, in languages like Haskell, Clojure, and Erlang. Erlang, in part inspired by Alan Kay's language Smalltalk, has abstracted concurrency in such as way that users of the language are able to reason about it intuitively, something which can't be said for most users of threads. The key to Erlang's success, its secret sauce, lies in its message-based concurrency system, a system inspired by Smalltalk.

Smalltalk is generally considered to be the forerunner of all object oriented programming languages, but when it comes to taking to heart Alan Kay's conception of a message-based system, Erlang beats the mainstream object oriented languages hands down. Erlang has also incorporated the idea of communicating sequential processes, first seen in languages like Occam. By combining the ideas of Smalltalk with those of communicating sequential processes, Erlang created a system where concurrency is baked into the core of how the language operates, enabling fully isolated processes that talk to each other with asynchronous messages.

If this idea works so well in Erlang, can it be added to other languages in a way that makes sense?

From Actors to Concurrent Objects

Given Erlang was vicariously inspired by Smalltalk, an object oriented language, is there any reason why Erlang's ideas can't be applied to present-day object oriented languages to give them concurrent objects? The way Alan Kay describes objects they should inherently be concurrent, but the way we're used to working with objects is inherently sequential.

A whole slew of projects, including one of mine, have tried to implement Erlang's concurrency model in Ruby. None of them have been popular. In my opinion, this is because these projects (including my own project Revactor) have stuck far too close to Erlang, trying to write an Erlang DSL in Ruby instead of trying to reimplement these concepts in a Ruby-like manner. This makes trying to learn them pretty confusing, to the point where the best way to learn them is to first learn Erlang, then after you understand how Erlang works, you can translate in your head from Erlang into these Erlangy Ruby DSLs. Seems bad...

I read a blog post recently about how in the Smalltalk objects that end in "-er" (e.g. Manager, Controller, Builder, Worker, Analyzer) are "bad." For a long time I've thought much the opposite, that there are fundamentally two different types of objects: those which are inanimate and represent objects in the world, and those which are animate and active and manipulate the inanimate objects. I see the programming world as consisting of two very distinct things: actors, and the objects which they act upon. It's not that objects that end in -er are inherently bad, it's simply that OOP languages (including Smalltalk) have never contained the proper primitive for modeling their behavior.

Celluloid is a new kind of concurrency library. It allows you to model concurrent (i.e. thread-backed) actors in a system but still interact with them as if they were plain old Ruby objects. All you need to do to create concurrent objects in Celluloid is to include the Celluloid module in any Ruby class:

That's it! Just by doing "include Celluloid" all instances of this class you create will not be normal Ruby objects, but instead fully concurrent Celluloid-powered objects. These objects will continue to function just like any other object in Ruby. When you call methods on them they return values. If a method raises an exception, the method call aborts and the exception will continue to propagate up the stack.

I want to emphasize this because I think it's incredibly important: users of concurrent objects should not need to be aware that they're concurrent. They should work as closely as possible to any other plain old sequential objects.

Concurrent Objects in Celluloid

I'm going to help you understand how Celluloid works by first starting from a diagram of normal Ruby object interactions and building up from there. Let's start with a diagram of one method calling another:

Hopefully this diagram is easy to understand. Calls come in, responses go out, never a miscommunication! A call consists of the name of a method to invoke and arguments. The response consists of a value to return, or an exception to be raised. Object oriented dogma would have you think of a call as the caller sending a message to the receiver, which in turn sends a response back.

Now let's look at a concurrent object as implemented by Celluloid:
A quick overview: the caller and proxy objects function like normal Ruby caller and receiver objects in the previous diagram. However, the actor circle (i.e. the giant olive-looking thing) represents Celluloid's encapsulation of concurrency. Each actor runs in a separate thread, and exchange messages with proxy objects through their mailboxes, which are thread-safe message queues. Let's dive in!

All communication between regular Ruby objects and Celluloid's actors passes through a proxy object which intercepts the calls. This proxy is responsible for the central illusion that makes Celluloid's concurrent objects as easy to use as any other object, despite them being off in a distant actor somewhere that you must communicate with via messages through thread-safe mailboxes. The proxy object abstracts that all away, and gives you the familiar object-dot-method syntax that you know and love.

The proxy object translates the method call from a normal invocation into a Celluloid::SyncCall object. This object contains the method to be invoked and the parameters. This message is sent from the proxy to the recipient actor by way of its mailbox (which is an object of the Celluloid::Mailbox class).

Mailboxes work like thread-safe message queues, allowing several pending method invocations that the actor can process one-at-a-time. After a method has been invoked on the receiver object, the return value is sent back to the proxy in the form of a Celluloid::Response object. This value is then returned from the original method call made to the proxy.

This gives us the same behavior as a normal method call. However, normal Ruby objects aren't concurrent. To gain concurrency, we need to go beyond the normal method call pattern.

Adding Concurrency: Async Calls and Futures

Celluloid provides two methods for breaking out of the typical request/response call pattern:

  • Asynchronous calls: send a Celluloid::Call to a recipient actor, but doesn't wait for a response. The method call to the proxy returns immediately. To make an async call, add "!" to the end of any method.
  • Futures: allow the value a method returns to be obtained later, while that method computes in the background. To make a future call to an actor, use the #future(:method_name, arg1, arg2... &block) syntax. This returns a Celluloid::Future object, whose value can be obtained by calling Celluloid::Future#value
Let's look at these both to see how they actually work. First an asynchronous call, as we'd do it from Ruby code:

Even though ScarlettJohansson doesn't have an #oops! method, things are continuing to work as if you made two calls to the normal ScarlettJohansson#oops method, but no value is returned. Here's a diagram of what happens when you make an asynchronous call:

Asynchronous calls do not wait for responses, but forward a request for a method to execute, immediately returning back to the caller. No mechanism is provided to obtain a response to this call; async calls are a strictly fire-and-forget type of affair.

What if we want to invoke a method asynchronously but obtain the value the method returns at some point in the future? Enter futures!

Let's imagine we have a small army of Scarlett Johansson clones leaking photos on the Internet. Each one of them takes a little while drinking booze and fumbling around with their phone before they're actually able to post a nude photo. How can we tell them all to start doing this then reaping the results instantaneously when they're done? Let's use Celluloid::Actor#future to accomplish this task:

Our Scarlett Johanssons are now leaking photos to the Internet in parallel, and the wall clock time needed to have all of them get drunk and fumble around with their phone in order to post their nude photos is now barely more than the time each individual Scarlett took to post a couple photos. We're able to get the return value from ScarlettJohansson#oops after asynchronously requesting it be computed. How does this work exactly?

Celluloid implements futures through the Celluloid::Future object. Futures represent the result of a method which may or may not have finished executing before its result is requested. To obtain the result of a given future, call Celluloid::Future#value, but you need to be aware that Celluloid::Future#value will block until the method the future is associated with has finished executing.

Obtaining the value of a pending future is, like always, synchronized through a Celluloid::Mailbox object, which is used to provide a thread-safe interaction point for receiving the result of a method call if it hasn't already completed.

More to come!

I'd originally hoped for this blog post to contain a lot more, but honestly it's been sitting around half-finished for so long I thought I'd break it apart into a series.

In Part II, I'd like to cover what makes Celluloid truly unique (to my knowledge) among similar systems: "reentrant" method dispatch. This post will cover problems in existing RPC systems, including Erlang's gen_server, and discuss why Celluloid provides a more natural object abstraction. It will also explain why and how Celluloid uses Fibers to solve this problem, and the additional features that can be built upon Celluloid's reentrant method dispatch.

Part III (if I get that far) will provide a more in-depth look into some of the Erlangier features of Celluloid such as linking and supervision, and also discuss the roadmap for integrating some additional Erlang features into the Celluloid framework such as OTP-style applications and distributed actor systems. Stay tuned!


Karim said...

I'm trying to implement a distributed hash table in Ruby and Celluloid seems to be fun to work with :D. Can't wait to read more about it!

Roger Pack said...

how do you make celluloid efficient, seeing as it seems like each actor needs its own thread?

Isaac Gouy said...

>> Erlang, in part inspired by Alan Kay's language Smalltalk...

>> The key to Erlang's success... lies in its message-based concurrency system, a system inspired by Smalltalk...

>> By combining the ideas of Smalltalk with those of communicating sequential processes, Erlang created a system...

>> Given Erlang was vicariously inspired by Smalltalk...

Please provide some source material that shows you are correct to suggest repeatedly that the Erlang designers were directly influenced by Smalltalk.

Does Joe Armstrong say that? - "Making reliable distributed systems in the presence of software errors" pdf

Message-passing is discussed in "Concepts and notations for concurrent programming (1983)". Is Smalltalk mentioned there?

phil pirj said...

Hi Tony

Why not return a Future on every async call? This can simplify the code to:

puts Benchmark.measure {
p {|actor|
actor.oops! 2

in this case we are sending messages to actresses, and map returns an array of Futures, and only the call p(array of futures) evaluates the result

AgeKay said...

Sounds very interesting! Can you do everything you can do with Erlang with Celluloid instead or are there still cases where you need to do conventional message passing? Have you compared the performance of Celluloid vs. a traditional actor model?

Janus said...

Is this similar to Pyro for Python?

Daniel said...

Tony, could you provide more information how to perhaps integrate into celluloid. Revactor had TCP connection/socket classes that were usable. Are you planning on adding those features into celluloid?

Tony said...

Isaac: Erlang was vicariously inspired by Smalltalk through the Actor Model.

Roger: Actors are much heavier in Celluloid than they are in Erlang as Celluloid uses native OS threads on all of the Rubies it presently supports. This makes short-lived actors in particular rather inefficient. The next release of Celluloid will at least include a thread pool which collects dead actors and recycles their existing OS threads when creating new actors.

phil: right now part of the contract of futures is that you MUST get their results. I'd like to fix this.

Anonymous said...

A bit unrelated, but the cell metaphor reminded me of the Chemical Abstract Machine.

Avdi Grimm said...

Stop slacking and write part 2! ;-)

Anonymous said...

Looking forward for a DCell for Dummies tutorial

Mark Steve said...

This blog is very informative. I read and learn many important things about this topic.
Conference Apps For Android

Amir kh said...

دانلود بازی استراتژیک ساحل بوم اندروید-Boom Beach 20.46
دانلود فیلم Top Gear Patagonia Special 2015
دانلود فیلم Residue 2015

lija outlaw said...

cctv camera for home
Pestveda | Pest Control
Termite control
Surveillancekart | CCTV System
cctv installation services
best home security camera system

Fuzzy International said...

I am very impressed with your post.Thank you for Sharing!
- cashew nut wholesale in Dubai
- cashew nut import & export in Dubai

emma said...

cctv camera dealers in delhi
cp plus cctv camera online
hikvision camera online
cctv camera installation services in delhi
cctv camera installation services in gurugram
cctv camera installation services in gurgaon

robin said...

avriq Desktop/Laptop Repair
avriq yellow pages
avriq business services
avriq bbb
avriq India

Escorts cart said...

Female Escorts They have demonstrated their power throughout coaching exercises. They have indicated the ability and forces that will someday occur humbling those that continue to strip them. People who suck the life from not only these surroundings but from deep within their souls and surroundings throughout this world.
Female Escorts,High Class Call Girls,Escorts Girls,Escorts ,Escorts near me
Female Escorts

Escorts cart said...

Female Escorts The operation was planned for the July of that year. I had 2 months to attend.In the meantime men facing the operation were encouraged, along with their wives, or partners to attend a pre-operation data evening for men facing prostate surgery, and what to expect following their surgery. This was to be held at the hospital.
Female Escorts

Escorts cart said...

Female Escorts:her elaborate birthday celebration will open a conversation about how relationships and folks amendment. Facing life's stages can offer insecure parents a manner to embrace modification rather than dread it and a special birthday ritual that focuses on both the joy of childhood and also the transition into adulthood can satisfy each folks and therefore the birthday lady.
Female Escorts,High Class Call Girls,Escorts Girls,Escorts ,Escorts near me
Female Escorts

shabnam praveen said...

Call girls in Kolkata
Call girls in Chandigarh
Call girls in Chandigarh
Call girls in Gurgaon
Call girls in Chandigarh
Call girls in Chandigarh

shabnam praveen said...

Call girls in Lucknow
Call girls in Guwahati
Call girls in Mumbai
Call girls in Jaipur
Call girls in Jaipur
Call girls in Jaipur
Call girls in Bangalore

Gunardi omex said...

Tangki Panel
Tangki Fiberglass
Jual Septic Tank
Tangki Kimia
Jual Talang Fiber
Jual Rotameter
jual mesin ro
Jual Botol Plastik Agro

Jual Botol Plastik Murah

call Girl said...

Call girls in Gurgaon
Call girls in Lucknow
Call girls in Guwahati

Call girl in Gurgaon
Call girl in Lucknow
Call girl in Guwahati
Bangalore call girls

Gurgaon call girls
Lucknow call girls
Guwahati call girls
Bangalore call girls

Gurgaon call girl
Lucknow call girl
Guwahati call girl
Bangalore call girl

Escorts in Gurgaon
Escorts in Lucknow
Escorts in Guwahati
Escorts in Bangalore

Escort services in Gurgaon
Escort services in Lucknow
Escort services in Guwahati
Escort services in Bangalore

Escort service in Gurgaon
Escort service in Lucknow
Escort service in Guwahati
Escort service in Bangalore

Gurgaon escorts
Lucknow escorts
Guwahati escorts
Bangalore escorts

Naincy Kumari said...

This is so much amazing .so,you can also visite my links.
call girls in kolkata
russian escorts in kolkata
kolkata call girls
call girls kolkata
escorts in kolkata
kolkata escort
housewife escorts in kolkata
college call girls in kolkata
call girls in park street
escorts in park street

call girls in gurgaon
call girl in gurgaon
gurgaon call girls
escorts in gurgaon
gurgaon escorts
gurgaon escort
Escort services in Gurgaon
Escort service in Gurgaon
russian escorts in gurgaon
housewife escorts in gurgaon
college call girls in gurgaon

Call girls in Noida
Call girl in Noida
Escorts in Noida
Escort services in Noida
Escort service in Noida
Noida Escorts
Noida Escort
Noida Call girls
Noida Call girl

call Girl said...

Gurgaon escort
Lucknow escort
Guwahati escort
Bangalore escort

Faridabad call girls
Faridabad call girl
Faridabad escorts
Faridabad escort
Escort services in Faridabad

Escort services in Faridabad
Call girls in Faridabad
Call girl in Faridabad
Faridabad escort services
Faridabad escort service

Escorts in Faridabad
Escorts in Faridabad
Escorts in Faridabad
Escorts in Faridabad

Escort in Faridabad
Escort in Faridabad
Escort in Faridabad
Escort in Faridabad

Escort services in Faridabad
Escort services in Faridabad
Escort services in Faridabad
Escort services in Faridabad

Escort service in Faridabad
Escort service in Faridabad
Escort service in Faridabad
Escort service in Faridabad

Ananya Krishnan said...

Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work

DevOps is currently a popular model currently organizations all over the world moving towards to it. Your post gave a clear idea about knowing the DevOps model and its importance.

Good to learn about DevOps at this time.

devops training in chennai | devops training in chennai with placement | devops training in chennai omr | devops training in velachery | devops training in chennai tambaram | devops institutes in chennai | devops certification in chennai | trending technologies list 2018

Juliana Kho said...

Juliana Kho said...


Juliana Kho said...



Juliana Kho said...

idn poker play


David Sameth said...

Here ielts courses,Interior design,Computer Courses,Management Courses and English Courses available. Find out more:

almostakbl company said...

كيفية اختيار شركة تنظيف مثالية
هناك العديد من شركات التنظيف هناك ، والفرق بين شركة تنظيف كافية وسيئة وممتازة يحدث فرقا حقا. إذاً كيف تعرف أي أعمال تنظيف مهنية تستخدمها؟ هنا قائمة من 15 أشياء للبحث عنها قبل التعاقد مع خدمة التنظيف. بعد قراءة هذه القائمة ، سوف تعرف كيفية معرفة أي شركة تنظيف جيدة وأيها لا (قبل توظيفهم):

1. الحصول على أسعار الأسعار من ثلاث شركات على الأقل.
هناك عدة أسباب لذلك يجب القيام بذلك. ليس فقط لمعرفة أي شركة تنظيف هي أفضل الأسعار ولكن أيضا لمعرفة مدى وجود فجوة في أسعار نفس الخدمة. "قد تحصل على ما تدفعه مقابل" قد تكون مبتذلة ولكن هذا لا يجعلها غير صحيحة. في حين أن الاختلافات في الأسعار ليست كبيرة ، فمن الأفضل أن تذهب مع أي أعمال التنظيف المهنية التي تمنحك أقصى ضجة لجهودك. ولكن إذا كان التناقض في الأسعار مختلفًا بشكل كبير ، فيجب أن يخبرك ذلك بشيء ما وأن يعطيك سبباً للشك.

أيضا عند السؤال عن أسعار الأسعار ، يوصى بالسؤال عما إذا كانت أسعار الأسعار تشمل كل شيء (المواد واليد العاملة) ومقدار خدمة تنظيف خاصة يمكن إضافتها إلى خدمات التنظيف التي يتم تقديمها.
شركة تنظيف الشارقة
2. اسأل كم من الوقت كانوا في الأعمال التجارية.
هناك العديد من الشركات التي تأتي وتذهب حتى الأعمال التي تمكنت من البقاء في العمل لفترة قصيرة يقول شيء إيجابي عن شركة التنظيف. على الرغم من أن طول العمر ليس ضمانًا للعظمة ، إلا أنه يجب أن يكون عاملاً مهمًا. (بعد كل شيء ، كيف يمكن أن تظل الأعمال مفتوحة لسنوات عديدة إذا لم نكن راضين عن العملاء العائدين؟)

3. أسأل عما إذا كانوا يضمنون عملهم.
معظم الشركات تقول إن رضاك ​​مضمون ، ولكن ماذا يعني ذلك؟ هل يعني ذلك أنهم سيقدمون لك استردادًا إذا كنت غير راضٍ؟ من المهم معرفة ذلك قبل توظيف أي شخص للقيام بوظيفة لك (وخاصة تلك التي تضمن الرضا).
شركة تنظيف مطابخ الشارقة
4. اطلب قائمة المراجع.
شركة جيدة سيكون لها عملاء مخلصين ومرتاحين. من المستحسن أن تسأل عن قائمة المراجع حتى تشعر بالراحة مع العلم أنك تتعامل مع شركة تنظيف لديها قاعدة عملاء كبيرة من العملاء الراضين.

Kelly Cain said...

Nice Post

Why Instagram is the Best Promotion Tool for Business

7 Aspects for Digital Marketing in 2019

Why SEO is best for ROI in these days?

Why Search Engine Optimization is Necessary for Every Business 2019?

Best Off-Page Optimization Techniques for 2019

Lillian J. Turner said...

Nice Post

My Blogger Club

Guest Blogger

Guest Blogging Platform

Best Guest Blogging Site

Guest Blogging Platform

Sharp Indonesia said...

JudiPokers said...

You have provided amazing detail in this blog. I liked your unique thinking. I admired your efforts. Thanks for sharing this wonderful post with me. Please keep me more update from your blog. I am very interested in your unique stories

Helen Henson said...

Awesome post

bloggingskillstips | | |

lnwMashow45 said...

Thanks for sharing away Gclub

Terciduk Parah said...

chat sbobet asia

Juliana Kho said...

<a href=">daftar evolution gaming casino</a>

Juliana Kho said...

daftar evolution gaming casino

Juliana Kho said...

registrasi s128 online

rithiaanandh said...

Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
Sql server dba online training

gulali said...

Thanks For Sharing. GBU always
judi online

dadyar said...

گفتاری درباره خلع ید: خلع ید از جمله جرائمی است که در دادگاه ها بسیار به چشم می خورد. در دعاوی خلع ید گاهی شخص متصرف آنچنان زیرک و حرفه ای عمل می کند که اگر مالک اصلی دارای وکیل نباشد و یا از آگاهی کافی نسبت به قوانین و طریقه اثبات مالکیت را به درستی نداند، در این نوع دعاوی شکست خورده و حقی ضایع می گردد. گروه وکلای مستر دادیار همواره با ارائه ی مشاوره تلفنی و آنلاین رایگان در خدمت شماست تا مبادا بدون آگاهی اقدامی که به نفعتان نیست را انجام دهید.
خلع ید به چه معناست
هرگاه کسی از راه عدوان (تجاوز، خصومت، دشمن) بر حق دیگری استیلا (غلبه، تصرف) پیدا کند، خواه این استیلا به عمد انجام شود یا ندانسته و با حسن نیت؛ و خواه غاصب به زیان مالک از حق دیگری منتفع شود و یا هیچ سودی از آن نبرد، به حکم قانون موظف است که عین مال مغصوب را به مالک برگرداند.
اثبات ید بر مال غیر بدون مجوز هم در حکم غصب است. مقصود از اثبات ید بر مال غیر، موردی است که شروع استیلا به اذن مالک باشد ولی بدون مجوز ادامه یابد. مانند شخصی که پس از مطالبه ی مالک نیز مال او را در تصرف خود نگاه می دارد و از اعاده آن خودداری می نمایند.
خلع یددعاوی خلع ید، دعاوی است که خواسته آن، انتزاع ید عدوانی یا غاصبان هم تصرف عدوانی از ملک غیر منقول است که از سوی مالک ملک اقامه می‌شود. به عبارتی در این دعوای مالک ملک، مدعی است که ملک او عدوانا به وسیله شخص دیگری تصرف شده است و یا ملکی را که خوانده با اجازه او تصرف کرده است، علیرغم عدم استحقاق بر ادامه ید، از ظرفیت آن خودداری می ورزد.
در مواردی که به دلیل تعذر رد عین (عدم امکان مسترد نمودن مال)، بدل حیلوله (آنچه ضامن در صورت عدم امکان بازگرداندن مال به مالک می‌پردازد می باش) می خواهد یا در صورت تلف عین، مثل یا قیمت مال مغصوب را مورد مطالبه قرار می دهد، دعوا عنوان قصد دارد، هرچند که به علت کلی بودن خواسته به دعاوی مطالبه خسارت نیز شباهت دارد.
زیرا مثل یا قیمت نیز به عنوان بدل مال مغصوب، موضوع دعوا قرار می گیرد و زمان غاصب دنباله تکلیف او به بازگرداندن عین است. بنابراین، دعوای غصب، گاه در زمره دعاوی عینی و گاه در شمار دعاوی شخصی است.
دعوای خلع ید از مهم‌ترین و شایع‌ترین دعاوی مربوط به مالکیت است. به همین دلیل در این مقاله سعی شده است تا از جنبه های گوناگون و با نگاهی کاملا کاربردی این موضوع را مورد بررسی قرار دهیم .
خلع ید از ملک مشاعی
قبل از توضیح قوانین و مراحل خلع ید از ملک مشاعی ابتدا به مفهوم ملک مشاع می پردازیم تا به درک بهتر قوانین کمک کند. ملک مشاعی ملکی است که سند آن به نام بیش از دو نفر است، بدون آنکه قسمت مالکیت آن ها مشخص شده باشد. به این حالت اشاعه یا همان مشاع گفته می شود. به طور مثال تصور کنید ارث دو برادر یک مسکن است، در این وضعیت کل ملک متعلق به هر دو است یعنی جز به جز آن و اجر به اجر ان ملک متعلق به هر دو برادر می باشد. هیچ کدام از برادران نمی تواند ادعای مالکیت بخشی از ملک را کند.
بر طبق قواعد حاکم بر اشاعه، هیچ یک از شرکا نمی توانند بدون اذن دیگران در مال مشاع تصرف کنند؛ زیرا انتشار حق مالکیت شریک آن در تمام اجزای مال مشاع باعث می شود تا هر تصرف، تجاوز به حقوق دیگران باشد و بی اذن همه مالکان میسر نگردد. در این هنگام هر کدام از مالکان و یا همان شرکای ملک می توانند اقدام به خلع ید از ملک مشاع نمایند.

قانون این اجازه را به هر یک از مالکان ملک مشاع داده است تا طبق ماده 43 قانون اجرای احکام مدنی بتوانند تا با تنظیم دادخواست و در صورت تصرف شرکا، تمام ملک را خلع ید نماید و نیاز به شکایت تک تک شرکا نیست. اما اگر تعداد متصرف بیش از یک نفر باشد باید دادخواستی برای علیه تمام آن ها تنظیم گردد. در غیر اینصورت، یعنی زمانی که مالک علیه یکی از متصرفین شکایت کند. دادگاه تنها حکم خلع ید از ملک مشاع را برای آن شخص صادر می کند و برای هر کدام از آن ها باید جداگانه دوباره دادخواست خلع ید از ملک مشاع ارائه کرد.
هزینه دادرسی خلع ید
دعاوی خلع ید بر عکس دعاوی تصرف عدوانی، مزاحمت ممانعت از حق، جزء دعاوی مالی محسوب می شود. هزینه دادرسی در این گونه دعاوی بر پایه مبلغ مشخصی نیست و هزینه دادرسی این پرونده بر پایه ی ارزش معاملاتی (قیمتی در آن منطقه معامله می شود) املاک در هر شهر و منطقه محاسبه می‌شود.

Brayden Cook said...

Oh…wow! You have a deep-rooted knowledge on Java programing language. Had a great learning experience in your blog site. High-quality academic essay models are available in the best website for essays. Students can refer to that site if want good tips on university essay writing or outline or topics. Let the world of wisdom grow!!

Barbara Pantuso said...

Thanks for sharing such a nice Blog.I like it
blog commenting sites list
Edu Blog Commenting Sites List
gta 5 cheats xbox one phone
gta 5 phone cheat codes
whatsapp desktop download for ubuntu

markson said...

Our students have been leaving new footprints in the corporate world by becoming industry-ready as soon as they graduate from colleges. machine learning certification

r said...

Aishika Roy Book Kolkata Escorts & Kolkata Call Girls 9874341001 is a very charming girl working as Independent Escort in Kolkata.

Model Escort in Kolkata

College Escort in Kolkata

Escort in Kolkata

Vip Escort in Kolkata

Celeberty Escort in Kolkata

Celeberty Escort in Kolkata

Celeberty Escort in Kolkata

Model Escort in Kolkata

College Escort in Kolkata

Escort in Kolkata

Vip Escort in Kolkata

Celeberty Escort in Kolkata

Celeberty Escort in Kolkata

Celeberty Escort in Kolkata

Situs Judi Online Sukabet said...

Ada banyak cara yang bisa anda tempuh untuk memainkan permainan judi poker online tanpa modal sama sekali, dan senantiasa menguntungkan untuk anda. namun cara main poker online secara gratis dan sudah lazim di telinga para orang indonesia adalah dengan cara memainkan permainan judi poker online dengan memakai link refferal. link refferal ini bekerja ketika anda mengajak teman ataupun komunitas penggemar poker online untuk bergabung ke situs judi poker online tempat anda bermain. Seperti halnya yang tersedia di situs jakartapoker, player lain yang bergabung dengan menggunakan link anda. Akan membuat anda mendapatkan bonus refferal sebesar 10% yang bisa anda gunakan untuk bermain judi poker online di situs jakartapoker.

Situs Judi Online Sukabet said...

mendengar nama jakartapoker, pastilah sudah tidak asing lagi di kalangan masyarakat pecinta judi online di indonesia. sejak tahun 2012 situs judi kartu online jakartapoker senantiasa menghadirkan layanan perjudian mereka dengan amat sempurna dan cemerlang. para player yang mengadu nasib di situs kami ini senantiasa mendapatkan keuntungan 100% tanpa ada biaya potongan sama sekali. kini waktunya anda yang meraih keuntungan dengan bersih dan cepat bersama kami di situs jakartapoker. hanya dengan modal 10.000 rupiah saja.

jothikumar said...

Nice post. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated posts…
Selenium online training
Selenium certification training
Selenium online course
Selenium training course

Situs Judi Online Sukabet said...

Layanan judi poker online dengan uang asli, kini semakin banyak jumlahnya di Indonesia. Rata rata dari mereka menawarkan permainan judi poker online dengan modal yang amat sangat terjangkau. tapi pastikan situs judi poker online yang anda mainkan ini memang benar-benar terpercaya di bidangnya.
Jika anda masih ragu untuk bermain, anda bisa mainkan permainan judi poker online di situs jakartapoker. situs jakartapoker adalah situs judi poker online yang senantiasa membayarkan keuntungan kepada anda 100% tanpa di undi sama sekali. Bergabung dengan cepat bersama kami sekarang juga dengan modal hanya 10.000 rupiah saja.

Situs Judi Online Sukabet said...

Anda takut kalah dan menjadi rugi dalam permainan judi poker online ? Jangan merasa seperti itu. Tetap senantiasa bermain judi poker online hanya pada situs jakartapoker, saat anda kalah di situs ini.
Kekalahan anda akan kami akumulasikan menjadi keuntungan berkat sistem turn over yang tersedia di situs kami. Anda akan senantiasa mendapatkan hadiah uang tunai, smartphone tipe terbaru, sampai alat elektronik terbaru berkat adanya sistem ini di situs judi poker online jakartapoker.

Situs Judi Online Sukabet said...

Boleh anda tganyakan dimana-mana tentang keabsahan situs judi poker online kami. Di situs jakartapoker, kami telah menerima dua sertifikasi resmi dari lembaga PAGCOR dan BMMTestLab. Dengan adanya dua lisensi ini, berarti situs judi poker online jakartapoker telah di akui oleh dunia internasional sebagai situs judi poker online yang terbaik dan terpercaya. Di situs ini kami menyediakan permainan judi poker online dengan modal yang amat sangat terjangkau dan keuntungan yang senantiasa dibayarkan 100% dengan menggunakan uang asli.

jothikumar said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as an updated one, keep blogging.
Selenium online training
Selenium certification training

Situs Judi Online Sukabet said...

Tidak masalah siang ataupun malam, situs qq online uang asli jakartapoker akan senantiasa melayani anda kapan saja saat di butuhkan. kami pastikan semua withdraw yang anda lakukan di situs jakartapoker akan senantiasa di bayarkan 100% tanpa ada potongan sama seklali. situs judi poker online ini telah mendapatkan dua lisensi resmi, yaitu dari PAGCOR dan BMMTestLab. Jadi di amin aman dan terpercaya. Mainkan permainannya di situs jakartapoker dengan modal minim. Hanya dengan 10.000 rupiah saja,

James Smith said...

Hire the best seo company for your law firm who provide the best Personal Injury Law Firm SEO Services to you. Best seo company has a team of professionals who are able to provide the best and quality seo services to their clients. If you don't know anything about SEO and its services then you can go for the best SEO blog contains all the information regarding SEO and its services i.e. eMarketing Blogger.

Situs Judi Online Sukabet said...

Anda adalah player judi poker online pemula ? Ingin bermain judi poker online dengan keuntungan terbaik di Indonesia yang tentunya 100% memberikan penghasilan anda secara real tanp ada potongan sama sekali ?
Mari menuju ke situs jakartapoker. kami sediakan bermacam-macam permainan judi kartu terbaik kepada anda. Sebagai agen poker online terbaik sejak tahun 2012. Nikmati akes permainan judi poker online terbaik hanya di situs jakartapoker.

Sam Collins said...

Buy CBD Oil 350 mg online visit They are selling the best CBD Oil for stress, anxiety, and pain at affordable price.

Accounting Firm Singapore said...

Thinking of starting a business in Singapore but don't know about the Singapore company registration cost visit to get all the details which help you in setting up business in Singapore.

Best SEO Agency said...

Hire SEO marketing Singapore services visit, they help you to rank your website higher on the search engine which help in increasing the revenue.

Accounting Firm Hong Kong said...

Visit, they will assist you with company registry search, company name search, business registration and will help you in setting up business in Hong Kong.

Will said...

Thinking of starting a business in Malaysia visit They assist you in setting up business in Hong Kong by providing corporate secretarial services.

Unknown said...

Looking for the platform from where you can buy fake high school diplomas online visit

Sell your Business online said...

Business sale Malaysia - Visit to buy and sell business in Malaysia.

nopCommerce customization services said...

If you are looking for nopcommerce theme development company visit nopAccelerate is the best company providing the nopCommerce development services at affordable rates.

m2kadvisors said...

Your article is very interesting. Also visit our website at:

How to set up a company in singapore