Which server is affected when we use Neo4j traversal API? - neo4j

Maybe a silly question :)
If we use separate physical servers for Application and Database, when using Traversal framework, which one of the servers should support the queries (DB or Application)?

Neo4j traversals run on the Neo4j database server, if you are using the server version of Neo4j.

Disclaimer: I'm building a similar system right now, so my view is probably biased.
My Node.js Application server provides an Angular app from the /public folder. The client application speaks only to the Application server.
Generally it works like this:
Client sends a message to Server.
Server returns a promise to client.
Server queries the DB, performs any necessary manipulation to the data.
Server resolves the promise.
Client interprets the response.
hope that's helpful.

Related

How do I create a Dart Server database?

I know that it is possible to create a IndexedDb at client side, but I was wondering if it possible to create a key/value store server Side. In that case we could use that db as a cache server or even as an elasticSearch server, or maybe replace a SQL or NoSQL database
Unfortunately it is not possible to create an IndexedDb on the server in Dart. The implementation primarily leverages the APIs provided by the client-side navigator (eg. Chrome, Firefox, etc). IndexedDb is a developing web standard which will hopefully be implemented in all browsers in the future. In this way, Dart is basically using APIs to access a separate database (albeit a very simple one). It is not implemented in Dart itself.
That said, in addition to other serverside database APIs, there is also a Dart client interface for memcache which can be run on the sever to connect to a memcache instance
You can use any database on the server where a Dart driver is available (not so many yet, but in the future there will be support for most mainstream databases.
take a look at
https://pub.dartlang.org/packages/yomp_db
http://pub.dartlang.org/packages/mongo_dart
http://pub.dartlang.org/packages/sqljocky

BreezeJS with a Linux backend

I am working on a project where we have a very slim server (Linux, Nginx, Sqlite), but our web application shall not show any signs of shortcomings (should contain charts, dashboards, nice looking controls) – so I need the client to do all the heavy work.
I assume that BreezeJS would be good in this case, because it manages data on the client, in a way that reduces workload on the server. The server only sends the data to the client and at some point gets data back that has to be saved to the database. All caching and other stuff is managed on the client.
I assume AngularJS would also be good in this case, because it is a client-side MVC-framework, again reducing workload on the server. It also works seamlessly together with BreezeJS.
I assume Wijmo would also be good in this case, because it provides nice looking controls and also works seamlessly together with BreezeJS and AngularJS.
Are my assumptions right? Any comments?
My only concerns are how I get BreezeJS to “talk” with the Linux-server (Nginx, Sqlite). Are there any samples regarding this? Is anyone working on something similar?
We will be releasing a NodeJS/Express/Mongo example within the next few weeks that should show how to communicate with an arbitrary non-.NET backend. (also see the current 'Edmunds' example in the Breeze zip). But we don't have anything yet that explicity shows Breeze working with a Linux backend. Please vote for this here: Breeze User Voice

SignalR on non-Azure Web Farm

I have implemented SignalR support for web application. It works great. The problem I'm dealing now is make it work in non-Azure web farm environment. SignalR supports Windows Azure Service Bus and Redis out of the box. Also there is RabbitMQ implementation on GitHub. All these solutions implement IMessageBus interface.
Based on our current situation we can't use Redis or RabbitMQ. So I have few questions:
1) Is there any alternative solution that uses SQL Server or MSMQ?
2) Is it difficult (possible) to implement your own solution for SQL Server or MSMQ? David's post on SignalR 0.5 (http://weblogs.asp.net/davidfowler/archive/2012/05/02/signalr-0-5.aspx) says they are going to support SQL Server QNS or Service Broker (not SQL Server DB itself) so maybe it's a wrong way at all?
3) Is there a way to work around until this support is implemented? For example, it sounds like the we need to handle state of the connections list between servers. If we know number of nodes and their IPs we can share this information between servers via Web Service calls instead. Does it make any sense?
Damian Edwards appears to have just started working on the SQL scaleout implementation. You can find the details of that implementation here on GitHub and the issue tracking this work can be followed here.

