Erlang and OpenFlow Together At Last 93
New submitter SIGSTOP writes "The LINC [OpenFlow 1.2 software-based] switch has now been released as commercial friendly open source through the FlowForwarding.org community website, encouraging users and vendors to use LINC and contribute to its development. The initial LINC implementation focuses on correctness and feature compliance. Through an abstraction layer, specialized network hardware drivers can be easily interfaced to LINC. It has been implemented in Erlang, the concurrent soft-real time programming language invented by Ericsson to develop their next generation networks."
Re:Finally! (Score:5, Interesting)
I used Erlang once before, in a previous job. What a fucking nightmare.
It's certainly different from your average OO language, but it's no more "a fucking nightmare" than other functional languages like haskell and ocaml.
I don't like either because I believe garbage collection is a bad idea - the programmer should have full control, and it's the job of the language to expose flaws, not hide them.
I know I'm in the minority here, but still I look back to the days of (pre-turbo) pascal and (pre-95) Ada with fondness.
But really, Erlang is one of the better functional languages, as they go. It may be tough to learn, but it has enough software written in it to prove its wirth.
Re: (Score:1)
Hey, maybe he was referring to his previous job.
Re:Finally! (Score:5, Funny)
It may be tough to learn, but it has enough software written in it to prove its wirth.
I'm not sure Wirth had much to do with Erlang.
Re: (Score:2)
Damn, beat me to it....
Re: (Score:1, Insightful)
Functional languages are only a nightmare if you are too dumb.
Re: (Score:1)
A monad is just a monoid in the category of endofunctors!
Re: (Score:1)
Functional languages are only a nightmare if you are too dumb.
...or want the language to be accessible to people who don't get their jollies golfing things into rpn notation and actually want to get some real work done.
Re: (Score:3)
...or want the language to be accessible to people who don't get their jollies golfing things into rpn notation and actually want to get some real work done.
Go forth and get some real work done then!
Re: (Score:3)
I don't propse to start another to-GC-or-not-to-GC thread here. I'll just say my piece and that's it.
GC is sometimes a bad idea, and sometimes a good idea. It depends entirely on precisely what the programmer is doing.
Programs written in languages without some facility to enable automated or semi-automated memory management (be it full GC, reference-counted smart pointers or what have you) tend to be inherently non-modular. Somebody has to know when nobody else wants some object any more. There are essentia
Re:Finally! (Score:5, Insightful)
And just like manual memory management is a clamp on the foot for modularity in a single-threaded environment, manual locking and mutexes is an additional clamp on the foot for modularity in the multithreaded realm.
Erlang's actor model is an attempt to enable the production of modular concurrent communication software, just as Java's garbage collection model is an attempt to enable the production of modular business data software.
Re:Finally! (Score:4, Interesting)
Erlang's actor model is also just another tool in our toolbox.
Threads with shared memory, manual locking, mutexes, condition variables, restartable transactions and so on are hard to use. But that can also be okay. Sometimes the problem you're solving is so simple that it doesn't really matter, and sometimes it's so hard that there's no better way.
Having said that, of course, Erlang is closer to what Alan Kay meant when he coined the term "object oriented" than pretty much any other language has yet realised.
Re: (Score:3)
Erlang is closer to what Alan Kay meant when he coined the term "object oriented" than pretty much any other language has yet realised
I'm not sure it's still there, but there used to be a thing on the Erlang web page that said that Erlang was 'not an object oriented language like...' and then listed a number of other languages that were all less object oriented than Erlang.
You forgot about smalltalk (Score:3)
Erlang is a functional language first , OO second. Smalltalk was designed to be OO from the ground up. In smalltalk even first class objects such as integers have methods and can be passed messages. Thats taking it too far IMO , but you can't get any more OO than that.
Re: (Score:2)
I didn't forget about Smalltalk. When Alan Kay coined the term "object oriented", he didn't intend that everything should be an object. Erlang is closer to Kay's vision than Smalltalk is.
Re: (Score:2)
Having said that, of course, Erlang is closer to what Alan Kay meant when he coined the term "object oriented" than pretty much any other language has yet realised.
It's kind of hard to believe that considering Alan Kay himself wrote Smalltalk to show what object oriented is.
Re: (Score:2)
If it helps overcome your disbelief, consider that Haskell is closer to Peter Landin's vision of functional programming than ISWIM.
Re: (Score:2)
Re: (Score:2)
It's a personal opinion my my part. Kay's notion of OO was inspired by a biological system of cells, which communicate via (chemical) messages. Erlang's actors seem to fit this pattern more closely than, say, Smalltalk.
Re: (Score:2)
Re: (Score:2)
Re:Finally! (Score:5, Funny)
And you still hang out on slashdot, rather than reddit or Y combinator. Don't worry, you're probably not in a minority here.
Re: (Score:1)
If you think GC is only or even primarily for hiding programming errors, you aren't much of a programmer. Your programming language examples also suggest that you're very much a bondage-and-discipline programmer who doesn't mind having to be verbose unnecessarily.
For allocating lots of small objects, a good garbage collecting allocator is both more time- and space efficient. Think of something like a programming language compiler. Try building an AST (or an intermediate representation of the program or s
Re: (Score:2)
Your examples are somewhat flawed, because a lot of projects do exactly that. In Clang, for example, which I think gets better parsing performance than anything else around, small objects are allocated with a bump-the-pointer allocator with a per-AST scope, and then are freed by just freeing the whole allocation at once. This is entirely possible to do with manual memory management, because you have complete control over allocation policy. With automatic garbage collection, the collector has to infer lif
Re: (Score:1)
Of course you can used specialized allocation schemes, and they are sometimes really convenient, but you can't use them for everything, and it's always extra work. Perhaps ASTs were a bad example (although for ASTs, you have a lot less code - much of it pointless boilerplate - to write if you're using an ML-style variant instead of a class hierarchy).
For memory and time overhead, any data structure with a large number of nodes (a big std::map for instance) will have significant overhead, and you're not goi
Re: (Score:2)
If you think GC is only or even primarily for hiding programming errors, you aren't much of a programmer.
I hope you program better than you read. I don't think (and never said) it's for that, but I think it's an inherent side effect.
Manual memory management is good when your objects are large and long-lived, in which case you can handle them directly or by reference counting, but there are a lot of programming tasks where this doesn't even remotely apply. Maybe that isn't the type of programs you've written, but that's just your lack of experience.
You're making assumptions without any basis here, and then proceed to draw conclusions from them.
And you're wrong too - small and short-lived objects are the prime example of when garbage collection is bad - they stick around when they shouldn't have to. This problem is elevated with concurrency and reentrance. If anything, manual memory management should always be the default f
Re: (Score:2)
For allocating lots of small objects, a good garbage collecting allocator is both more time- and space efficient.
Do good garbage collecting allocators actually exist? I've heard of them, but have seen no droppings in the woods or other evidence. I'm pretty sure they are possible, but most of what I've dug into the guts of was a total amateur hour inside. Stuff like no sense of realization that GC shouldn't run constantly if the program isn't actually doing anything, and should cap itself in proportion to the program's core CPU usage.
Re: (Score:1)
For every 100 people doing their own memory management, I'm sure 101 of them are doing it right.
While I'm sure that you can do a better job at memory management every time than all the compiler & OS experts of the past 50 years most people can't. Memory management and pointer errors have caused not just decades of security problems but it has destroyed property and even killed people. All that could have been avoided.
Erlang routinely beats Java and C++ in large server benchmarks with lower latency and
Re: (Score:2)
It's certainly different from your average OO language, but it's no more "a fucking nightmare" than other functional languages like haskell and ocaml
Well, in the words of the guy behind Erlang, Joe Armstrong, "Erlang is a so-so functional language with excelent concurrency and distributed concurrency model" (paraphrase).
As a pure functional language, it shows it's age IMHO - no Hindley mildner type system, uninspired syntax (based on Prolog), etc. etc. But as a systems language for distributed, soft real time, highly available systems, nothing else can currently touch it. (Yes, I used to work at Ericsson and build routers based on Erlang/C.)
Re: (Score:1)
Re: (Score:2)
But really, Erlang is one of the better functional languages, as they go. It may be tough to learn, but it has enough software written in it to prove its wirth.
It has a "killer feature" that other functional languages lack; distributed nodes [erlang.org].... a clustering capability built into the language.
Re: (Score:1)
Great how the summary fails to fails to describe (Score:1)
Re:Great how the summary fails to fails to describ (Score:5, Informative)
what OpenFlow is, and the OpenFlow link goes to a non-existent page.
Link was missing a ":" - https://www.opennetworking.org/standards/intro-to-openflow [opennetworking.org]
Here's wikipedia: http://en.wikipedia.org/wiki/OpenFlow [wikipedia.org]
Re:Great how the summary fails to fails to describ (Score:5, Informative)
Erlang, of course, is a language designed to be as reliable and fault-tolerant as possible. I didn't know they used it in routers, but apparently some people want to.
Re: (Score:2)
Erlang, of course, is a language designed to be as reliable and fault-tolerant as possible. I didn't know they used it in routers, but apparently some people want to.
Well, it's been used in "routers [blogspot.se]" for some time. :-)
Oh Christ, no! (Score:1)
Haven't they ever played Beneath a Steel Sky [wikipedia.org]?
LINC WANTS YOU, FOSTER.
Re: (Score:1)
Re: (Score:1, Informative)
Even for Network Engineers, that is completely meaningless.
Anyway, an Ethernet switch or Router has two engines - The low level ('fowarding pane') of which is high speed 'copy packet from port a to port b'. It's not very bright, as that's almost all it CAN do, but it's very fast at that task. Of course, to be useful, an ethernet switch has to have more smarts -- for example, learning which switch port has which MAC on it and things like that. In a normal switch, it can, when confronted with a packet ask
Re: (Score:3)
You can for instance implement Layer 3 routing by dynamically changing the switch matrix on Layer 2. Essentially, IP adresses then become fancy MACs, and you know which IP adresses are reachable behind which port, allowing you to handle routing on Layer 2. Similarly you could implement higher level protocols to change your switch matrix, handle TCP errors already in the switch, saving hops and packets etc.pp.. In the end you get a box which seems to run each layer at wire speed.
In some way this runs contrar
Re: (Score:3)
In the end you get a box which seems to run each layer at wire speed.
That, if data in the traffic do not change much. From the ONF site, the router has to consult with the software what to do with the unrecognized packet. That cannot be fast. What's more, unless they change order of packets, the router would have to stall the traffic on the port. If change of order is deemed acceptable, they can go on routing other packets, but in the mean time other packets requiring software introspection might come and they would have to be buffered. Buffering on router is bad, because l
Re: (Score:2)
That, if data in the traffic do not change much. From the ONF site, the router has to consult with the software what to do with the unrecognized packet. That cannot be fast. What's more, unless they change order of packets, the router would have to stall the traffic on the port. If change of order is deemed acceptable, they can go on routing other packets, but in the mean time other packets requiring software introspection might come and they would have to be buffered. Buffering on router is bad, because later comes the problem of how to insert the now-cleared-for-delivery packets in the stream.
All in all, I do not see how even theoretically it can be "at wire speed": either lots of out of order packets with selectively long latencies or long stalls. More flexible and complicated you want it to be, more exotic cases you want to catch - the more overhead that would introduce.
So you have never seen a Juniper router in action?
That's essentially what they do, they take their routing table, lookup the MACs of the respective gateways on their ports and then generate a switch matrix which the routing component writes through to the switch.
Re: (Score:2)
So you have never seen a Juniper router in action?
I did, but it was way too many years ago. The Juniper was huge and pretty dumb, but could route fiber gigabit in realtime. :)
That's essentially what they do, they take their routing table, lookup the MACs of the respective gateways on their ports and then generate a switch matrix which the routing component writes through to the switch.
Oh. So the SDN means: that above + standardized interface to install your own "plug-in" for the e.g. MAC resolution?
I had the (short) experience in the telecom and many years ago (I was told) it worked pretty much like that for PSTNs/etc. Also there I heard the terms "control plane" and "data plane" first time. I had this short employment where among other things I had to impleme
Re: (Score:1)
Yes, but they don't look up that data by asking another computer over the wire and THAT is the difference that makes his statement.
'Switched IP' or 'layer 2 routing' or 'layer 3 switching' is not even a little new or unique to this or Juniper layer 3 switches.
Apache 2.0 licensed (Score:2, Informative)
for those curious what they meant by "commercial friendly open source".
http://www.apache.org/licenses/LICENSE-2.0.html [apache.org]
First link is wrong (Score:3)
Should be https://www.opennetworking.org/standards/intro-to-openflow [opennetworking.org]
Celebrity marriages (Score:2)
You know celebrity marriages never last. What are we going to call the bastard child offspring of this unholy union? Erla Flow? No... sounds like a personal problem. Lang Open? No... that won't do either.
Screw it, let's just call it "Forever In Beta", since most parents name their children based on their hope for their future. -_-
Support structure (Score:3)
Erlang Solutions will be providing the support structure for this, you can look at the packages offered here: http://www.erlang-solutions.com/section/84/support-plan-overview [erlang-solutions.com].
Functional languages - whats the point? (Score:2)
A pure functional language is one that just relies on recursion with only parameter variables to carry out loops. Sorry , but while that may have some kind of academic aesthetic to various hard core CS types, I really don't see why its that is any better than OO or even procedural style programming especially since both of those paradigms support recursion anyway. To me, pure functional just seems to be a very quick way to obfuscate even the simplest potential solutions to a problem.
Or am I missing somethin
Re: (Score:2)
Wow, did you think up that amazingly insghtful response all on your own or did you get help?
Re: (Score:3)
Or am I missing something profound?
Probably. [wikipedia.org]
Functional programming leads to a completely different set of coding idioms. These can be very convenient in many applications. Since it is not the kind of programming that most people are used to, it can be awkward at first. There are a lot of things that are much more elegant and obvious when done this way, but you have to get over the barrier of thinking procedurally first. I would say that it isn't simply that hard core CS types like the aesthetics of functional programming. I think it's
Re: (Score:3)
By definition, functional languages require complex, structured return types. Typically implementations use nested lists (where items are referenced by position) or nested hashes (where items are referenced by name). It's not har
Re: (Score:2)
Re: (Score:2)
That's more a "problem" with dynamic typing. Statically typed functional languages like Haskell or the ML family use type inferencing systems to detect these types of problems at compile-time. There's been a lot of progress made on type systems since C/C++ were developed. As the previous poster mentioned, Haskell
Re: (Score:1)
The profound thing your missing is that as a developer, if you feel the need to debate over the qualities of your language or style of programming (i.e. functional versus OO or whatever) then you have no right to actually be part of the debate.
The language doesn't matter that much, and the people trying to convince you why one is better than the other aren't experienced enough to realize that yet. The more someone implies that one language is the way to go or one style is the way to go for a certain task,
Re: (Score:2)
Obvious Troll is obvious. Or at least, I hope you're trolling, as opposed to trying to look wise by displaying intentional naivete. If you'd left out "for a certain task", I'd agree with you wholeheartedly -- there's no one right tool for every job -- but certainly some tools are better for some jobs than others.
Case in point: At my last job (actual
Re: (Score:2)
Yes, you're missing something profound.
The big deal (and it's a Really Big Deal) in functional programming is isolation of side-effects. Pure functions transform inputs to outputs, and do nothing else: They don't mutate data, they don't