{"id":18350307,"url":"https://github.com/ollls/zio-tls-http","last_synced_at":"2025-04-06T10:32:12.069Z","repository":{"id":52923510,"uuid":"314093078","full_name":"ollls/zio-tls-http","owner":"ollls","description":"100% non-blocking, Java NIO only( inspired by zio-nio) , JSON HTTP server based on Scala ZIO library. Everything including TLS encryption modeled as ZIO effects, convenient route DSL similar to https4s, up to 30K TPS local JSON transaction with 25 threads on 6 cores(i7) with ZIO fibers.","archived":false,"fork":false,"pushed_at":"2023-12-21T20:51:21.000Z","size":2251,"stargazers_count":84,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master_zio2","last_synced_at":"2025-03-21T21:51:11.829Z","etag":null,"topics":["cache","connection-pool","greenthread","http-client","http-server","java-nio","json","ldap","scala","tls","web","web-cache","web-filter","zio","zio-effects","zio-env","zio-environment","zio-fibers","zio-layers","zlayer"],"latest_commit_sha":null,"homepage":"","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/ollls.png","metadata":{"files":{"readme":"README.md","changelog":"history.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-19T00:28:00.000Z","updated_at":"2024-08-12T20:07:46.000Z","dependencies_parsed_at":"2023-12-21T21:47:46.636Z","dependency_job_id":null,"html_url":"https://github.com/ollls/zio-tls-http","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fzio-tls-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fzio-tls-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fzio-tls-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollls%2Fzio-tls-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollls","download_url":"https://codeload.github.com/ollls/zio-tls-http/tar.gz/refs/heads/master_zio2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470240,"owners_count":20944143,"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":["cache","connection-pool","greenthread","http-client","http-server","java-nio","json","ldap","scala","tls","web","web-cache","web-filter","zio","zio-effects","zio-env","zio-environment","zio-fibers","zio-layers","zlayer"],"created_at":"2024-11-05T21:26:03.542Z","updated_at":"2025-04-06T10:32:11.591Z","avatar_url":"https://github.com/ollls.png","language":"Scala","funding_links":[],"categories":["网络编程"],"sub_categories":["Spring Cloud框架"],"readme":"\n\n[![Generic badge](https://img.shields.io/badge/release-2.0.1-blue)](https://repo1.maven.org/maven2/io/github/ollls/zio-tls-http_3/2.0.1/)\n[![Generic badge](https://img.shields.io/badge/Nexus-v1.2--m3-yellow.svg)](https://repo1.maven.org/maven2/io/github/ollls/zio-tls-http_2.13/1.2-m3/)\n[![Generic badge](https://img.shields.io/badge/Nexus-v1.1.0--m8-blue.svg)](https://repo1.maven.org/maven2/io/github/ollls/zio-tls-http_2.13/1.1.0-m8)\n\u003cbr\u003e\n[![Generic badge](https://img.shields.io/badge/Hello%20World-template-red)](https://github.com/ollls/hello-http)\n\n\n# Lightweight Scala TLS HTTP 1.1 Web Server based on ZIO async fibers and Java NIO sockets.\nWeb Server has its own implementation of TLS protocol layer based on JAVA NIO and standard JDK SSLEngine. Everything is modeled as ZIO effects and processed as async routines with Java NIO. Java NIO and Application ZIO space uses same thread pool for non-blocking operations.\nServer implements a DSL for route matching, it's very similar (but a bit simplified) to the one which is used in HTTP4s. Server implements pluggable pre-filters and post-filters. The goal is to provide small and simple HTTP JSON server with all the benefits of async monadic non-blocking JAVA NIO calls wrapped up into ZIO interpreter with minimal number of dependencies.\n\n\n\u003e**Our new HTTP/2 server can talk HTTP/1.1 now!\u003cbr\u003e Please, check it out. Simplified, streamlined, massivley parallel with nothing but ZIO Streams and HTTP/2, for client and server.\nHTTP/2 client available as ZIO Service.\u003cbr\u003e https://github.com/ollls/zio-quartz-h2**\n\n\n# ZIO2 release.\nNecessary dependencies(check hello-http template):\n```scala\n   \"dev.zio\" %% \"zio\" % \"2.0.x\",\n   \"io.github.ollls\" %% \"zio-tls-http\" % \"2.0.0\",\n```\n\n* Native ZStream2 with ZIO2.\n* Integration with http1.1 chunked.\n* Special http multi-part ZStream.\n* Support for ZIO2 logging with logback.\n* Separate http access log with rotation.\n* App template: \"hello-http\" with major use cases.\n* Version of ZIO library can be configured in build.sbt on app template by the user.\n\nAppreciate any feedback, please use, my email or open issue, or use \nhttps://discord.com/channels/629491597070827530/817042692554489886   ( #zio-tls-http ) \n\u003cbr\u003e\n\n\u003e **Also: Please check out** https://github.com/ollls/quartz-h2  https://github.com/ollls/zio-quartz-h2\n\nTo run from sbt:  \"sbt example/run\". \u003cbr\u003e\nExample file: https://github.com/ollls/zio-tls-http/blob/master_zio2/examples/start/src/main/scala/MyServer.scala\n\n```scala\npackage example\nimport zio.logging.backend.SLF4J\nimport zio.{ZIO, Chunk}\nimport zhttp.Method._\nimport zhttp.dsl._\nimport zhttp.{TLSServer, TcpServer, HttpRoutes}\nimport zhttp.{MultiPart, Headers, ContentType, Response, FileUtils}\n\nobject MyApp extends zio.ZIOAppDefault {\n\n  override val bootstrap =\n    zio.Runtime.removeDefaultLoggers ++ SLF4J.slf4j ++ zio.Runtime.enableWorkStealing\n    \n  val r = HttpRoutes.of { case GET -\u003e Root / \"health\" =\u003e\n    ZIO.attempt(Response.Ok().asTextBody(\"Health Check Ok\"))\n  }\n  val myHttp =\n    new TcpServer[Any](port = 8080, keepAlive = 2000, serverIP = \"0.0.0.0\")\n  val run = myHttp.run(r)\n}\n\n```\nTo enable more detailed logging, use logback-test.xml with \"debug\" or \"trace\" levels\n\n```xml\n  \u003croot level=\"debug\"\u003e\n    \u003cappender-ref ref=\"STDOUT\" /\u003e\n  \u003c/root\u003e\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follls%2Fzio-tls-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follls%2Fzio-tls-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follls%2Fzio-tls-http/lists"}