Preferred method/format for sending/receiving data to/from server using iOS?

As I begin building the framework of my first iPhone app, I'd like to learn more about the "standard" or preferred approach for interacting with HTTP servers. I assume most of these iPhone apps initiate HTTP connections to send and receive data. What is the preferred data format and method for going about this task?
Secondary questions: Are there other ways of sending/receiving data to a server? Should I avoid using a PHP web server as the middle man in interacting with a few databases?
Current process:
Outbound: iOS -> Http request -> PHP -> MySQL Database
Inbound: MySQL -> PHP -> JSON Data -> iOS
I would use XML to communicate with your server unless you are doing something special (Video/Audio or packaging your own data). Cocoa has built-in support for XML so it would speed up the development process.
There are other ways to communicate with the server. You could write your own protocol which would only be understood by your client (Maximum security but could be hard to maintain or bugs could be discovered). You could use someone else's framework (like JSON).
For more details about JSON, please see this link iPhone/iOS JSON parsing tutorial
You could try NSURLConnection. It is usually your best bet. It's the preferred method to access web resources. Be sure to check out NSURLConnection SSL HTTP Basic Auth to see how to use SSL. If your're debugging and your certificate is not quite trusted, check out: How to use NSURLConnection to connect with SSL for an untrusted cert?.
As for your Database question.
I personally would use a PHP Webserver that communicates directly with my Database because
1. I can change web hosting companies and my iOS app will only need to know the domain name (www.example.com/?username=abc&password=0000&uuid=000000&data=PackagedData)
2. I can upgrade my DB plan from FREE to something that can manage more connections (or the type of DB) and I just need to update the connection strings in my PHP Script (no need to update client iOS app)
Here are some scary reasons why you don't want direct communication with your database server
1. If you are storing sensitive non public data (usernames, documents, passwords, etc) then you're taking a HUGE risk. A clever hacker can reverse engineer your app and find the strings you used to connect to the DB and then gain access to your DB (without your knowledge). Possibly use the data or sell it!
If you ever decide to choose a new DB server or if your hosting company decides to give you a new IP (or sub domain for your DB Server) then you will have to update ALL your clients immediately and you may need to send them Push notifications to inform them that your App will stop working unless they upgrade.
There isn't a preferred format. Personally I like using JSON but some people swear by plists because of the speed. You can also use XML if you are more comfortable with it. I've found working with JSON REST API's very enjoyable on iOS using ASIHTTPRequest and JSONKit. It's been pretty easy to get started and the flexibility allows for some really cool stuff.
You should definitely use a PHP Server as the 'middleman' because you'd want to validate your data on the server side as you receive it. Exposing your DB directly exposes it to attacks and using PHP you could save yourself a lot of headaches and issues. Of course you can use other frameworks and languages such as Ruby (RoR, Sinatra etc.), Python (Django) and others
Your current process looks just fine to me and is what many services on the Web use to solve this exact problem.

iOS Web Database

I need to populate a table in an iOS application with data from a Web database
I already have a MySQL database set up but reading about this it seems there must be an easier way for the iOS to interact with a web database
Any help or pointers would be appreciated,
Thanks
You should make an API interface.
Then use the API to communicate with the database. Using the database directly is a very bad thing to do.
If you are really desperate, consider using the MySQL C library. This article explains it in great detail:
http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/
For my application, I chose to create a web service to act as an intermediary between my application and the database.
This layout has several advantages. Considering you have MySQL database you can try to create some php scripts (I chose php because the API to work with mysql is very very simple and as you said, you don't need very high security or performance).
You can use these scripts through HTTP requests (you can use NSURLConnection to do these).. These scripts connect to mysql , fetch the data you need to pass the result back to the application in an easier to use format (e.g. I use JSON).

Resources