Search Results

Search found 320 results on 13 pages for 'erlang'.

Page 2/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Erlang : Handling HTTP Requests and Responses

    - by Ted Karmel
    What is the best erlang library for processing http requests and responses from within an erlang application? I have taken a look at inets but as a standalone application, it seems more like a replacement for curl. I would like to access external APIs from within the erlang application so would need to parse responses and be able to make subsequent requests with cookies generated from the response.

    Read the article

  • Erlang Types Specifications

    - by Chang
    I recently read the source code of couch-db, I find this type definition which i don't understand: -type branch() :: {Key::term(), Value::term(), Tree::term()}. -type path() :: {Start::pos_integer(), branch()}. -type tree() :: [branch()]. I did read Erlang doc, But what is the meaning of Start, Key, Value and Tree? From what i understand, they are Erlang variables! I didn't find any information about this in Erlang doc.

    Read the article

  • Why is there no middleware in Erlang?

    - by Zubair
    I asked a question earlier about ESBs written in Erlang or Java, and there didn't seem to be anything in Erlang, and only products in Java. http://stackoverflow.com/questions/2453641/what-would-be-the-best-language-in-which-to-write-an-esb/2453683#2453683 I guess I find it difficult to understand why a language like Erlang has no such middleware products, especially seeing as it should be ideally suited to the job.

    Read the article

  • Erlang, SSH and authorized_keys

    - by Roberto Aloi
    Playing with the ssh and public_key application in Erlang, I've discovered a nice feature. I was trying to connect to my running Erlang SSH daemon by using a rsa key, but the authentication was failing and I was prompted for a password. After some debugging and tracing (and a couple of coffees), I've realized that, for some weird reason, a non valid key for my user was there. The authorized_keys file contained two keys. The wrong one was at some point in the file, while the correct one was appended at the end of the file. Now, the Erlang SSH application, when diffing the provided key with the ones contained in the authorized_keys, it was finding the first entry (completely ignoring the second on - the correct one). Then, it was switching to different authentication mechanism (at first it was trying dsa instead of rsa and then it was prompting for a password). The question is: Is this behavior intended or should the SSH server check for multiple entries for the same user in the *authorized_keys* file? Is this a generic SSH behaviour or it's just specific to the Erlang implementation?

    Read the article

  • Automatically restarting Erlang applications

    - by Nick
    I recently ran into a bug where an entire Erlang application died, yielding a log message that looked like this: =INFO REPORT==== 11-Jun-2010::11:07:25 === application: myapp exited: shutdown type: temporary I have no idea what triggered this shutdown, but the real problem I have is that it didn't restart itself. Instead, the now-empty Erlang VM just sat there doing nothing. Now, from the research I've done, it looks like there are other "start types" you can give an application: 'transient' and 'permanent'. If I start a Supervisor within an application, I can tell it to make a particular process transient or permanent, and it will automatically restart it for me. However, according to the documentation, if I make an application transient or permanent, it doesn't restart it when it dies, but rather it kills all the other applications as well. What I really want to do is somehow tell the Erlang VM that a particular application should always be running, and if it goes down, restart it. Is this possible to do? (I'm not talking about implementing a supervisor on top of my application, because then it's a catch 22: what if my supervisor process crashes? I'm looking for some sort of API or setting that I can use to have Erlang monitor and restart my application for me.) Thanks!

    Read the article

  • How can I write simulations in Erlang?

    - by rick
    Hi guys, I want to do some numerical stuff in Erlang like this: You've got an array with the following values: [2,3,4] In each iteration, you calculate 0.1 * [n-1] + 0.7 *[n] + 0.2 * [n+1] This becomes the new [n]. If n == 0 then [n-1] = 0. If [n] == length of array then [n] = 0. So I try an example: [2,3,4] calculations: 0.1 * 0 + 0.7 * 2 + 0.2 * 3 = 2 0.1 * 2 + 0.7 * 3 + 0.2 * 4 = 3.1 0.1 * 3 + 0.7 * 4 + 0.2 * 0 = 3.1 So [2,3,4] becomes to [2, 3.1, 3.1] after one iteration. I know how to write this in a non-functional language like C. But I have difficulties to imagine, how this could be done in Erlang. I found some tutorials on how you read a file to a list. So this is not the problem. How can I spawn different Erlang processes that each process has one element of the list? How can I do calculations by communicating with 'the neighbors', so that the neighbors know where their neigbors are generically, without specifying each? How can I collect the data into a list? Eventually, is it possible to solve that problem in Erlang at all? Thanks for your help.

    Read the article

  • Erlang Supervisor Strategy For Restarting Connections to Downed Hosts

    - by derdewey
    I'm using erlang as a bridge between services and I was wondering what advice people had for handling downed connections? I'm taking input from local files and piping them out to AMQP and it's conceivable that the AMQP broker could go down. For that case I would want to keep retrying to connect to the AMQP server but I don't want to peg the CPU with those connections attempts. My inclination is to put a sleep into the reboot of the AMQP code. Wouldn't that 'hack' essentially circumvent the purpose of failing quickly and letting erlang handle it? More generally, should the erlang supervisor behavior be used for handling downed connections?

    Read the article

  • Creating an AST node in Erlang

    - by dagda1
    Hi, I am playing about with Erlang and I am trying to write a simple arithmetic parser. I want to try and parse the following expression: ((12+3)-4) I want to parse the expression into a stack of AST nodes. When parsing this expression, I would first of all create a binary expression for the (12+3) expression which would look something like this in C#: var binaryStructure = new BinaryStructure(); binaryStructure.Left = IntegerLiteralExpression(12); binaryStructure.Right = IntegerLiteralExpression(4); binaryStructure.Operator = binaryExpression.Operator != BinaryOperatorType.Addition; I am quite new to Erlang and I am wondering how I would go about creating a structure like this in Erlang that I can place on a List that I would use as the stack of expressions. Can anyone suggest how to create such a tree like structure? Would a function be a good fit? Thanks Paul

    Read the article

  • Can anyone recommend a primer to Erlang?

    - by Till
    I've recently found myself getting more and more interested in Erlang. I've purchased a book (Programming in Erlang) and started reading up on the basics. Reading books is time consuming so I am looking to shortcut this a bit and go back to the book later. What I lack is a good introductory tutorial. Kind of like, hands on, this is what you need to get started in Erlang, these are best practices, this is how you organize code and this is how you do a small project. I've googled this topic extensively and haven't had much luck. ;)

    Read the article

  • Ridiculously Simple Erlang Question

    - by Aiden Bell
    Read (skimmed enough to get coding) through Erlang Programming and Programming Erlang. One question, which is as simple as it sounds: If you have a process Pid1 on machine m1 and a billion million messages are sent to Pid1, are messages handled in parallel by that process (I get the impression no) and is there any guarantee of order when processing messages? ie. Received in order sent? Coming from the whole C/Thread pools/Shared State background ... I want to get this concrete. I understand distributing an application, but want to ensure the 'raw bones' are what I expect before building processes and distributing workload. Also, am I right in thinking the whole world is currently flicking through Erlang texts ;)

    Read the article

  • how much concurrent http request can erlang handle

    - by user209123
    I am developing a application for benchmarking purposes, for which I require to create large number of http connection in a short time, I created a program in java to test how much threads is java able to create, it turns out in my 2GB single core machine, the limit is variable between 5000 and 6000 with 1 GB of memory given to JVM after which it hits outofmemoryerror with heap limit reached. It is suggested around that erlang will be able to generate much more concurrent processes, I am willing to learn erlang if it is capable of solving the problem , although I am interested in knowing can erlang be able to say generate somewhere around 100000 processes which are essentially http requests waiting for responses, in a matter of few seconds without reaching any limit like memory error etc.,

    Read the article

  • Erlang Question - Time order of messages

    - by Aiden Bell
    Read (skimmed enough to get coding) through Erlang Programming and Programming Erlang. One question, which is as simple as it sounds: If you have a process Pid1 on machine m1 and a billion million messages are sent to Pid1, are messages handled in parallel by that process (I get the impression no) and(answered below) is there any guarantee of order when processing messages? ie. Received in order sent? If so, how is clock skew handled in high traffic situations for ordering? Coming from the whole C/Thread pools/Shared State background ... I want to get this concrete. I understand distributing an application, but want to ensure the 'raw bones' are what I expect before building processes and distributing workload. Also, am I right in thinking the whole world is currently flicking through Erlang texts ;)

    Read the article

  • what good orm api will work well with scala or erlang

    - by Emotu Balogun
    I'm considering taking up scala programming but i'm really concerned about what will become of my ORM based applications. I currently use hibernate as my ORM and i find it a really reliable tool. I'd like to know if there's any ORM tool as efficient but written in scala, or will hibernate work seamlessly with it. i don't want to have to start writing endless sql queries again (like the days of JDBC). I also have the same thought about erlang. is there a good orm out there for erlang?? and can i use erlang with other DBMS like oracle and mysql with ORM

    Read the article

  • Erlang: configuring cover via rebar

    - by exterm
    My project is using a websocket server. Only for testing purposes, I also have an erlang websocket client implementation which resides in the test/ folder along with the tests. Now, when I run the tests via rebar with {cover_enabled, true} in my rebar.config, I also get coverage reported for the modules of the websocket client. I don't want this in my reports. Cover documentation says I should create a cover specification file containing {excl_mods, [websocket_client]}. But how do I convince rebar to use this file? Cover documentation: http://www.erlang.org/doc/apps/common_test/cover_chapter.html http://www.erlang.org/doc/man/cover.html rebar: https://github.com/basho/rebar

    Read the article

  • erlang AMQP client library

    - by jldupont
    Is there an Erlang AMQP client library that isn't tied to the hip with RabbitMQ ? I know about http://hg.rabbitmq.com/rabbitmq-erlang-client/ but I would like something more decoupled... pain when it comes to packaging this stuff for a Debian repository, installation etc...

    Read the article

  • Hidden Features of Erlang

    - by pageman
    In the spirit of: Hidden Features of C# Hidden Features of Java Hidden Features of ASP.NET Hidden Features of Python Hidden Features of HTML and other Hidden Features questions What are the hidden features of Erlang that every Erlang developer should be aware of? One hidden feature per answer, please.

    Read the article

  • Erlang-style light-weight processes in .NET

    - by alexey
    Is there any way to implement Erlang-style light-weight processes in .NET? I found some projects that implement Erlang messaging model (actors model). For example, Axum. But I found nothing about light-weight processes implementation. I mean multiple processes that run in a context of a single OS-thread or OS-process.

    Read the article

  • String regex matching in Erlang

    - by portoalet
    How would I do regex matching in Erlang? All I know is this: f("AAPL" ++ Inputstring) - true. The lines that I need to match "AAPL,07-May-2010 15:58,21.34,21.36,21.34,21.35,525064\n" In Perl regex: ^AAPL,* (or something similar) In Erlang?

    Read the article

  • Node.js or Erlang

    - by gotts
    I really like these tools when it comes to the concurrency level it can handle. Erlang looks like much more stable solution but requires much more learning and a lot of diving into functional language paradigm. And it looks like Erlang makes it much better when it comes to multi cores CPUs(fix me if I'm wrong). But which should I choose? Which one is better in the short/long term perspective?

    Read the article

  • Code hot swapping in Erlang

    - by Roger Alsing
    I recently saw a video about Erlang on InfoQ, In that video one of the creators presented how to replace the behavior of a message loop. He was simply sending a message containing a lambda of the new version of the message loop code, which then was invoked instead of calling the old loop again. Is that code hot swapping in Erlang reffers to? Or is that some other more native feature?

    Read the article

  • How to decode ASN.1 to XML with erlang

    - by shian
    Hi I use asn1 module in erlang to decode. The output is like {'UL-CCCH-Message',asn1_NOVALUE, {rrcConnectionRequest, {'RRCConnectionRequest', {'tmsi-and-LAI', {'TMSI-and-LAI-GSM-MAP', [1,0,0,0,0,1,1,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1, 1,1,0,1,0], {'LAI', {'PLMN-Identity',[2,2,6],[0,1]}, [0,1,1,1,1,0,0,1,1,0,0,0,1,1,0,1]}}}, terminatingBackgroundCall,noError, {'MeasuredResultsOnRACH', {'MeasuredResultsOnRACH_currentCell', {fdd, {'MeasuredResultsOnRACH_currentCell_modeSpecificInfo_fdd', {'cpich-Ec-N0',39}}}}, asn1_NOVALUE}, asn1_NOVALUE}}} How can I output XML instead of erlang term?

    Read the article

  • Erlang: HTTP GET Parameters with Inets

    - by Ted Karmel
    The following post indicates how to make a simple get http request with Erlang's inets. exploring erlang's http client Sometimes, URLs have GET parameters: http://example.net/item?parameter1=12&parameter2=1431&parameter3=8765 Besides including the parameters in the URL itself, is there a way to create variables and then send them with the request? Example appreciated.

    Read the article

  • What is Erlang's concurrency model actually ?

    - by arun_suresh
    I was reading a paper recently Why Events are Bad. The paper is a comparative study of Event based and thread based highly concurrent servers and finally concludes stating that Threads are better than events in that scenario. I find that I am not able to classify what sort of concurrency model erlang exposes. Erlang provides Light Weight Processes, but those processes are suspended most of the time until it has received some event/message of some sort. /Arun

    Read the article

  • Should I consider Erlang for web mvc?

    - by gotts
    Can I do that? I'm afraid that this can be an overkill and eventually I'll end up with much less productivity than with traditional stack like Ruby/Python/you name it. I understand that you will start with much lower productivity if you start to work with new technology but .. is it potentially worth trying and finally switch to Erlang as the only tool for web development and all the backend stuff. Or is Erlang more suitable for only some high performance backend tasks?

    Read the article

  • Adding nodes dynamically and global_groups in Erlang

    - by ZeissS
    Erlang support to partition its nodes into groups using the global_group module. Further, Erlang supports adding nodes on the fly to the node-network. Are these two features usable with each other? As far as I understand, you have to name every node on startup to use the global groups.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >