I am developing a spark application in eclipse ide with scala language and with maven dependencies.
I would like to know:
Is it possible to create an interface that has a text area and a button with scala language on eclipse?
I know how to manipulate Java GUI. But I have no idea how to manipulate Scala GUI.
I'm still new to this apache Spark environment
Yes, it is possible to do that in Scala but it has no relation to the Apache Spark Environment. The latter is an execution framework, specifically a distributed general-purpose cluster-computing (aka grid computing) framework which is not something you'd use to write UIs on. To create UIs you'd need a UI framework. One option is to look at ScalaFX (http://www.scalafx.org/).
Of course, it can be useful to have a UI to visualize minimally inputs/outputs of your apache-backed computation layer, I suspect that's why you asked the question, but they are not otherwise related. Hope this helps.
Related
Is there any thing that can generate a sequence diagram between actors in akka?
Or any kind of diagram in akka?
I use sbt 0.13.13 with scala 2.11.8, akka 2.4.16
The idea of general visualization of akka actors (mailboxes) is quite fresh, so there is not much in terms of existing frameworks for it. The one I came around and seemed closest to kind of general solution was akka-visualmailbox.
They also have sample project and comprehensive installation instructions in README.
The best part of this one is that it does not require code changes.
Another one that does is akka-message-visualization however I did not see any simple setup guides out there for it.
Use Lightbend Telemetry Visualization tools
Specially look into Vizceral Visualization tool
I'm currently building one called Muse, it's still in early stages, but I have already begun using it at the office. You can select one or more messages and generate a sequence diagram from them.
I am starting a project where we have a lot of business rules. I have strongly been considering using the JBoss rules engine, Drools.
My project uses Scala and uses the Spark engine. I am wondering if anyone has experience, or advice, using Drools with Spark/Scala.
If you looked into Drools and decided against it, I would like to know that too.
I have read several blogs on how people integrate Drools with Spark, or Drools with Scala, but I didn't find any good examples explaining Drools on Spark with Scala. I have seen this with a mixture of Scala and Java, but never pure Scala. I am not sure if this is possible.
Update: Clarifying Question
Would you recommend Drools?
How about with Spark/Scala?
If you looked into Drools and decided against it, I would like to know
that too.
I would not advise that. We are forced to use drools in one of our components and all developers in a team find this solution full of cons:
Java 8 support: scala is moving towards java 8 (see this and
this regarding runtime). Drools started to support java 8 only
in 2 years after its release.
IDE support: eclipse only. We were not able to get it done in
Intellij idea.
General purpose: we did come up with the idea, that whatever you
write using drools rules engine could be written in java/scala
easily. You would say that business logic can get too technical?
Possibly, but you would not have to learn some kind of scripting language
to create business rules.
1) Yes, I would recommend Drools. I have no experience with other rule engines, but the projects I have developed using Drools have worked perfectly so far. Truth be told, I have only used the basic functionality of Drools (never used salience explicitly, Agendas, etc). However, the functionality I have used has solved my requirements perfectly.
2) I have used Drools with both Java 7 and Scala 2.11. I haven't found any particular thing I was able to do with Java but not in Scala. My latest project is using Apache Spark with Scala and Drools, and everything fits together nicely.
If you are going to use Scala, then your facts (the objects that model your domain; aka the 'bean') should have public access modifiers on the val or var you are going to access within the rules. If you need static methods or attributes, then use Objects and import them in the rule file.
Hope this helps
I know that Scala has Swing (exclusively) as stand alone UI.
Is there any better UI (like JavaFX in Java) in Scala.For a better look and feel.
Please help.
The quick answer is no. Scala does not include a UI framework on its own. You can either use any java UI framework (swing, javaFX and others) via java interop (which is trivial) or find a scala wrapper for one of them (as the comment above).
I mainly post this since your question is else likely to go unanswered, which is kind of a burden on the site.
I was reading how the playframework uses some groovy based view engine, and that view engine has some performance issues with it.
Is play still tied to this view engine or are there viable alternatives that ship with the framework (or don't require any substantial hacks to get it to work).
Also, I was reading how the playframework uses python for its command line code generation etc., can someone point me to the source code where that resides?
Japid is there for long time, it has best performance as it
compiles template into byte code.
Like Japid, Rythm also
compiles templates into byte code and is very fast also. It uses elegant .net Razor
syntax, and provides better Play!Framework integration. Check the
full demo at here, note it's running on GAE.
There are some other template engines for Play!framework including thymeleaf and cambridge
All above are for play-1.x, while Japid also provides play-2.x integration at github.
The source code of the python stuff could be found at ${PLAY_ROOT}/framework/pym.
There are at least 3 template engines in Play's modules and what's more they are there for long time now.
Also can be found at playmodules.net
Of course Play 2.0 brings new template engine based on Scala
I think the Scala-based templates in Play! 2.x are definitely the way to go.
I've used plenty. But this is easily the best. It's also really tightly integrated with the Play! development process and the eclipse I'm running on top of it.
I have been working on a project and as I have just started on the webservice I found Lift has been released, so I am curious if there will be much more complication by using Lift over Jax-WS using JDK6.
I am doing this with the Eclipse IDE, but I don't know if I will get much benefit from the IDE on this project.
Lift is written in Scala, so the simple question is do you know Scala? If you don't know Scala but you do know JAX-WS, then Lift will clearly be way more work to get to a working implementation.
Scala and Lift are cool, but unless you are already comfortable with functional programming approaches, they will make your head hurt for at least 6 months. Since they are relatively new they also suffer from a lack of tooling.
You mention that you are using JAX-WS - can you do that with Lift? If you can't do it natively with Lift, can you easily integrate the standard Java libraries for this?
Depending on whether this is a personal project or work-related, your tolerance for taking technical risk can vary widely.