gRPC - Using code other than Java to create a Service Implementation - eclipse

I'm a student. For my Distributed Systems project, I'm expected to create a gRPC project. I'm creating the project in Eclipse.
Two service implementation are to be coded in Java and the other is to be done in another coding language.
I've tried searching for help online but the results I'm getting are related to gRPC and how gRPC works, not about the coding or using other coding.
Ideally, I would like to use Python as the other language and to create it in Eclipse if possible. Does anyone have any information, documentation or examples I could look at, so I could can reference it?
I am able to see online searches for both Java and Python, but I'm not sure how to use both in one project.
Thank you.

So I got a lot of feedback for lecturers and classmates.
The server doesn't care what programming language is used.
So Java, Python, Node.js etc, could all be sent to the server.
A generalised simplistic idea of how I was able to understand is: Python converts its code to binary and sends it to the server. Same with Java and Node.js.
I don't know why, but I was digging myself deeper trying to figure out what code (i.e. the binary) that needed to be the communication between the server and code. I was trying to encapsulate Python into Java and vice versa.
Why did I think this? Your guess is as good as mine.

Related

How about Akka-grpc with flatbuffers, thoughts?

I have started working with Akka-GRPC using ProtoBuffers, the samples online are very clean and concise, but with Flatbuffers being faster than ProtoBuffers and GRPC stating out of box support for FlatBuffers, can we use flatbuffers with Akka-Grpc, I have started working on it and FlatBuffers seems much more work than what ProtoBuffer offers, so my question is, is it worth using FlatBuffers, is it possible to use FlatBuffers with AkkaGrpc(Since, its JVM at the end, still unsure though) and are there any child projects to do the same.
I understand we have Filo but any other alternatives
https://github.com/velvia/filo
Likely no. First, GRPC for FlatBuffers currently works for C++, Go, and is being worked on for other languages, but does not exist for Java (or Scala) as far as I know.
Even if it did exist, I'm not familiar with Akka, but if it integrates directly with Protobuf (which it looks like it does) then supporting FlatBuffers would require more work by the Akka developers. I'd ask with them.

Embedded Jetty 9. Create a Scala servlet

I am looking for the fastest way to create a Scala REST service. Ideally, I would like to build from scratch, learn the tricks of the trade before using a framework.
The REST service should serve JSON pulled from a MongoDB database. The web doesn't seem to be of much help, nor does the book on Scala by Martin Odersky.
I'm not aware of a tutorial or example that will give you exactly what you want, but I'm not really surprised at that. Anyone who wants to create a simple REST service would choose to use a framework, and you don't want to do that. By choosing to build something yourself from the ground up, you're choosing complexity - exactly the complexity that the frameworks exist to remove.
The same is true for Java - virtually nobody creates raw REST services on top of HttpServlet, because using a framework makes much more sense.
Having said that, creating a "raw" REST service in Scala would be virtually identical to doing so in Java. So find a Java/Maven example and do the small amount of work necessary to turn it into something that runs on top of Scala and SBT. This would be a good starting point.

How to run Scala files on a web server

