play framework 2.0 support memcached? - memcached

I read Play Framework 2.0 document,I don't any word about memcached.How can I use memcached in Play Framework 2.0? why disappear in 2.0, in 1.x ,it is so easy!!!

As already pointed out in the comments, the default implementation of the Cache API uses Ehcache. If you want to use memcached, you coult write your own Cache implementation, or you could use this one.

Related

How exchange json between Unity and .Net Core 3.1?

Hello i am developing a Unity application that will use a .NET Core 3.1 API .I have my models in a separate .net standard 2.0 dll .I would have chosen 2.1 to use the JsonSerializer class but it is not supported by Unity yet.
My question is:
How does one serialize and deserializes data between the two applications.
If i Serialize using the Newtonsoft.Json how would that go on the other end while deserializing with the JsonUtility.FromJson<T> ?
Is there a conversion available between the two ?
Is there a conversion between Unity and JsonSerializer?
Is there any way i could share a .Net Standard 2.1 dll between the two ?
First, System.Text.Json isn't dependent on .NET Standard 2.1, only 2.0. As such, you can simply add the NuGet to your .NET Standard 2.0 class library. Additionally, while it's preferred to use System.Text.Json, you can still opt to continue to use Newtonsoft.Json if you prefer in ASP.NET Core 3.1+.
Second, the end result of either library is just JSON, so either library can read what the other library created. The only potential difference would be in how they might serialize, i.e. camel-case vs. pascal-case, custom value converters, etc. However, all of that is configurable in both libraries, so you just need to ensure that the way one is serializing is also the way the other is deserializing.

Play Framework 2.3 OAUTH 2 Java Provider

I know that it might be an old question, But I didn't find a solution for it. I need an Oauth2 Provider (not client) to secure my APIs that works on play framework java (not scala). I think this is important, any one reached for a solution for that.
The master branch of securesocial have support for play 2.3. Here is the project website: http://securesocial.ws/ . There isn't a stable version right now.

Firebase and Play Framework (Scala) is it possible?

Hey I love Play Framework Scala and I also am falling in love with Firebase. I was wondering though, I'm planning on building an app using AngularFire and I'm going to need to do some server-side logic/computation and make some server-side queries to Firebase. Is this possible to do with a Play Framework Scala setup? If so what is the recommended approach? If not, is it coming? If so when? I think it's so cool that the Firebase guys used Scala to build Firebase, but I'm bummed there is no Scala API to work with (that I can see). Maybe I could use the Java API somehow, but write still write the app in Scala? Any help would be great. Thanks!
Scala is highly interoperable with Java (compiles to the same bytecode) so you should be able to use the Java API straight-up without any issues.
While some libraries add Scala-specific wrappers to make an API more idiomatic and pleasant for a functional programming style and to smooth some rough edges, it's often not strictly necessary.
If for some reason you didn't want to use the Java client libs, you could also interface with the Firebase REST API via Play 2's very convenience and succinct web services library.
Should be no problem with either their Java SDK (when using Firebase on the backend) or the JavaScript SDK (when using it on the client). But you won't have native support for Scala or Play, especially no support for Iteratee/Enumeratee in Play.
The Java API looks quite good and seems to be event driven. So it should be no problem to integrate it in Play in a scalable way.

play framework atmosphere

There is a list of usable frameworks in the creators blog of Atmosphere. I want to use scala and the Play Framework included with Atmosphere. In the blog he writes that Atmosphere works with "every" framework. Could it be that easy to integrate Atmosphere, and how?
I understand that this isn't necessarily the answer you were looking for, but I would suggest you look at Play's native comet support.
http://www.playframework.org/documentation/2.0/ScalaComet
http://www.playframework.org/documentation/api/2.0/scala/play/api/libs/Comet$.html
Do you have a particular use case that Atmosphere can solve more elegantly? If so, here's a thread that might help.
https://groups.google.com/forum/m/?fromgroups#!topic/atmosphere-framework/GM6fC6-eSLE
Yes, take a look at this project - it's a native implementation of Atmosphere running on top of Play!
I'm looking for this too. The benefits it would give are graceful degradation from websocket to long polling and a common api for these both client and server side.

Should I use MongoDb module or morphia module or Casbah in play framework for MongoDb?

I am working on a play framework project with scala in which I want to have Scala domain classes (or even Java domain classes) using MongoDb as data store.
I want maximum performance while serving hundreds of thousands if not millions of requests per day.
Since both scala language and Play framework is adding new features by the month, what is the best answer in terms of latest production version of the modules mentioned in the question
and play framework 1.2.2, scala 0.9.1+ and scala language 2.8+?
for anyone stumbling upon this question and using playframwork 2.1.x or above I highly recommend taking a look at reactivemongo site and github project.
It's a mongodb scala driver that allows asynchronous db operations.
Great performance and mature enough for use in production.
At the time of writing this the current version is 0.9 and is being used by us in production without any problems.
I use Morphia module, a MongoDB integration for Play! 1.2.x
For scala I would suggest you have a look at https://github.com/novus/salat
I've written a play plugin for salat which you can find here https://github.com/leon/play-salat
Good luck!