GithubHelp home page GithubHelp logo

memcontinuationed's Issues

Value size limited to 32768

Value sizes are limited in the AsciiProtocol are limited to 32768

private final val MaxValueSize = 32768

However, by default values can be up to 1MB and with tuning values can be even larger. When the user attempts to write a larger value it works fine, but when they read that larger value they simply get a mysterious error such as:

SEVERE: com.dongxiguo.memcontinuationed.ProtocolException: Bad line VALUE raw:6TSa2041BHDwSWYtJA0+dmZvRNg= 0 168508

Exception in continuation

Hi,
If i send much conccurent requests to my application, I have an exception :
2013-08-08 17-40-19 C:\Users\atry\Documents\lalala\game\race-for-the-woolen\commons-continuations\src\main\scala\com\dongxiguo\commons\continuations\io\AsynchronousInputStream.scala:45 completed
SEVERE: Exception is thrown in continuation when handling a completed asynchronous reading. java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)

I use linux system and not windows

Auth Support

It seems like authenticated MemCache isn't currently supported. It would be great to have this. Thanks!

Build Instructions

I think the dependency part of the README can be simplified to:

libraryDependencies <++= scalaBinaryVersion {
  case "2.10" =>
    Seq()
  case _ =>
    Seq("org.scala-lang.plugins" %% "scala-continuations-library" % "1.0.1")
}

Implement Binary protocol

The binary protocol is proported to be faster, but memcontinuationed currently only uses the ASCII protocol.

Problem with subtype

I wish get key in memcache and if not found then add data in memcache and return data.

def getOrData[T](key: String, duration: Int = 10)(data: => T): Future[T] = {
reset {
memcached.get(Key(key)).get(Key(key)) match {
case None => {
memcached.add[Array[Byte]](Key%28key%29, Serialize.serialize%28data%29, Exptime.fromNowOn%28duration%29)
Future(data)
}
case Some(result) => {
Future(Serialize.unserializeT)
}
case _ =>
}
}
}

I don't have any problem with serialize and un unserialize method, this method take an Array of Byte and return T object.

But I have errors with my implementation :
scala.util.continuations.cpsParam[Unit,Unit] is not a subtype of scala.util.continuations.cpsParam[?,scala.concurrent.Future[T]]
[error] case None => {

illegal answer type modification: scala.util.continuations.cpsParam[Unit,Unit] andThen scala.util.continuations.cpsParam[?,scala.concurrent.Future[T]]
[error] memcached.get(Key(key)).get(Key(key)) match {

NoClassDefFoundError

if I add addCompilerPlugin("org.scala-lang.plugins" % "continuations" % "2.10.2") in my build.scala, I have this error :
java.lang.NoClassDefFoundError: scala/reflect/internal/AnnotationCheckers$AnnotationChecker
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
...
Caused by: java.lang.ClassNotFoundException: scala.reflect.internal.AnnotationCheckers$AnnotationChecker
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
...
error java.lang.reflect.InvocationTargetException

But if I change the version of this plugin to 2.9.2, I don't have this error but I have some errors in my code because not found method require, add get etc (probably because scala 2.9.2)

Application has build with sbt 1.12.4 and scala 2.10.2

Unresolved dependencies

I'm trying to clone memcontinuationed and then run it in sbt. I get the following unresolved dependencies that prevent it from running:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.dongxiguo.zero-log#context_2.9.2;0.3.3: not found
[warn] :: com.dongxiguo#zero-log_2.9.2;0.3.3: not found
[warn] :: com.dongxiguo#commons-continuations_2.9.2;0.2.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
error sbt.ResolveException: unresolved dependency: com.dongxiguo.zero-log#context_2.9.2;0.3.3: not found
[error] unresolved dependency: com.dongxiguo#zero-log_2.9.2;0.3.3: not found
[error] unresolved dependency: com.dongxiguo#commons-continuations_2.9.2;0.2.1: not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.