Received: by 10.14.45.9 with SMTP id o9mr377023eeb.4.1284455017920; Tue, 14 Sep 2010 02:03:37 -0700 (PDT) X-BeenThere: erlang-programming@googlegroups.com Received: by 10.14.3.29 with SMTP id 29ls702304eeg.0.p; Tue, 14 Sep 2010 02:03:37 -0700 (PDT) Received: by 10.14.45.9 with SMTP id o9mr377022eeb.4.1284455017412; Tue, 14 Sep 2010 02:03:37 -0700 (PDT) Received: by 10.14.45.9 with SMTP id o9mr377021eeb.4.1284455017380; Tue, 14 Sep 2010 02:03:37 -0700 (PDT) Return-Path: Received: from morgoth.cslab.ericsson.net (morgoth.cslab.ericsson.net [193.180.168.22]) by gmr-mx.google.com with SMTP id w43si7642583eeh.3.2010.09.14.02.03.37; Tue, 14 Sep 2010 02:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of erlang-questions-return-53344-erlang-programming+garchive-81772=googlegroups....@erlang.org designates 193.180.168.22 as permitted sender) client-ip=193.180.168.22; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of erlang-questions-return-53344-erlang-programming+garchive-81772=googlegroups....@erlang.org designates 193.180.168.22 as permitted sender) smtp.mail=erlang-questions-return-53344-erlang-programming+garchive-81772=googlegroups....@erlang.org Received: (qmail 3708 invoked by alias); 14 Sep 2010 09:02:56 -0000 Mailing-List: contact erlang-questions-h...@erlang.org; run by ezmlm Sender: Precedence: bulk List-Id: Erlang/OTP discussions List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Delivered-To: mailing list erlang-questi...@erlang.org Received: (qmail 8345 invoked from network); 14 Sep 2010 09:02:56 -0000 X-Virus-Scanned: by amavisd-new at kth.se X-KTH-Auth: johanmon [92.32.36.93] X-KTH-mail-from: johan...@kth.se X-KTH-rcpt-to: erlang-questi...@erlang.org Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: erlang-questi...@erlang.org References: <4C8E3541.7050...@erlang-solutions.com> <4C8E3826.30...@amberbio.com> <4C8E4041.1080...@amberbio.com> <4C8E46AA.9050...@erlang-solutions.com> <4C8E4CED.4040...@amberbio.com> <4C8E508D.3040...@erlang-solutions.com> <4C8E5B52.9030...@amberbio.com> <4C8E6990.7000...@erlang-solutions.com> <4C8E75EF.7000...@amberbio.com> <4C8F26FD.8070...@erlang-solutions.com> Date: Tue, 14 Sep 2010 11:02:41 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Johan Montelius" Organization: KTH/ICT Message-ID: In-Reply-To: <4C8F26FD.8070...@erlang-solutions.com> User-Agent: Opera Mail/10.62 (Linux) Subject: Re: [erlang-questions] ets vs list While we're talking ets tables: Wouldn't it be nice to be able to send table references across nodes? Today when you create a new tabel you get a table reference that is an integer. The table can only be accessed by processes in the same node and god know what will happen if you send the reference over to another node where there is another table registered under the same number. Since tables have a mutable state they should be modeled as processess. When you create a table you get a process identifier. Locally on the node where the table was created all operations are done as usual i.e. direct access to the table without the overhead of sending messages. When you send the process identifier over to another node however, a process identifier is sent that refers to a proxy process on the originating node. Using the functions in the ets module using a regular process identifier would result in messages being sent to that process and replies being received. Just like accessing a local ets table (slower and we have to have some error codes if the process is dead). One could the also open up for a asynchronous access to the table: Ref = ets:lookup_and_send_me_the_reply(Table, Key), do_something(), receive {Ref, Value} -> How's that :-) Johan -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ________________________________________________________________ erlang-questions (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:erlang-questions-unsubscr...@erlang.org