I've got a module that I'm attempting to turn into a proper OTP application. Currently, the module has start/0 which starts a genserver which supplies configuration data read from a config file. It then calls inets:start(httpd,config:lookup(httpd_conf)). I gather that I need to move the starting of these out into the .app file's (application…
I'm using Nitrogen & lightbox. I'm looking for some guidance after spending way too long trying to understand why a working example breaks as soon as I change the targetID of a lightbox. The fragment below works if I use "name_dialog" or "share_dialog", but not if I use "compose_dialog". I've looked through the source and style sheets,…
I'm using Nitrogen & lightbox. I'm looking for some guidance after spending way too long trying to understand why a working example breaks as soon as I change the targetID of a lightbox. The fragment below works if I use "name_dialog" or "share_dialog", but not if I use "compose_dialog". I've looked through the source and style sheets,…
I'm trying to evaluate using Riak's Post-Commit Hooks to build a distributed, incremental MapReduce-based index, but was wondering which Riak nodes the Post-Commit Hooks actually run on. Are they run on the nodes the client used to put the commits, or on the primary nodes where the data is persisted? If it's the latter, I'm thinking I can…
i have the following ets structure:
SomeTable = ets:new(sometable, [bag]).
ets:insert(SomeTable, [
{set1,item1},
{set1,item2},
{set1,item3},
{set2,item1},
{set2,item2},
{set2,item4}]).
i want…
Tutorials are abound for working with gen_servers that are named in an OTP application. However, I've been unable to find a good example of dynamically spawning servers that are not registered (not named). Can someone point to a good, simple example? Not ejabberd, for example, where there is a lot to confuse the core idea I'm trying to…
What is the more efficient way to create a web video chat ?
What tecnologies ?
What server side and client side languages ?
What type fo server ?
etc
.
Thanks ;)
After spending a good while getting rb to work on a remote shell, I would like to get stdio / error logger messages on a remote shell, I have dug around changing group_leaders but it would seem to require changing the group_leader of all the running process, and my experiments have found that to be pretty unstable.
I'm trying to implement a function that generates dynamic queries for MNesia.
For example, when function is called with these arguments;
dyn_query(list, person, [name, age], ["jack", 21])
I want to query MNesia to list items whose name is "jack" and age is 21 in person table.
I've tried to implement this by using…
I'm developing a document oriented application and need to manage user access to the documents. I have a module that handles user authentication, and another module that handles document CRUD operations on the data store. Once a user is authenticated I need to enforce what operations the user can and cannot perform to…
Recently i have been getting into alternative languages that support an actor/agent/shared nothing architecture - ie. scala, clojure etc (clojure also supports shared state).
So far most of the documentation that I have read focus around the intro level. What I am looking for is more advanced documentation along the…
Hi,
I have a OTP application comprising a single supervisor supervising a small number of gen_servers. A typical child specification is as follows:
{my_server,
{my_server, start_link, [123]},
permanent,
5000,
worker,
[my_server]}
No problems so far.
I now want to an add extra gen_server to the…
Hi,
Is there a way in Eunit to test whether an exception has been thrown under certain cicumstances?
Say I have a function sum like this:
sum(N, M) when N > M ->
throw({"start is bigger than end", N, M});
sum(N, M) when N =:= M ->
N;
sum(N, M) when N =< M ->
N + sum(N + 1, M).
…
How do I store standalone attachments in Couchdb using eCouch library.
Ecouch provides doc_create/3 and doc_Create/2, can we make use of any of these functions?
Did anyone has success in storing and retrieving attachments using eCouch?
Thanks in advance.
I have downloaded eclipse 3.4 (java version) for MacOSX (carbon). I have tried to 'update' to the erlide, but see many (duplicated) options (many erlide, options that say 'only for erl SDK updates', etc.) Sometimes I get 403 errors when attempting to access http://erlide.org/update and…
I start lager as a dependent application when I run a unit test but for some reason the code under test does not see it.
-module(main_tests).
-include_lib("eunit/include/eunit.hrl").
main_test_() ->
{foreach,
fun distr_setup/0,
fun distr_cleanup/1,
[
fun must_retain/1
]}.
…
I am creating a test app where is one supervisor with simple_one_for_one strategy and many worker children added dynamically to it. How to implement callback (or receive a message) in supervisor that will be called when child exit normally?
Main goal is to notify some other process…
After installing RabbitMQ on Ubuntu 10.04 I receive a failure message that the service was unable to start. Any insight into the issue would be greatly appreciated! Below are contents of startup_log and startup_err.
Startup_log:
{error_logger,{{2012,7,7},{15,50,31}},"Protocol: ~p:…
What is the more efficient way to create a web video chat ?
What tecnologies ?
What server side and client side languages ?
What type fo server ?
etc
.
Thanks ;)
How do I store standalone attachments in Couchdb using eCouch library.
Ecouch provides doc_create/3 and doc_Create/2, can we make use of any of these functions?
Did anyone has success in storing and retrieving attachments using eCouch?
Thanks in advance.
A complete noob question, but how exactly do I get values (e.g.
path_info) from inside the callback? From the docs, I thought it was
a list of tuples, which I thought would make it accessible via
lists:keyfind, but I've had no luck. So far, all the examples I've
found only show…
I used to develop in English, but this time, the webApp i'm building is only for people in my city, which is in France.
In nitrogen, when you call "/user/login", nitrogen calls user_login:main().
I would like nitrogen to call user_login:main() when the request is…
Hi!
I am developing MDI application with help of wxErlang. I have a parent frame, implemented as wx_object:
-module(main_frame).
-export([new/0, init/1, handle_call/3, handle_event/2, terminate/2]).
-behaviour(wx_object).
....
And I have a child frame,…