{"id":13481378,"url":"https://github.com/laserdisc-io/laserdisc","last_synced_at":"2025-04-05T03:10:32.269Z","repository":{"id":32659958,"uuid":"136150585","full_name":"laserdisc-io/laserdisc","owner":"laserdisc-io","description":"A Future-free Fs2 native pure FP Redis client","archived":false,"fork":false,"pushed_at":"2025-03-18T13:58:21.000Z","size":1271,"stargazers_count":95,"open_issues_count":15,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T02:07:05.290Z","etag":null,"topics":["fp","fs2","functional-programming","mtl","redis","redis-client","scala"],"latest_commit_sha":null,"homepage":"http://laserdisc.io","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laserdisc-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-05T09:07:12.000Z","updated_at":"2025-03-18T13:58:25.000Z","dependencies_parsed_at":"2023-11-08T06:46:24.096Z","dependency_job_id":"afe60bdb-61f3-4a51-a4f3-310a4fa8454b","html_url":"https://github.com/laserdisc-io/laserdisc","commit_stats":{"total_commits":739,"total_committers":9,"mean_commits":82.11111111111111,"dds":0.2368064952638701,"last_synced_commit":"74e9c6c6d367df6480bfba5f39885229e3312eab"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserdisc-io%2Flaserdisc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserdisc-io%2Flaserdisc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserdisc-io%2Flaserdisc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserdisc-io%2Flaserdisc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laserdisc-io","download_url":"https://codeload.github.com/laserdisc-io/laserdisc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fp","fs2","functional-programming","mtl","redis","redis-client","scala"],"created_at":"2024-07-31T17:00:51.339Z","updated_at":"2025-04-05T03:10:32.232Z","avatar_url":"https://github.com/laserdisc-io.png","language":"Scala","readme":"## LaserDisc\n\n[![Continuous Integration](https://github.com/laserdisc-io/laserdisc/actions/workflows/ci.yml/badge.svg)](https://github.com/laserdisc-io/laserdisc/actions/workflows/ci.yml)\n[![Known Vulnerabilities](https://snyk.io/test/github/laserdisc-io/laserdisc/badge.svg?targetFile=build.sbt)](https://snyk.io/test/github/laserdisc-io/laserdisc?targetFile=build.sbt)\n[![Join the chat at https://gitter.im/laserdisc-io/laserdisc](https://badges.gitter.im/laserdisc-io/laserdisc.svg)](https://gitter.im/laserdisc-io/laserdisc?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n\n[![laserdisc-core Scala version support](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-core/latest-by-scala-version.svg?targetType=Js)](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-core)\n\n\nLaserDisc is a(nother) Scala driver for [Redis](https://redis.io/), written in Scala from the ground up.\n\nIt differentiates itself from the others for having a core layer, which is made up of all the supported Redis commands\nand the Redis Serialization Protocol ([RESP](https://redis.io/topics/protocol)), that is strongly typed and which makes\nheavy use of [shapeless](https://github.com/milessabin/shapeless) and [refined](https://github.com/fthomas/refined) to\nachieve this. It also provides an implementation of RESP built using [scodec](http://scodec.org/).\n\nOn top of this, one or more clients can be implemented. The only one currently available out of the box is built using\n[fs2](https://functional-streams-for-scala.github.io/fs2/)/[cats effect](https://typelevel.org/cats-effect/) but\nmore competing implementations can be added with limited effort. This implementation has found great inspiration from\nthe excellent [fs2-kafka](https://github.com/Spinoco/fs2-kafka/) library.\n\nWhat's there:\n- [x] Codecs for Redis' RESP wire format\n- [x] Fully-fledged protocol encapsulating request/response pairs for (almost) all Redis [commands](https://redis.io/commands)\n- [x] Initial version of single-node Redis client. Lots of improvements needed\n- [x] Minimal CLI\n\nWhat's missing:\n- [ ] Everything else :)\n\n**Note:** the library is still evolving and more features will be added in the future. Even if the binary compatibility will not be guaranteed until version 1.0.0, the [semantic versioning](https://semver.org/) strategy will be observed in the process.\n\n### Why the name\n\nTwo reasons:\n1. \"A LaserDisc\" is an anagram for \"Scala Redis\"\n2. LaserDiscs were invented in 1978 (same year I was born) and were so cool (and foundational, more on [Wikipedia](https://en.wikipedia.org/wiki/LaserDisc))\n\n### Getting Started\n\nLaserDisc is currently available for Scala 2.12 and 2.13 on the JVM.\n\nIts core (protocol commands and RESP wire format) is also available for [Scala.JS](http://www.scala-js.org/).\n\nTo add LaserDisc as a dependency to your project just add the following to your `build.sbt`:\n```\nlibraryDependencies += \"io.laserdisc\" %% \"laserdisc-fs2\" % latestVersion\n```\n\nIf you only need protocols (i.e. Redis commands and RESP wire format), you may simply add:\n```\nlibraryDependencies += \"io.laserdisc\" %% \"laserdisc-core\" % latestVersion\n```\n\n### Interoperability modules\n\nSupport for existing libraries is available via dedicated dependencies.\n\n#### [Circe](https://circe.github.io/circe/)\n\nWhen an `io.circe.Decoder[A]` and a `io.circe.Encoder[A]` are implicilty available,\ninstances of `Show[A]` and `Read[Bulk, A]` can be derived for free,\njust add the following in your `build.sbt`:\n\n```\nlibraryDependecies += \"io.laserdisc\" %% \"laserdisc-circe\" % latestVersion \n```\n\nthen, to make use of them, at call site it should be sufficient to just:\n\n```scala\nimport laserdisc.interop.circe._\n```\n\n*Note*: the derived `Show[A]` instance uses the most compact string representation\nof the JSON data structure, i.e. no spacing is used\n\n### Example usage\nWith a running Redis instance on `localhost:6379` try running the following:\n```scala\nimport cats.effect.{IO, IOApp}\nimport log.effect.LogWriter\nimport log.effect.fs2.SyncLogWriter\nimport cats.syntax.flatMap._\n\nobject Main extends IOApp.Simple {\n\n  import laserdisc._\n  import laserdisc.all._\n  import laserdisc.auto._\n  import laserdisc.fs2._\n\n  def redisTest(implicit log: LogWriter[IO]): IO[Unit] =\n    RedisClient[IO].to(\"localhost\", 6379).use { client =\u003e\n      client.send(\n        set(\"a\", 23),\n        set(\"b\", 55),\n        get[PosInt](\"b\"),\n        get[PosInt](\"a\")\n      ) \u003e\u003e= {\n        case (Right(OK), Right(OK), Right(Some(getOfb)), Right(Some(getOfa))) if getOfb.value == 55 \u0026\u0026 getOfa.value == 23 =\u003e\n          log info \"yay!\"\n        case other =\u003e\n          log.error(s\"something went terribly wrong $other\") \u003e\u003e\n            IO.raiseError(new RuntimeException(\"boom\"))\n      }\n    }\n\n  override final def run: IO[Unit] =\n    redisTest(SyncLogWriter.consoleLog[IO])\n}\n```\n\nThis should produce an output similar to the following one:\n```\n[debug] - [io-compute-3] Starting connection\n[info] - [io-compute-4] Connected to server localhost:6379\n[trace] - [io-compute-4] sending Arr(Bulk(SET),Bulk(a),Bulk(23))\n[trace] - [io-compute-3] receiving Str(OK)\n[trace] - [io-compute-1] sending Arr(Bulk(SET),Bulk(b),Bulk(55))\n[trace] - [io-compute-4] receiving Str(OK)\n[trace] - [io-compute-0] sending Arr(Bulk(GET),Bulk(b))\n[trace] - [io-compute-5] receiving Bulk(55)\n[trace] - [io-compute-0] sending Arr(Bulk(GET),Bulk(a))\n[trace] - [io-compute-0] receiving Bulk(23)\n[info] - [io-compute-5] yay!\n[debug] - [io-compute-5] Shutting down connection\n[debug] - [io-compute-5] Shutdown complete\n[info] - [io-compute-0] Connection terminated: No issues\n```\n\n## Dependencies\n\n|      | Shapeless |\n| ----:| ---------:|\n| [![Maven Central](https://img.shields.io/maven-central/v/io.laserdisc/laserdisc-core_2.13.svg?label=laserdisc%20core\u0026colorB=orange)](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-core) | 2.3.10 |\n\n\u003cbr\u003e\n\n|      | Fs2 | Log Effect | Laserdisc Core |\n| ----:| ---:| ----------:| --------------:|\n| [![Maven Central](https://img.shields.io/maven-central/v/io.laserdisc/laserdisc-fs2_2.13.svg?label=laserdisc%20fs2\u0026colorB=blue)](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-fs2) | 3.4.0 | 0.16.3 | [![Maven Central](https://img.shields.io/maven-central/v/io.laserdisc/laserdisc-core_2.13.svg?label=%20\u0026colorB=orange)](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-core) |\n\n\u003cbr\u003e\n\n|      | Circe | Laserdisc Core |\n| ----:| -----:| --------------:|\n| [![Maven Central](https://img.shields.io/maven-central/v/io.laserdisc/laserdisc-circe_2.13.svg?label=laserdisc%20circe\u0026colorB=darkgreen)](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-circe) | 0.14.3 | [![Maven Central](https://img.shields.io/maven-central/v/io.laserdisc/laserdisc-core_2.13.svg?label=%20\u0026colorB=orange)](https://index.scala-lang.org/laserdisc-io/laserdisc/laserdisc-core) |\n\n## Support\n\n![YourKit Image](https://www.yourkit.com/images/yklogo.png \"YourKit\")\n\nThis project is supported by YourKit with monitoring and profiling Tools. YourKit supports open source with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).\n\n## License\n\nLaserDisc is licensed under the **[MIT License](LICENSE)** (the \"License\"); you may not use this software except in\ncompliance with the License.\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations under the License.\n","funding_links":[],"categories":["Database","Table of Contents"],"sub_categories":["Database"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaserdisc-io%2Flaserdisc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaserdisc-io%2Flaserdisc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaserdisc-io%2Flaserdisc/lists"}