Has anyone tried to integrate Lucene and MySQL with Play Framework through Scala?
The challenge i am finding is how to keep the lucene index in synch with the DB. This is possible using Hibernate Search, but that's not possible/advised when using Play-Scala.
Any guidance/advice is highly appreciated.
Thanks
Related
I have a spring project configured to use MySql database. Is is possible to implement elasticsearch for some search queries? Does anyone has a relevant experience or can point me to a good article?
You can easily use Spring Data for Elasticsearch without having much Elasticsearch knowledge. Take a look at the toy project here.
Spring Data will help you on doing CRUD operations with an ORM approach.
I was working on Web development project using Java, Scala, JPA, Ajax, HTML, CSS, Javascript etc. But now due to some problems like 'lack of resource persons on Play framework in my team' we have decided to move to the Spring/Hibernate framework. So we need to convert the complete project in Spring/Hibernate framework. So what are all the considerations to be taken care while doing the same? Whether to use Hibernate annotations or do we need to proceed only with hbm and xml files? We are using MySQL as a database.
It's very general question. So the answer could be as well.
If you want to move from Play to Spring, then you want to leave scala as well. You wrote that you have scala in your current project. Then .... You will need completely rewrite your that part.
You use play and MySQL and want to move to the Hibernate. Then be sure that you use in the Play JPA for the access to the Database (or you can even use Hibernate if you want). After this migration to Hibernate in Spring would be easy.
In general ... It could be more easy just write a new project on Spring based on the current business cases.
I am new to .net and the only experience I have is with an MVC3 Entity Framework Code First project. I need to write a new web app that will query an existing legacy database. I have read only access to this MYSQL database. Most tables have no primary keys. I can connect to the DB okay. When trying to wire things up with EF and pull some data , I get errors that the the tables have no primary keys. Researching this issue on the web has brought me to the conclusion that I probably cannot use EF in this case. Given my limited experience, what would be my next best course of action? Any assistance would be appreciated.
Kindest Regards.
You could use ADO.NET, which is built into the .NET framework. It will mean that you will have to write SQL code to interact with the database.
To get ADO.NET to work with MySQL, you'll need the MySQL ADO.NET connector. More documentation on ADO.NET can be found on MSDN.
Given the read only access to a DB without primary keys, Entity Framework won't help you. I haven't tried it by myself, but I suggest you try using XSD files to create tableadapters and tables for your mysql pendants. But even if this works, without keys you won't be able to add any associations.
i was asked to do a book manager at university with hibernate and mysql. I have a simple question. If i choose to do a web application, grails already uses hibernate. GORM runns over hibernate. so to use mysql i only need to configure jdbc grails drivers and that's it?
i mean, "for the project you must use hibernate and mysql" - this are the requirements. So can i do that way?
thanks in advance,
JM
Yes, of course you can.
You'll need to get the MySQL JDBC driver from this location.
Grails? When you're new to programming? Whose idea was this?
Personally, I think that taking on all these unknowns is risky for someone who's "new to programming." Do you know anything about SQL or JDBC? Have you ever written a web project before? This could be difficult.
I don't know how to be more specific. Download the JDBC JAR from the link I gave you.
I'd recommend that you start with a JDBC tutorial first. Hibernate is not for you - yet.
Hibernate is an object-relational mapping tool (ORM). It's a technology that lets you associate information in relational database tables to objects in your middle tier. So if you have a PERSON table with columns id, first, and last Hibernate will let you associate those data with the private data members in your Person Java class.
That sounds easy, but it gets complicated quickly. Your relational and object models might have one-to-many and many-to-many relationships; Hibernate can help with those. Lazy loading, caching, etc. can be managed by Hibernate.
But it comes at a cost. And it can be difficult if you aren't familiar with it.
If you have a deadline, I'd recommend creating a Java POJO interface for your persistence classes and doing the first implementation using JDBC. If you want to swap it out for Hibernate later on you can do it without affecting clients, but you'll have a chance of making progress without Hibernate that way.
I'm working on integrating Memcached (using the Enyim Memcached library for .NET) in my application and would like to cache data at every layer (data, business, app). I'm using LINQ to SQL for the data access layer. In trying to cache LINQ entites I ran into a problem in that Enyim uses the Binary formatter for serialization, which is the wrong serializer for LINQ objects (should be DataContractSerializer).
Anyone have experience with this scenario that can offer suggestions? Any advice is insight or advice is most appreciated!
I think you'll find this answer helpful... in my case I went the ProtoBuf route and it works great: Is there anyway to serilize linq object for Memcached?