This could be either an incredibly easy or horrifically complicated question; but I've started writing code in Scala, and want to run said code on a web server.
There's a few questions that I need answering really, and I apologise for my complete lack of knowledge on the subject, web servers scare me (I'm a PHP developer so all I need to do there is upload to any linux apache server):
How to save and upload files (I know how to use ftp software, do I need to do anything from Eclipse?)
What to do to my server to run the files (at the moment I just have a linux apache server from fasthosts, is that enough?)
Any other advice would be so greatly appreciated; and the less jargon the better - the whole thing blags me a little.
UPDATE: To put the sort of work I'm doing into context, I'm making a rather large, social-media style site that'll have a very large amount of small, regular posts/updates. Also thanks for the answers so far!
Seems like i need to do all of the following:
Learn Scala (I can write in PHP and Java so should be okay)
Install Apache tomcat on my server somehow
Install Lift (and then either Maven or the SBT)
Upload the whole thing?
What do I do about databases?! I need something really serious, with MySQL be okay? Urgh this goes on and on...
Here are the most important points. I'm afraid you will not get this done without lots of reading, but at least you'll know where to start.
You need your own servlet container, e.g. Jetty or Tomcat. Those can be used as stand alone servers or together with apache.
You need to package your web application as a .war file. That is basically a zip file with all the classes and some meta information. Then you upload the .war file to the server.
You should have a look at a web framework for scala, such as Lift.
It also helps to be on good terms with one of the major build tools, sbt or maven.
You are better off using a framework - like Lift as the other answer suggest or...
Play framework has scala support as well - http://scala.playframework.org/
You can look at Play framework "Preparing for Production" page - http://www.playframework.org/documentation/1.0.2.1/guide11
It is not going to be like with PHP where you can just ftp and host.
Lift is a whole web development framework around Scala - might want to try their Getting Started page, or just poke around their docs in general.
But in general, you'll be using any of the java-based web application serving solutions, e.g. Jetty, Tomcat.
You have not said what exactly you want to do with Scala on the web. In addition to the Lift and Play frameworks there are some interesting alternatives like Unfiltered:
http://unfiltered.databinder.net/Unfiltered.html
https://github.com/n8han/Unfiltered
It is also easy to start without any kind of framework by directly writing Servlets:
Here is a interesting example that uses Jetty, websocktes and the Scala interpreter to create a web based Scala REPL:
https://github.com/TiarkRompf/replhtml
Also the excellent Akka framework has a http module:
http://akka.io/docs/akka/1.1.2/scala/http.html
Scalate
- http://scalate.fusesource.org/
To start with Scala without too much to read, you may give G-WAN v3.9 (that's the September beta, the release is expected in October) a try.
G-WAN runs Scala source code files without configuration (you just copy a file and call it) and it lets you run other languages the same way.

Talking to Arduino from Scala

Is there a standard way to control an Arduino from Scala? If not I am interested in hacking one together, but am unsure of where I should start. The Firmata library seemed like the way to go but there is no Java or Scala interface. SPDE supports Processing pretty well, but I see no Arduino functionality there. I also have a few snippets of Java<->Arduino example code scoured from the Arduino playground and other sources, but nothing comprehensive.
If anyone knows of a Scala or straight Java (I can just wrap it in Scala) way to do this, or has suggestions on rolling my own interface, I would like to hear about it.
Thanks.
Any programming language can be used to communicate between the serial ports of the PC and arduino,as long as the programs running on both sides can make make sense of the data exchanged.RxTX is a java library for serial port communication.Hope this helps.
You might want to check out apache MINA, which provides some nice wrapping around the RXTX libraries and offers an API that's friendly to idiomatic Scala.
I've already had some success with this approach in driving an X10 controller for home automation.

Using Soap Web Services in iPhone with wsdl2objc?

I do realize this is a duplicate question, however the only other question is quite old, so I would like to know if anyone has had any recent experience with the latest version of wsdl2objc.
I am doing an application that will communicate with SOAP Web services exposed by a third party application (it only exposes them this way unfortunately). As far as I understand all wsdl2objc does is convert the WSDL to something useful in objective C code. I have also done the tutorial icodeblog intro to soap
So has anyone used the latest version of wsdl2objc?, what is your experience with it?, did you run into any problems with it?. Please let me know. Also some code sample would be really great.
Any information available on using SOAP Web Services with iPhone would be appreciated. Thank you.
-Oscar
My most recent experiences with wsdl2objc is that it's on the right road, but not really there yet. It's definitely the kind of program you'd want. It just may or may not be able to handle the WSDLs you actually have.
Short answer: try it and see if it works for your WSDLs. If it does, hooray. If it doesn't, you have two options. For reasonably simple WSDLs, write the SOAP by hand. This often is actually the easiest approach. If the WSDL is complex, then use gSOAP to get to C++ and then wrap the C++ in Objective-C++ (or use the -c option to gSOAP and wrap the resulting C, whichever you're more comfortable with).
I think this gives a good example of how to configure your environment (for noobs like me)
http://blog.futurebytez.com/2010/05/calling-web-services-using-wsdl2objc.html
The official wiki for wsdl2objc (linked in the article) has a code snippet which gives you the basics.