I am looking for a way in which the query can be prepared and be fired on the remote server. I know that is is feasible in Stardog and GraphDB using rdf4j in Java. But how can that be done using python for Blazegraph?
I have tried looking at Sparqlwrapper and rdflib. rdflib supports prepared statement but it can only be used for file parsing and I havent find much documentation of the same as a driver as is the case of rdf4j. SparqlWrapper enables the use of remote repository querying but doesnt have examples of prepared statements and I am in need of both.
I have looked at this SPARQL query on the remote remote endpoint RDFLib / Redland
but this seems to be outdated (8 years old)
Requirement is to build a microservice over blazegraph to execute user specific input at run time. In case prepared statements are not being used, string concatenation will make it vulnerable to security threats and boilerplate codes.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We are new to grails and are concerned about the following issues:
scalability concerns
Using same back-end for different applications
So sticking to a single grails is good idea or we should separate concerns and even use other framework like node.js for frontend using rest.
Secondly i am not very clear ,where we should put business logic in grail app.Ideal place should be services i suppose
We are examining Angular.js since it seems to faster than gsp pages,current flavour for frontend and integration with grail is also easier.Wanted to check is this correct option or not.
Grails is very well suited fast paced development needs and you will love it when you get basic understanding of it. You can write a badly performing application in any framework/language. One thing I'd recommend is getting a good understanding of Hibernate which is the underlying persistence library. If you understand how that works, it should help you avoid making any silly mistakes at the DB level.
For the first part of your question the scalability of your web application won't really depend on what language/framework you choose to use, but rather how your application is built. You can build a scalable web application in Grails, just as you can build an incredibly slow application in C++. If Grails is the framework you would like to use, then use it; you can always rewrite the slow parts in Java or another fast language, if need be. (After all, that's what Twitter did with Scala.)
In our company what we do is use grails as a client interaction/licensing server and use multiple Node.js servers for analytics. So all what client gives gets stored on grails server and then the functional data is sent to Node.js server cluster for further processing. The analytics data from Node.js server is fetched by grails server using http builder and is used to plot charts and data on dashboard.
//------------- Updating answer for updated question ----------------------
Node.js is server side technology and it doesn't work on front-end i.e. client side
In grails you write all incoming(to server) and outgoing(from server) things in controller.
While all your business logic/computations/DB queries goes into your service methods. Once done send computed data back to controller via return statement and controller will send/show it on GSP.
While regarding your angular JS question I would say you cant replace GSP with angular JS as GSP is nothing but a server side scripting in which you write grails/groovy/java code in script-lets form along with normal HTML code and it gets rendered into full HTML and gets sent onto client side. So you can only enhance its functionality by adding a front end MVC like Angular to it and can't replace it. And functionality wise Angular is superb framework. Add any kind of JS to your GSP's and enjoy them.
P.S. - You'll start loving GSP once you get hang of GSP tags which are so easy to do many things.
To keep the things simple: you can build the whole app-stack using Grails. You can split/unite your services in any appropriate manner. You can build an app with any crazy JS-frontend framework out there, or build an app with a REST API only. Or mix them together.
Moreover, you can easily modularize your app by using plugins. The good thing about them is, they can run standalone, meaning that you can use the service as a part of your app, or run the service outside of the app, it's your decision and not framework limitations!
UPDATE:
Grails has a very important point: Groovy is a JVM language. That means, you can use ANY lava library in the world directly in your project. Also your developers must learn only Groovy, as it used everywhere throughout the application, be it domain-classes, services or GSP.
I am developing my final year project that is mobile based attendance management and tracking system, but I am confused to make GPRS connectivity between j2me mobile application and mysql database.
Check out j2mesamples if it would help in your case.
As far as I know, it's not possible to connect to a mySql database directly. What you'd do instead, is to use a server-side scripting language, like e.g. PHP, to handle communications between your MIDlet and mySql.
You'll then have your MIDlet call PHP scripts like e.g.:
http://www.yoursite.com/insert.php?field1=some_value&field2=some_other_value
The PHP script will then get the values and insert into the database.
I've used this approach a few times for inserting and retrieving highscores for my games.
You need to use drivers in between and make sure you have MySQL Workbench to work on the other side.
I know we cannot access directly to a database with Silverlight. Linq 2 SQL doesn't exist for Silverlight but can I use other things ? I heard too about RIA Services and ADO.net but I don't think they are implemented for a Linux Server.
Thanks for your future answers.
If you can create a REST or SOAP web service that exposes data from the database, then Silverlight can access that service with its networking stack.
You will need to put a few things together.
First if you want to create a Model then you will be looking for an ORM that works itn Postgresql there a probably a few, I stubbled on Storm but there are probably others.
You will then need to expose the model using SOAP again there are a few implementations of SOAP you could use. (In fact at this point I'm going to tweak your tags to target this question better, this not a Linq-To-SQL, c#, or ado.net question).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a server that is running Ubuntu Linux Server Edition. I once had a Windows Server and it is easy to create web services using ASP.net on Windows. Linux on the other hand does support ASP.net using Mono, but is isn't as full featured as Windows. So what would be the best way to create xml web services on a linux server box?
Thanks
A web service can be written in any language. A web service is a program that takes request and returns response (xml or json) via http protocol. You can use a web server like Apache or lighthttpd to handle the http(s) and multithreading for you and write a simple script to do the actual work. The script can be written in anything - php, perl, python, shellscript, cgi c++, free pascal cgi etc.
Of course, You can write everything on your own by using TCP sockets, but this is not your goal I guess.
For FOSS I'd do it in php, because it`s easy:http://davidwalsh.name/web-service-php-mysql-xml-json
If I want it compiled, i'd use FreePascal as in this guide: http://leonardorame.blogspot.com/2010/02/web-20-programming-with-object-pascal.html
Or If I prefer C++, I'd use QTCreator with this guide: http://libqxt.bitbucket.org/doc/tip/tech-web.html
If you want to use ASP.net then use a windows server.
If you have to use Linux for some reason then you need to learn another language to work properly in the linux environment.
Linux web development is actually a world of difference from Windows web development. In leau of the bureaucracy of "applications" and "web services" we have scripts you can invoke via Apache, and if you want to get more advanced, daemons that can handle TCP/IP connections.
If you want to use something specific like SOAP, you should mention it in there, but as far as I know, Linux web development isn't service-based like Windows is.
There are many ways to do this, but given your ASP.NET background why not give the MonoDevelop IDE a go, it has matured a lot and will continue to do so.
Another option is using Eclipse (Java or PHP).
Depends mostly on the web server and web language you run on Linux more than anything else.
If you're using Apache Tomcat, look at Axis2 (http://ws.apache.org/axis2/) and CXF (formerly XFire at http://cxf.apache.org/)
JBoss has web service support built-in (JBossWS) so it's fairly easy to use and since it's a Java EE server, it uses standard web service code that is portable.
You can also write web services using PHP if you use that on your web server.
Apache = IIS
PHP or Java EE or JSP or JSF = ASP.Net
There are a lot more choices in Linux land...
I came across the same problem recently. I wanted a thin layer to turn my SQL database into a webservice with JSON or XML support. All I wanted to do was to have to write the SQL statements... it seemed a pretty reasonable thing to ask.
However, all the options I found involved installing some sort of enterprisy "do everything" solution. So I ended up writing some "glue" which took SQL statements defined in XML "dataset" definitions, and served a simple, RESTful web service.
I documented my approach here:
http://www.nsquared.co.nz/jarvis-docs/jarvis_guide.odt
If you want to use the framework, I can give you a tarball of the latest release. It's used in three or four small applications currently, 2 ExtJS, 1 Flex, and 1 Asp.Net.
There's a plethora of materials available with a simple search for "PHP Web Service" on Google. I'm not really sure what language you're using or what type of service you want to set up so I went with PHP Soap.
http://www.onlamp.com/pub/a/php/2007/07/26/php-web-services.html
There's a lot of industry standard specification and implementation in Java dealing with all aspects of server side web programming.
Start off by an open source implementation such as Apache Tomcat and/or any of http://ws.apache.org/
I guess the best answer depends a bit on what you really need, but one option is to use any of the recent web frameworks, such as Rails, CakePHP, or Django, which allow you to easily define database backed models, and then compose dynamic sites. Turnaround on these frameworks can be measured in minutes for simple sites.
Although it is based on a commercial product the following is an excellent primer to assist you in understanding how you would develop a Java based web service on Linux. If you find a similar tutorial based on free software please share it.
"So what would be the best way to create xml web services on a linux server box?"
A web framework like Turbogears, Django, Grok, Repoze.BFG, WebPy or such.