I have just found out about the existence of graph databases and neo4j and was wandering if there was a way to use it within NetBeans somehow in the way Apache Derby is used. I'm sorry if this is a very stupid question, I've just begun learning about databases and am far from knowing my way around. I can most definitely look for a way to do this on my own, but if a more experienced person can share a tip about this, I'd be very grateful.
You can use Neo4j either as part of your java application or as standalone server, see:
http://docs.neo4j.org/chunked/snapshot/tutorials.html
Related
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.
We are planning to migrate from Prevayler (http://prevayler.org/) to db4o (http://www.db4o.com/), so we wanted to know experiences, pros and cons, and best practices to move forward. What do you think about it? Is it a good solution? Or, maybe moving forward with a NoSQL standard solution would be better? (Such as MongoDB or CouchDB). Thanks!
we use db4o as main db in our production environment (both embedded and client/server), so i am going to share some of my experiences.
Pro:
- very easy for development (you just implememt data classes)
- support both embedded/client server under the same interface, which makes it easy to unittest
- decent performance for small projects
Cons:
- db4o is no longer developed so it's quite dead project, and you wont get much of support for it
- [client/server] everytime you change model you need to redeploy server (not talking about the fact that you need to host server app yourself)
- [client/server] performance degrade with more clients connected - not possible to scale
Summary: db4o is very good as embedded db (mobile app, desktop local db), but if it comes to server application you get into troubles
Given that I did not receive so much feedback, we gave it a try. So far, it seemed to be a good option for a embedded database, that makes much easier the deployment. So, we wrote again the whole persistence layer, with their unit tests and seemed to work fine.
Then, we tried with real data, and we start to have some weird Null Pointers, and we did not know why. Then, we started to read and we found this issue: http://www.gamlor.info/wordpress/2009/09/db4o-activation-update-depth/.
We've been trying to solve for a few hours, but then we decided no to spend more time on it, and found another way. CouchDB, OrientDB or MongoDB are still on our list.
I couldn't find any reference that PostgreSQL db supports PMML using a search engine. I was wondering if anyone had any luck with this. I would like to deploy a Random Forest model that is built in R in PostgreSQL (I'm aware of other work arounds - but want to get an answer for this question before I go down the other route).
From my own reading, PostgreSQL doesn't directly support PMML, however if you use JPMML it integrates seamlessly with PostgreSQL. Its library is opensource and extensive.
https://github.com/jpmml/jpmml-postgresql
There is no built-in support. However with the XML support, the extensible stored procedure language handlers, and such it shouldn't be too hard to implement as an add-on (or perhaps an extension).
I don't foresee PMML support coming built into PostgreSQL in the near to moderate future so you would do best to either implement it yourself or go another route.
i've been developing a asp mvc website for almost a year now exclusively on mongodb. i've loved it for the most part. development productivity has been great using a C# mongodb driver and tools like mongovue.
however, i've started to reach a point where there are things i really wish i had a SQL server database for. simple tasks like updating a record in the DB and only mildly complex queries to generate some type of report are becoming a pain.
i read an article somewhere that in order for NOSSQL to succeed there needs to be a standard query language for it, and tools developed around it. i'm guessing this is far far away, so right now i'm stuck trying to deal with these things.
i think eventually i will have to have a dual solution with monogDB and sql server. i don't think i will ever get to the point where i am as productive updating and writing queries for mongoDB as i was with sql server.
how are you guys dealing with this when using NOSQL like mongodb? are you facing the same issues as me?
One solution you may consider is LINQPad. You can set up a template with a reference to 10Gen's drivers and write ad-hoc, C# MongoDB queries like you would in your code. My team and I use this method to address the very problem you mention.
Try it out (it's free) and see if it can help with the simple, day-to-day queries you come up with.
Edit I also support Chris's suggestion of familiarizing yourself with the native JSON query language. Nothing beats a quick console window for speed, if you know the syntax.
The official C# driver will probably get a LINQ provider some time in the future, so that'd give .NET devs a familiar syntax for querying and maybe help with initial productivity. There're also some nice docs that help relate MongoDB queries back to SQL:
SQL to Mongo Mapping Chart
SQL to MongoDB (PDF)
These are great for learning, but to get the most out of Mongo it's well worth investing time getting used to the native JSON query syntax and Mongo-specific concepts like map-reduce.
Since your questions asks,
how are you guys dealing with this when using NOSQL like mongodb?
I thought I'd chime in. I felt your pain when working with another NOSQL database, RavenDB.
I wrote a Linqpad driver specifically for ad hoc interactions with RavenDB.
https://github.com/ronnieoverby/RavenDB-Linqpad-Driver
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.