On Wed, Feb 2, 2011 at 6:11 PM, Roberto De Ioris <[email protected]> wrote:
>
>> Hi, I just discovered uWSGI and immediatly start to experiment with
>> Erlang nodes.
>> Following
>> http://projects.unbit.it/uwsgi/wiki/ErlangIntegration
>> I was able to  send messages to erlang nodes, but
>> not to  receive erlang messages.
>> I'm sure that I'm missing something --- well I simply don't know what to
>> do
>> after
>>
>> import uwsgi
>>
>> def erman(arg)
>>     print "received an erlang message"
>>     print arg
>>
>> uwsgi.erlang_func = erman
>>
>>
>> I'm using nginx and latest stable uWSGI.
>>
>> TIA
>>
>> --
>>
>
> Hi Luigi, can you post your command line and uWSGI logs ?
Sorry for delay (I cannot access the machines after 18:00)

The machine has  name johnII; this is the python part

## erlang-recmsg.py
import uwsgi
def erman(arg):
    print "received an erlang message"
    print arg

uwsgi.erlang_func = erman


$> uwsgi -s 127.0.0.1:38079  --erlang uwsginode@johnII --erlang-cookie
cookie_dispatcher -p 2 -w erlang-recmsg
*** Starting uWSGI 0.9.6.7 (32bit) on [Thu Feb  3 09:28:05 2011] ***
compiled with version: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Python version: 2.6.5 (r265:79063, Jan 19 2011, 17:44:48)  [GCC 4.2.4
(Ubuntu 4.2.4-1ubuntu3)]
uWSGI running as root, you can use --uid/--gid/--chroot options
 *** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
allocated 412 bytes (0 KB) for 1 request's buffer.
binding on TCP port: 38079
your server socket listen backlog is limited to 100 connections
initializing hooks...done.
Erlang C-Node initialized on port 44463 you can access it with name
uwsginode@johnII
...getting the applications list from the 'erlang-recmsg' module...
uwsgi.applications dictionary is not defined, trying with the
"applications" one...
applications dictionary is not defined, trying with the "application" callable.
static applications not defined, you have to use the dynamic one...
spawned uWSGI worker 1 (pid: 30326)
Erlang mode enabled for worker 2.
spawned uWSGI worker 2 (pid: 30327)


The erlang part
$> erl -sname uwsgierlang -setcookie cookie_dispatche

From here I still have not any  clue on how to send a message from
'uwsgierlang@johnII' to
'uwsginode@johnII'  --- I think I missed some piece here and there.

Sending messages to erlang nodes works fine.


-- 
luigi
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to