Forgot your password?
typodupeerror
Databases Programming

Why Reactive Programming For Databases Is Awesome 165

Posted by Soulskill
from the because-of-the-free-ice-cream dept.
Nerval's Lobster writes "'Building on many lessons learned from spreadsheets, functional languages and model-driven application development environments, Reactive Programming (RP) is a recent approach to creating applications,' Val Huber, CTO of Espresso Logic, writes in a new column. 'In the RP paradigm, you can create complex applications from a series of simple declarative statements. Many of the details of implementation and work of gluing together various sorts of application constructs can be hidden because of the declarative approach.' He goes on to argue that RP makes maintenance easier and applications more adaptable, because RP offers automatic dependency management and reuse; at the same time, he also acknowledges that RP has some shortcomings. What say you?"
This discussion has been archived. No new comments can be posted.

Why Reactive Programming For Databases Is Awesome

Comments Filter:
  • by idioto (259918) on Friday December 06, 2013 @06:35PM (#45622643) Homepage

    I think excel is one of the greatest programs ever and reactive programming sounds great. This article isn't very specific as to how to get started though. Is it a concept, a product or something I have to implement myself?

  • by Lisias (447563) on Friday December 06, 2013 @06:40PM (#45622697) Homepage Journal

    Interesting.

    Code modeled in RP sounds like VHDL, Verilog et all - the languages used to model modern Programmable Logic Arrays, Programmable Gate Arrays and Programmable Logic Devices - aka, hardware.

    No doubt this approach has its merits, but this kind or "programming" has its gotchas - a lot of gotchas.

    I stand aside for now, looking with great interest.

    • by ackthpt (218170)

      I think they should change the "Reactive" to something like "Proactive" as Reactive has such a negative connotation.

      It's late on Friday, lots of plans for the weekend, but need to hit a few stores on the way home and maybe top of the tank ...

      then it hits, "Oh, you're still here we need WHUMP (massive request hits the inbox) kthxbaihavagudwkendlol" ... yuh.

    • by mlts (1038732) *

      I'm curious if this could be used with a FPGA card array to help with I/O or transaction processing, assuming the disk I/O isn't the bottleneck.

  • Spreadsheets? (Score:5, Informative)

    by Animats (122034) on Friday December 06, 2013 @06:42PM (#45622709) Homepage

    Did this guy just reinvent spreadsheets? There's something to be said for this, but having written in Prolog, which works that way, the 'reactive programming' people have to make a better case than the article does.

    On the other hand, one of the big problems in databases is change notification. Microsoft at one point had a research project on this. The concept was that you could make a request to be notified when something of interest changed in the database. This was expressed as an SQL SELECT statement. When some change was made that would affect the output of your pending SELECT, you'd be notified. The problem was to figure out some efficient way to do this with thousands or millions of pending SELECT statements.

    Finance people use notifications like that all the time. Limits on stocks, limits on combinations of stocks, changes in key ratios, that sort of thing. But the systems for that are specialized, a special case of a more general problem. The most general form of the problem is that B wants to know when something has changed at A. Most of the solutions for this have problems. Polling is either inefficient or slow. B relying on A to message them on a change has a failure problem. Both approaches can result in overloading A with checks for events that aren't happening.

    • Re: (Score:3, Insightful)

      by Anonymous Coward

      A trigger on INSERT or UPDATE of a watched entity should kick off an INSERT into a message queue, and a trigger on INSERT in the message queue should run a script to send the message where it needs to go. Now you have a self-managing, self-logging, asynchronous system that only uses system resources when needed.

      Don't reinvent the wheel. Do learn your craft and become a master at it.

      This was solved decades ago. Next question, please.

      • Re: (Score:2, Flamebait)

        A great answer with a completely unnecessarily Douchy tone thrown in for free - brought to you by "Misplaced Sense of Self Importance(TM)", arrogance and "Fragile Ego INC.".

        Well done, sir, for keeping alive the IT stereotype...

      • Re:Spreadsheets? (Score:4, Insightful)

        by sribe (304414) on Friday December 06, 2013 @07:29PM (#45623109)

        A trigger on INSERT or UPDATE of a watched entity should kick off an INSERT into a message queue, and a trigger on INSERT in the message queue should run a script to send the message where it needs to go. Now you have a self-managing, self-logging, asynchronous system that only uses system resources when needed.

        Yes, exactly. OK, sometimes it can actually be a little tricky to figure out who needs notification and what data they need, but that's application/business logic that just needs to be worked out. (Example: client was not interested in a particular "master" record, and therefore has not received it, but the addition of a particular "detail" record means that client is now interested, so sending the changed record is not enough, the update needs to include the master and all related details. And so on and so forth, for a really rich app with rich workflow, there winds up being a surprising amount of logic required to get the right updates but no more than needed out to each client.)

        This was solved decades ago. Next question, please.

        Well... No, not really, at least not that I know of. The ability for "trigger on INSERT in the message queue should run a script to send the message where it needs to go" has actually *not* been around for decades. For way too long, this had to be a process *polling* the message queue. Triggers were limited to whatever "procedural SQL" flavor your db had, and had no access to file or network resources. Now you can write triggers in many languages, sometimes with full access to the system. Now you can from a SQL trigger send a notice, which a client can listen for via select/kqueue/libevent etc. But that's all much more recent.

        • Publish changes to a topic and have whatever needs notification subscribe to the topic. If they don't need all changes, apply a message filter to the subscriber.

          Aka JMS and other messaging systems. Solved last century.

        • It's only fairly recent in MySQL, MariaDB or whatever web people use these days. Real databases already had this decades ago.

          • by sribe (304414)

            It's only fairly recent in MySQL, MariaDB or whatever web people use these days. Real databases already had this decades ago.

            No, they did not. They had triggers. They had neither active notifications, nor any way to write a trigger that accessed the file system or network "decades ago". (I'm talking specifically about the "Big Two" of times past, Oracle and Sybase.)

            • by loufoque (1400831)

              PostgreSQL has allowed functions to be written in plenty of programming languages for at least 10 years.
              Also, with Oracle it was possible to use Java in addition to PL/SQL since 2002. I don't know about Sybase but I guess it probably got .NET support around 2003 or so.

              • PostgreSQL has allowed functions to be written in plenty of programming languages for at least 10 years. Also, with Oracle it was possible to use Java in addition to PL/SQL since 2002. I don't know about Sybase but I guess it probably got .NET support around 2003 or so.

                Perhaps you failed to notice, but 2002 is only just shy of 12 years ago. The word "decades" (note the fact that this is the plural not the singular) implies at least 20 years. So, the poster you replied to was exactly correct, they did not have this "decades ago".

                • by sribe (304414)

                  Perhaps you failed to notice, but 2002 is only just shy of 12 years ago. The word "decades" (note the fact that this is the plural not the singular) implies at least 20 years. So, the poster you replied to was exactly correct, they did not have this "decades ago".

                  Yes, and I, the poster he replied to, have been doing this kind of work for 3 decades, so I know good and damned well that the capabilities being discussed were not around 20 years ago ;-)

                  But this being /., home to "highly oppositional" personalities, I'm sure that next we'll hear that 1.2 decades is most certainly more than 1 decade, therefore plural. Then we can devolve into arguing about whether the linear scale is correct, or whether we should use a logarithmic one ;-)

      • Putting in things like triggers require fore thought as to what could change. This is a process that can take as much time (or even more) as your original task. If you are a clever programmer, you might still miss something. And if you're not a programmer, you may find this an impossible task.

        Things like "reactive programming" make it easier for non-techies to process data. It is a little bit funny that they write it up in this manner (next up, an article about "round transportation" describing how to m

      • Therein lies the problem, your simple trigger will fire ALL THE TIME. When all I want to watch is record A value B. Triggers are expensive, do you really want to weigh your tables down with unnecessary trigger calls? Clearly you are only dealing with a couple hundred transactions a second, but when things get into the thousands, and at peak millions, placing a trigger on a database is sheer stupidity. Triggers which are utilized are due to bad planning, last resort efforts/or because of crap code. Thre
        • by Luyseyal (3154)

          In general, it is bad form to peek under the sheets in the database. However, it could be extremely useful to tie a trigger to a primary key + address for these specific cases. The database should also not block on it if there is no DML or DDL going on -- just piping to a message queue or executing an external script or whatever.

          Blue-skying. It's still early, here.

          -l

    • A SQL Server CLR trigger, a message bus, a reactive object. I'm off to try it. Thanks for the idea.

    • Did this guy just reinvent spreadsheets?

      When I saw spreadsheets for the first time I said the same thing:

      Did they just reinvent state machines?

      Von Neumann would be proud.

  • by rev0lt (1950662) on Friday December 06, 2013 @06:43PM (#45622715)
    From the article description I couldn't figure out a) what is actually reactive programming; b) how will that help me build better applications. Complex applications are already built from a series of simple declarative statements. In fact, we call the most simple declarative statements language available "assembly". We call the machine representation of those very complex applications built with simple declarative statements "binary". On the other hand, Brainfuck also allows you to build complex applications with very simple statements, and I'm not migrating to it anytime soon.
    Not cool, Slashdot, I'm going to have to read TFA!
    • by rev0lt (1950662)
      Ok, I've read the article diagonally (hey its slashdot!), and apparently someone will have a big surprise when arriving to the letter T (triggers) in their SQL manual. And if it is an actual PostgreSQL manual, imagine their surprise when they find out they can actually code said "triggers" using several high-level languages.
      Next week I'm expecting a blog article explaining why it is a bad idea to embed application logic in the database... Then again, this will still be slashdot :P
      • by sribe (304414)

        Ok, I've read the article diagonally (hey its slashdot!), and apparently someone will have a big surprise when arriving to the letter T (triggers) in their SQL manual. And if it is an actual PostgreSQL manual, imagine their surprise when they find out they can actually code said "triggers" using several high-level languages.

        You forgot "N" for "notify" ;-)

        • by rev0lt (1950662)
          Yes I did :D And that will actually come handy in a current project, tnx for the refresh!
          • by sribe (304414)

            Yes I did :D And that will actually come handy in a current project, tnx for the refresh!

            Well then, don't forget kqueue (or libevent)--select is so nasty ;-) Also don't forget pq_consume_input...

    • Complex applications are already built from a series of simple declarative statements.

      I'm not being pedantic, as I'll be first to say that software buzzwords are not used consistently, but what you call declarative I believe they'd call imperative, as in "do this", whereas declarative is "this is the way it is (or I want it to be)". I don't know Prolog, but I believe that's considered declarative, as opposed to imperative (which describes most languages, C/C++, Java, Python, etc.).

      Haskell, which I do know, is considered at least partly declarative. You declare the relationships between varia

      • by rev0lt (1950662)
        This is my personal opinion, but the whole "lets fit languages into predefined buzzwords" is f*** bullshit. Every strong typed language has a declarative section with static or partially static values, that define data structure. So before the "do this", you define "where". Moving to your example, x = bar 3.14 and not necessarily y. Out-of-order declaration is allowed because there is no cascading dependency (eg. y value cannot change globally, so it doesn't matter where it is declared). That is syntax suga
      • I've done small amounts of both. Haskell definitely reminded me of Prolog in some ways. I used to think of programming Prolog as building a database of facts and relationships, then executing queries against the database.
    • by sribe (304414)

      Complex applications are already built from a series of simple declarative statements. In fact, we call the most simple declarative statements language available "assembly".

      No we don't. We call assembly, and most every language in common use, "imperative", not "declarative", because, you know, that's what they actually are. Off the top of my head, I can think of exactly 1 declarative language that is in common use: SQL. (Well, OK, I know, it's not terribly precise to call SQL just 1 language...)

      • by rev0lt (1950662)
        So, what you're saying is that "Memory position X has value Y" is different from "Move Y to memory position X" in programmable logic?
        • Essentially yes. One is saying a fact, the other telling it to do something. A good example is quick sort in Haskell vs C. In the former, you say what the sorted list looks like. In the latter you tell it the operations to perform.
          • by rev0lt (1950662)
            Again, programmable logic. Do you know the actual difference between one and the other? You could even do "push Y to stack / call X to decide what to do with it". and in both examples you provided, the generated code for programmable logic would be stuff like "memory position X has value Y; compare [X] with [Z]". There is no friggin difference, since most processors dont understand actual complex data structures (eg. a quicksort of a bunch of strings).
            • This article's about programming paradigms, not hardware implementation. There's no difference at the processor level between assigning a variable in javascript and assembly, but that doesn't make the languages equal.

              • by rev0lt (1950662)
                True, but the replies aren't against the (non) article - they are about me stating assembly is a declarative language. You add nothing to it.
        • by sribe (304414)

          So, what you're saying is that "Memory position X has value Y" is different from "Move Y to memory position X" in programmable logic?

          Honestly, of the top hits in google for "declarative vs imperative programming", wikipedia explains it best [wikipedia.org].

          • by rev0lt (1950662)
            The point is that *every* imperative or functional language has a declarative part. Even SQL. And in the end, every language that is compiled into dynamic programmable logic (as in actual microprocessor instructions) is translated into simple statements, and at that level there is no difference between declarative and imperative - there is usually no practical difference between "assume X is 5" or "move 5 to value of X". If you want to be "scholar" about it, go ahead. In the end, it's all ones and zeros, so
            • by sribe (304414)

              The point is that *every* imperative or functional language has a declarative part. Even SQL.

              SQL is a declarative language, not an imperative one.

              And in the end, every language that is compiled into dynamic programmable logic (as in actual microprocessor instructions)...

              Yes, machine language is imperative. That has nothing whatsoever to do with which higher-level languages are imperative vs declarative.

              ...so I'd guess you'll have a hard time figuring out if they are declarative (as in defining rules and limits) or imperative (performing operations).

              Actually, no, I would have not any difficulty at all figuring that out--it's really quite easy for me to spot whether or not a programming language requires/allows me to specify control flow. Really, please read the wikipedia article [wikipedia.org] before responding, because what you're saying strongly suggests that you don't know what

              • by rev0lt (1950662)

                SQL is a declarative language, not an imperative one.

                Actually, its not. DDL is declarative. DML, while usuallly vendor-dependent, its not necessarily declarative, and most often than not, is imperative. But anyway.

                Yes, machine language is imperative.

                Actually, its not. Machine language is declarative - you DESCRIBE values and operations (scroll up for people talking about VHDL and Verilog similarities) . Assembly is usually considered to be imperative. But, because of that, most languages are imperative at some level - regardless of how you describe shit. That is still the point.

                Actually, no, I would have not any difficulty at all figuring that out--it's really quite easy for me to spot whether or not a programming language requires/allows me to specify control flow.

                HTML allows you

                • by sribe (304414)

                  Actually, its not. DDL is declarative. DML, while usuallly vendor-dependent, its not necessarily declarative, and most often than not, is imperative. But anyway.

                  Wrong. DML is declarative as well.

                  Actually, its not. Machine language is declarative - you DESCRIBE values and operations (scroll up for people talking about VHDL and Verilog similarities) .

                  Wrong again.

                  HTML allows you to specify control flow for some given browsers - does that make HTML a programming language?

                  Meh. I wouldn't go that far. The thing is, HTML doesn't really have the other elements of a programming language, in particular you can only branch on that very limited set of conditions, and you don't have any way to store a computed value, much less any way to branch on it.

                  Grow out of your shell. The world is not black and white.

                  The world, no? Some technical definitions, yes. If the language has no explicit flow control it's declarative. If it has explicit flow control, it's imperative.

                  • by siride (974284)

                    I'm not sure how you can argue that "INSERT INTO foo VALUES (bar)" is anything other than a command to do something. The subpieces of DML may be declarative, but then again, to some extent, so are big groups of mathematical operations in C (if they don't have side-effects).

              • by rev0lt (1950662)

                what you're saying strongly suggests that you don't know what declarative programming is at all.

                Or I do and I still call it bullshit. Which one will make you think twice about stuff?

                • by sribe (304414)

                  Or I do and I still call it bullshit. Which one will make you think twice about stuff?

                  Wait, call bullshit on what? The original article? Be my guest! Me? No, I actually know the difference pretty damned well.

  • by ilsaloving (1534307) on Friday December 06, 2013 @06:51PM (#45622785)

    I can see this being useful for problems that are extremely linear and require extreme parallelization on large quantities of data, but that's about it.

    I've done this 'methodology' many times using Excel. I did it because I I needed to give the spreadsheet to other people, and wanted to avoid having Office nag about 'potentially dangerous VBA'.

    It makes it very easy to see *exactly* how your data is flowing, which is a bonus. It also uses a *lot* more ram because you are now maintaining a permanent block of memory for every single operation, for every different piece of data you are coding against. Of course, the second you get a cyclic dependency, the whole thing blows up.

    But this method of 'programming' was a natural and convenient extension based on how Excel (or any spreadsheet) operates. Nothing more.

    Is it just me, or does it seem like everyone now-a-days is trying very hard to come up with new methodologies and paradigms and web 6.5isms, so they can get their 5 minutes in the lime light?

    • by rk (6314)

      Is it just me, or does it seem like everyone now-a-days is trying very hard to come up with new methodologies and paradigms and web 6.5isms, so they can get their 5 minutes in the lime light?

      Hey! You're violating my business process patent! ;-)

      • Is it just me, or does it seem like everyone now-a-days is trying very hard to come up with new methodologies and paradigms and web 6.5isms, so they can get their 5 minutes in the lime light?

        Hey! You're violating my business process patent! ;-)

        Watch out! Someone might have patented finding people to patent troll via slashdot.

    • by gtall (79522)

      "Of course, the second you get a cyclic dependency, the whole thing blows up." Yes and no.

      Think of a state machine with one equation:

      s = a s

      You can code that in Haskell because Haskell has lazy evaluation. The equation (actually we'd call this a co-equation) describes an infinite string of 'a's. There is even a set theory to go with it, non-wellfounded set theory. What you cannot execute is

      s = s

      It is "non-productive". Many process algebra expressions are stated with co-e

    • by mutube (981006)

      Is it just me, or does it seem like everyone now-a-days is trying very hard to come up with new methodologies and paradigms and web 6.5isms, so they can get their 5 minutes in the lime light?

      That's nothing. My new product turns the light plaid.

    • by benjymouse (756774) on Saturday December 07, 2013 @04:49AM (#45625371)

      I can see this being useful for problems that are extremely linear and require extreme parallelization on large quantities of data, but that's about it.

      That's the danger: Relying on your own lack of imagination to support your argument. If you cared to google a little you would realize that there are many other areas where RP could be relevant.

      Erik Meijer who pioneered the RP push at Microsoft and which lead to the Reactive Extensions for C# and JavaScript (on which the current implementations in Java are based) wrote an article with a thoughtful title: "Your mouse is a database". I could as "so is your finger".

      The idea is that a mouse is a series of "rows" with mouse positions and button states. Instead of viewing them as series of *events*, RP views them as streams of objects. That allows you to apply filters, actions, transformations etc.

      Suddenly, the events become *composable*.

      Think of a touch interface. The touch surface fires events. But if you view the events as streams of objects you can define filters and transforms which let only certain "events" through, like a stream which accepts objects starting/resetting at the "touch" but only accepts messages as long as they describe an ever longer diatance in a certain direction until the finger is lifted again. Now you have a composable stream of "flicks". You can define similar streams which will filter/generate circular moves, pinching with 2, 3 or 4 fingers.

      Think of the problem of cache eviction. You can define sweeping/eviction algorithms as (simple) streams.

      Think of asynchronous programming in a web browser. Parred with web sockets (or in .NET the awesome SignalR which uses web sockets but automatically falls back to other channels when web sockets are not available) you can build responsive, asynchronous interfaces where you *declare* what should happen as server messages are received.

      Think of a dealer system where the dealer wants to track certain papers, positions, rates. RP enables you to build a chained, composable filter where alarms are raised (alarms being messages on streams) when a rate changes more than a certain percentage within a given time period.

      I've done this 'methodology' many times using Excel.

      Sure. Haven't we all?

      It also uses a *lot* more ram because you are now maintaining a permanent block of memory for every single operation, for every different piece of data you are coding against.

      Not neccesarily . In .NET, Reactive Extensions are integrated with LINQ. As a supplement to IObservable, Reactive Extensions also define IQbservable (a *queryable* observable). Analogous to LINQ for IQueryable, LINQ applied to a IQbservable is actually capable of combine criterias and transformations "up the chain" all the way to the source. I.e. if the "event" source is capable of filtering/transforming - like a SQL database or a RSS based web feed is - LINQ for Reactive Extensions can apply the filter very early in the chain and avoid uneccesary progression of objects which would be masked later anyway.

      Is it just me, or does it seem like everyone now-a-days is trying very hard to come up with new methodologies and paradigms and web 6.5isms, so they can get their 5 minutes in the lime light?

      It is not just you. There a scores of other people out there who have always done it before 20 years ago.

      Grow up. Sometimes Computer Science does see advanced. Realizations. Erik Meijer did an awesome job with Reactive Programming. He found a *duality* between actively "pulling" objects from sequences and reactively receiving "pushed" objects from a source. Given the mathematical duality he even managed to find places where the LINQ pull model was not complete yet.

      Reactive Programming is not new. Nor was OO when it really took off. OO actually was don back in the 1970ies with Simula (IIRC). But now RP has *matured* as

      • You make your points very well and I found your post to be very informative However, the conclusion of your post is unreasonably harsh, for a variety of reasons.

        Despite having been around for a long time, it has never really caught on. I had never heard of reactive programming until this particular article appeared, and I've been doing software development for a long time. To me that means it is nowhere near as good in practise, as it sounds in theory. Maybe it was too impractical to implement before no

        • I sincerely apologize for the harsh tone. That was uncalled for, and I shot off without reading what I wrote and how it comes across. Again, I apologize.

          Like you I have some "triggers". One of my triggers is blanket dismissal. I think what I perceived as your blanket dismissal was what triggered. You are correct about Ruby-on-Rails. It turned out that it was not up to the job. But at the same time it *did* popularize the "web-MVC" pattern in a way that Java frameworks (e.g. Struts) never achieved.

          When someo

          • Thank you. I apologize as well, as my original message was prematurely dismissive. So in that respect I deserved some chastising because I should have spent a little more time researching before I commented.

            That being said, as developers we are being bombarded by so many new things on a regular basis, there simply isn't enough time in the day to get involved with more than a handful. But this definitely looks like it's worth taking a closer look at. Apparently Netflix made a Java version available too.

            I

  • by mwvdlee (775178) on Friday December 06, 2013 @06:51PM (#45622791) Homepage

    I remember experimenting with a C++ framework that would work somewhat similar. Lazy evaluation and such. http://sourceforge.net/projects/ditto [sourceforge.net], it's long since been abandoned because, well... the only thing this way of programming solves is a small part of the "R" in "CRUD". It worked brilliantly for showing information on screen and automatically updating all kinds of stuff whenever some data changed, but in the end it only solved the least difficult part of creating an application, and doing so at a relatively high CPU% cost.

    It was also supposed to have lazy/dynamic/late-binding expressions (i.e. lazy_int a = b + c;), but it turns out you only very rarely have any use for that type of expressions. At the time, there were also far superiour C++ frameworks being developed which could do these things as a side effect of supporting more useful programming models.

    This RP thing doesn't really seem to do anything more than that.

  • This won't create an application. It just automates calculations that populate form fields. That's the easy part of most applications. The hard parts are the business logic that isn't just figuring out the values for form fields. In addition, you have nasty cascade effects. What happens in this system when the price for an item changes at the same time the customer's changing the number of that item they want to order, the customer's credit limit is being updated and payments are being applied to his 26 ord

    • by lennier (44736)

      What happens in this system when the price for an item changes at the same time the customer's changing the number of that item they want to order, the customer's credit limit is being updated and payments are being applied to his 26 orders each of which causes an update to his balance due?

      At a first glance, I would imagine a real-world RP transaction processing system would handle that problem much the same way real-world paper based transaction processing systems have handled it for hundreds of years: by grouping field updates into documents, and then talking about updates to and within documents. For example, at the time the customer creates a 'new order' form they would get a frozen local value of the current price for the widget at the time they placed the order and further updates would

      • by Todd Knarr (15451)

        Except that then you remove the basic principle of RP: that updates are done live. Freeze things like that and you've reduced it to the current model where you just dump values into variables and then run calculations on them to set the values of other variables which then don't change until you go and recalculate them yourself.

        • by lennier (44736)

          Except that then you remove the basic principle of RP: that updates are done live. Freeze things like that and you've reduced it to the current model where you just dump values into variables and then run calculations on them to set the values of other variables which then don't change until you go and recalculate them yourself.

          Not quite. As I understand it, the big idea of RP is not that everything has to be live, but that everything is capable of being live. If you have pervasive liveness given to you by an underlying framework in a safe and cheap manner, it becomes a lot simpler for the programmer to turn it off in the cases where you want to freeze a value, than to manufacture it out of nowhere in the places where you finally realise you need constant event-driven updates.

          The former could take just one keyword in a reactive-de

  • I don't understand this new slashdot scheme where the link to the story in the summary, leads to another story under the slashdot domain. Slashdot Business Intelligence? It's still slashdot... The summary on slashdot.org proper and the story under Slashdot Business Intelligence both offer a comments section. Am I supposed to double post or what? I'm posting this here out of habit but in the midst of confusion. The road to hell is paved by websites that suffered unrecoverable identity crisis.
    • They're trying to increase page hits and ad impressions on the BI sites that next to no one cares about. It's one of those Dice.com side effects.

  • I started using reactive extensions for .Net for over a year ago and am constantly learning new ways to use it. UI, message busses, async calls, business objects, the list keeps growing. It is by far the most useful programming concept I've learned in the last year. There is one for javascript if you are not into .Net

  • This article is just marketing bullshit double speak without a concrete implementation.
  • I like the idea of having variables auto-recalculate based on a dependency tree built automatically by a tool. But recalculating vars sounds kinda slow, esp when resolving the dependency calculations involves time-consuming operations like database fetches. What control does the tool provide in limiting the timing and scope of the recalcs?
  • which I think fits into this model. It was neat, but kind of a mess. As soon as I wanted to do something the creators of OL didn't think of I ended up writing a lot of JavaScript and stuffing it in weird places.

    I like the HTML/Android approach: Use Declarations for the UI layout and let old fashion code control the logic.
  • by Mister Liberty (769145) on Friday December 06, 2013 @07:39PM (#45623207)

    to /active/ programming.

    Anyways, seriously, please, please please my fellow programmers. Don't jump
    on this just because it looks or sounds esoteric.

  • Tl;DR [yet], but initially this sounds a lot like HDL's like Verilog and VHDL. The two fundamental constructs there are things that happen continuously (collections of simple logic gates) and things that happen based on a clock (registers, built around flip-flops). At a high level, this sounds like A = B+C is a continuous adder, and A is changed instantaneously with B and C. In the HDL world, this gets "compiled" down to silicon, but in a software world this would be radically harder to do, because you h
  • by istartedi (132515) on Friday December 06, 2013 @07:44PM (#45623253) Journal

    OK, B+C can be evaluated once when you assign A, or it can be evaluated every time you evaluate A. Sometimes you know that A will not change after you calculate it, or that a fresh value of A is required, and sometimes you don't.

    Delaying the evaluation of A is usually safe; but it can sometimes be very slow. Like it or not, performance still matters. If you evaluated A unnecessarily inside a tight loop in a game, you'd be dead. Even less CPU intensive thinks like web apps could be killed by this kind of thing, if A is evaluated in JavaScript every time you move your mouse pointer.

    Evaluating A every time is not only slow, it might not even be correct. Let's say you pull in some weather data and then render a map. The frontal zone should be a smooth line. If you pull in new frontal boundary data while rendering the map... you'll render a broken front.

    Sorry. It looks like the programmer still has to think. Re-calculating A every time the symbol A occurs may or may not be required.

  • Reactive Programming (RP) is a recent approach to creating applications,

    That is "recent" as in "about half a century old"?

    • by 3dr (169908)
      Exactly. So far RP in the article sounds a lot like data-flow engines (spreadsheets, various visualization tools, DB triggers, even make builds). It has spanned decades and fields, too. Many artificial intelligence systems used this type of reactive engine; for example, the CLIPS engine "reacted" by matching conditions to a subset of currently-asserted facts to trigger actions (which can then cascade by asserting new facts and causing other patterns to match). The common aspect to all these applications of
      • by lennier (44736)

        Exactly. So far RP in the article sounds a lot like data-flow engines (spreadsheets, various visualization tools, DB triggers, even make builds). It has spanned decades and fields, too.

        Yes. But it's been reinvented differently on an ad-hoc basis with different semantics each time. And each implementation does a slightly different subset of the same idea, and can't communicate natively with the others. Imagine if, say, there were no lambda calculus and everyone writing a programming language had to take a stab at rebuilding from scratch all the underlying mathematical axioms of computation. (Or - to put it in more modern terms - imagine if everyone were using object oriented programming, a

  • Event-driven programming is HELL, except for interfaces. Every once in a while a DB trigger is justified, but event-driven languages have failed time and time again because... it's impossible to predict what will happen when and avalanche of eventual complexity causes the system to implode under its own weight.

    For a programming language to make the cut, it must be utterly predictable down to the last side-effect.
     

    • by lennier (44736)

      Event-driven programming is HELL

      Isn't that right there a good reason for it being implemented once, correctly, as a core OS/language feature so that the programmer doesn't have to micromanage all the interactions, and instead just say 'this is a dependency on that; event engine, you sort it out'?

      For better or worse, ever since the mouse we've lived in an event-driven world. From what I can see, it's mostly worse, because our software tools haven't adapted to minimise the complexity, so we have the monstrous Byzantine complexity of signals

  • 'In the RP paradigm, you can create complex applications from a series of simple declarative statements. Many of the details of implementation and work of gluing together various sorts of application constructs can be hidden because of the declarative approach.'

    Sounds like another wishy-washy piece of shit language designed to be "easy", "fast", and "human readable" that will end up being kludgey, slow, and a pain in the ass.

  • Are there any examples of real-world reactive databases in production or development?
  • 'In the RP paradigm, you can create complex applications from a series of simple declarative statements. ..."; or, even , visually:

    http://hypercard.org/ [hypercard.org]

    It's too bad the Newton wasn't just a hypercard engine, preloaded with a couple of removable apps.

  • Yeah but if we can put it in the Web 2.0 then its for sure something new.

  • In the RP paradigm, you can...

    I'm sorry, but as soon as I read the word "paradigm" I knew you were management and therefor had no idea what you were talking about. I could be wrong, but I can' risk reading any more of the post for fear of running into that word again. I don't want to get contaminated.

    • I see that you've used that word in your reply, and therefore I have to conclude that you have no idea what you were talking about. ;-)

"Only the hypocrite is really rotten to the core." -- Hannah Arendt.

Working...