{"id":19733627,"url":"https://github.com/ruedigermoeller/kontraktor","last_synced_at":"2025-04-04T17:03:40.067Z","repository":{"id":12973408,"uuid":"15652005","full_name":"RuedigerMoeller/kontraktor","owner":"RuedigerMoeller","description":"distributed Actors for Java 8 / JavaScript","archived":false,"fork":false,"pushed_at":"2023-10-04T07:59:43.000Z","size":27804,"stargazers_count":343,"open_issues_count":57,"forks_count":48,"subscribers_count":33,"default_branch":"java14","last_synced_at":"2025-03-28T16:05:19.702Z","etag":null,"topics":["actors","cluster","java","javascript","microservices","polymerjs","react","reactjs","remoting","remoting-service","rmi"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RuedigerMoeller.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-05T14:01:35.000Z","updated_at":"2025-03-18T18:55:14.000Z","dependencies_parsed_at":"2023-10-04T14:11:20.266Z","dependency_job_id":null,"html_url":"https://github.com/RuedigerMoeller/kontraktor","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuedigerMoeller%2Fkontraktor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuedigerMoeller%2Fkontraktor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuedigerMoeller%2Fkontraktor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuedigerMoeller%2Fkontraktor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RuedigerMoeller","download_url":"https://codeload.github.com/RuedigerMoeller/kontraktor/tar.gz/refs/heads/java14","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217174,"owners_count":20903008,"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":["actors","cluster","java","javascript","microservices","polymerjs","react","reactjs","remoting","remoting-service","rmi"],"created_at":"2024-11-12T00:32:26.044Z","updated_at":"2025-04-04T17:03:40.041Z","avatar_url":"https://github.com/RuedigerMoeller.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kontraktor 4\n\n## What is kontraktor ?\n\n* A boilerplate free and consistent abstraction for asynchronous remote communication powered by a **distributed actor-model**\n* One important application of this abstraction are **SPA WebApplications** enabling Java to back modern SPA javascript client frameworks like React.js, Polymer.js, .. (transpilation, packaging, optimization). Different to webpack/browserify etc. kontraktor does this on the fly (when running in prod mode) without an extra build step using pure java. [see IntrinsicReact example](https://github.com/RuedigerMoeller/InstrinsicReactJSX)\n* separates network transport (TCP, WebSockets, Http) and message encoding (fast-serialization, json, ..) from application code. \n* **asynchronous, non-blocking,high performance******\n* production proven\n\n[Documentation](https://github.com/RuedigerMoeller/kontraktor/wiki)\n\n[Code Examples](https://github.com/RuedigerMoeller/kontraktor/tree/trunk/examples), [Related Blogpost's](https://juptr.io/@kontraktor)\n****\n[React Example](https://github.com/RuedigerMoeller/InstrinsicReactJSX)\n\n## What can I use it for ?\n\n* build modern microservice systems (java (JVM), nodejs) beyond the Limits of REST. Asynchronous, event sourced, independent of encoding and network transport (choose from TCP, WebSockets, Http-(Long Poll), json or binary encoding).\n* power modern SPA apps with a java based webserver\n\n**Credits**: kontraktor makes use of many awesome open source libraries such as\n* undertow, (io.undertow) see [undertow.io](undertow.io)\n* jsoup (org.jsoup) - real world html parser\n* httpasyncclient (org.apache.httpcomponents) \n* npm-semver, (com.github.yuchi)\n* fast-classpath-scanner (io.github.lukehutch)\n* org.apache.commons, slf4j-api, minimal-json (com.eclipsesource.minimal-json), junit\n\n\n## Modules\n\nKontraktor consists of several modules. For sake of simplicity all module versions are kept in sync with kontraktor core.\n\n### Kontraktor Core \n\nActors + TCP Remoting\n\n* transform regular java code (satisfying some conventions) into remoteable actors.\n* no boilerplate required\n* TCP remoting included (2 implementations: SyncIO and AsyncIO) \n* general messaging optimizations: batching, binary queues (reduce GC load + save heap by queuing raw bytes instead of object's).\n\n**[Core Documentation](https://github.com/RuedigerMoeller/kontraktor/wiki/Kontraktor-4-Core)** [in progress]\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.ruedigermoeller\u003c/groupId\u003e\n    \u003cartifactId\u003ekontraktor\u003c/artifactId\u003e\n    \u003cversion\u003e4.22\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Kontraktor Http \n\nAdds WebSockets, Http LongPoll for actor-remoting, JavaScript interop. Uses Undertow as underlying webserver\n\n* npm modules to **(a)** implement a kontraktor actor (=service) using nodejs and **(b)** to connect a kontraktor service from nodejs \n* server push via adaptive longpolling (polling automatically turns off if no pending callback / promise is present) \n* support for websockets\n* advanced bundling and inlining of resources (js, css, html) webpack style. Instead of introducing a build step, kontraktor bundles and caches your stuff dynamically upon first request (production mode). \n* session handling fundamentals\n\n**[JavaScript, Http-Documentation](https://github.com/RuedigerMoeller/kontraktor/wiki/Kontraktor-4-Http)** [in progress]\n\n**[Instrinsic React/JSX Documentation](https://github.com/RuedigerMoeller/kontraktor/wiki/Kontraktor-4-React-JSX)** [in progress]\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.ruedigermoeller\u003c/groupId\u003e\n    \u003cartifactId\u003ekontraktor-http\u003c/artifactId\u003e\n    \u003cversion\u003e4.22.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### kontraktor-http 4 javascript nodejs. npm modules\n\n**kontraktor-common**\n\ndefines fundamentals: remote actor refs, en/decoding of Java-serialized objects, KPromise\n\n**kontraktor-client**\n\nCan be used from a browser (attention then: needs to be added using a \u003cscript\u003e tag, not babel/browserify'ish using 'require').\nCan be used from nodejs to connect services/actors implemented in java or javascript\n\n**kontraktor-server**\n\nwrite an ES6 class and make it accessible to other (kontraktor) processes using websockets. Some limitations: no actor proxies, only websockets supported.\n\n**js4k**\n\nold (es5) implementation of kontraktor-client. somewhat messy, but production-proven\n \n**Kontraktor-Bare** \n\n(Minimalistic standalone Http-LongPoll client [legacy apps, Android] ), requires Java 7, Apache 2.0 Licensed\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.ruedigermoeller\u003c/groupId\u003e\n    \u003cartifactId\u003ekontraktor-bare\u003c/artifactId\u003e\n    \u003cversion\u003e4.22\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Examples:\nhttps://github.com/RuedigerMoeller/kontraktor/tree/trunk/examples\n\n### Misc\nOlder Blogposts (samples are of *OLD* 2.0, 3.0 version, might need rewrite/changes (mostly `Future` =\u003e `IPromise`):\n\n* http://java-is-the-new-c.blogspot.de/2015/07/polymer-webcomponents-served-with-java.html\n* [Solving \"Dining Philosophers problem\" with (distributed) actors](http://java-is-the-new-c.blogspot.de/2014/09/breaking-habit-solving-dining.html)\n* [A persistent KeyValue Server in 40 lines and a sad fact](http://java-is-the-new-c.blogspot.de/2014/12/a-persistent-keyvalue-server-in-40.html)\n* [Alternatives to Executors when scheduling Tasks/Actors](http://java-is-the-new-c.blogspot.de/2014/10/alternatives-to-executors-when.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruedigermoeller%2Fkontraktor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruedigermoeller%2Fkontraktor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruedigermoeller%2Fkontraktor/lists"}