{"id":16119394,"url":"https://github.com/codingchili/chili-core","last_synced_at":"2025-03-17T18:30:45.276Z","repository":{"id":47463733,"uuid":"55707212","full_name":"codingchili/chili-core","owner":"codingchili","description":"Reactive framework for creating transport \u0026 storage-transparent microservices with Vert.x","archived":false,"fork":false,"pushed_at":"2024-02-10T19:09:48.000Z","size":164103,"stargazers_count":14,"open_issues_count":11,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-28T03:22:50.387Z","etag":null,"topics":["cqengine","elasticsearch","framework","hazelcast","java","microservice","mongodb","reactive","vertx"],"latest_commit_sha":null,"homepage":"https://codingchili.github.io/chili-core/","language":"Java","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/codingchili.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-07T15:44:00.000Z","updated_at":"2023-12-17T18:07:48.000Z","dependencies_parsed_at":"2024-02-10T19:47:55.320Z","dependency_job_id":null,"html_url":"https://github.com/codingchili/chili-core","commit_stats":null,"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fchili-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fchili-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fchili-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fchili-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingchili","download_url":"https://codeload.github.com/codingchili/chili-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878439,"owners_count":20362432,"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":["cqengine","elasticsearch","framework","hazelcast","java","microservice","mongodb","reactive","vertx"],"created_at":"2024-10-09T20:54:02.132Z","updated_at":"2025-03-17T18:30:44.692Z","avatar_url":"https://github.com/codingchili.png","language":"Java","readme":"# chili-core [![Build Status](https://travis-ci.com/codingchili/chili-core.svg?branch=master)](https://travis-ci.com/codingchili/chili-core) [![](https://jitpack.io/v/codingchili/chili-core.svg)](https://jitpack.io/#codingchili/chili-core)\r\n\r\nThe chili core is an opinionated framework for creating microservices with focus on speed of development and time to market. \r\nIt's based on the Vert.x toolkit for maximum power and uses Hazelcast for plug-and-play clustering. This project is small with only 22k LOC.\r\n\r\nFind the official documentation [here](https://codingchili.github.io/chili-core/).\r\n\r\n## Quickstart\r\n\r\nUsing gradle\r\n```groovy\r\nrepositories {\r\n    maven { url 'https://jitpack.io' }\r\n}\r\n\r\ndependencies {\r\n    compile \"com.github.codingchili.chili-core:core:\u003cversion\u003e\"\r\n}\r\n```\r\n\r\nCreating a new handler\r\n\r\n```java\r\n@Role(PUBLIC)\r\n@Address(\"api\")\r\npublic class MyHandler implements CoreHandler {\r\n    private Protocol\u003cRequest\u003e protocol = new Protocol\u003c\u003e(this);\r\n    \r\n    @Api\r\n    public void list(Request request) {\r\n        request.write(new ArrayList\u003c\u003e(Arrays.asList(\"hello\", \"world\")));\r\n    } \r\n    \r\n    @Override\r\n    public void handle(Request request) {\r\n        protocol.process(request);\r\n    }\r\n    \r\n}\r\n```\r\n\r\nDeploying a handler with the REST listener on port 8080 (default).\r\n\r\n```java\r\npublic static void main(String[] args) {\r\n    ListenerSettings settings = new ListenerSettings()\r\n            .setPort(8080)\r\n            .setSecure(false);\r\n\r\n    CoreContext core = new SystemContext();\r\n\r\n    core.listener(() -\u003e new RestListener()\r\n            .settings(settings)\r\n            .handler(new MyHandler()));\r\n}\r\n```\r\n\r\nStart it up and check the service with\r\n\r\n```console\r\ncurl -v http://localhost:8080/api/list\r\n```\r\n\r\n## Building\r\nTo build chili-core clone this repository with **git**,\r\n\r\n```console\r\ngit clone https://github.com/codingchili/chili-core.git\r\n```\r\n\r\nBuilds project jars and run tests\r\n\r\n```console\r\ngradlew build\r\n```\r\n\r\nNote: when targeting java 9+ the following hacks are needed for Netty/Vert.x\r\n\r\n```console\r\n--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.net.dns=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED\r\n```\r\n\r\n\r\n## Background \r\nThe purpose of wrapping vertx in a framework is to increase productivity. This is done by providing common \r\nfunctionality that can be used to build microservices on as a framework. With all the logic packed into core, it is \r\npossible to create distributed microservices capable of handling authentication, request routing and storage \r\nin 66 lines of code. If you are interested in vertx, I recommend using it directly instead. \r\nThis framework is intended to improve productivity for a single developer, aka the author. \r\nIn order to achieve this it is much more invasive than the vertx toolkit.\r\n\r\n###### Summary\r\n* Built on the high-performance reactive toolkit vertx\r\n* Uses clustering to improve scalability\r\n* Support for a variety of storage options, query API's and a DSL.\r\n* A distributed logging system and logging aggregator\r\n* Highly adaptable and flexible with a configuration system\r\n* High availability with support for multiple transports\r\n* Text based protocols with JSON\r\n* Adopts the microservice pattern\r\n\r\n## Features\r\nThe complete feature list may change during development. \r\n\r\n##### Core\r\n* Transport \u0026 storage independent implementations\r\n* Logging system for data analysis and real time monitoring\r\n* Authentication based on signed tokens.\r\n* A router for routing external connections into the clustered event bus.\r\n* Statistics API that builds on top of the logging system\r\n* Interchangeable storage options with indexing and query support\r\n\r\n##### Audience\r\n- Programmers seeking to create microservices productively in a very specific use case.\r\n- Game, web-app or mobile-app developers with an interest in backend development.\r\n\r\n## Makes use of\r\nThe core uses some great software, such as\r\n\r\n* [eclipse/vert.x](https://github.com/eclipse/vert.x) - reactive: eventbus, clustering and networking\r\n* [EsotericSoftware/kryo](https://github.com/EsotericSoftware/kryo) - serialization library\r\n\r\nOptional dependencies\r\n\r\n* [hazelcast/hazelcast](https://github.com/hazelcast/hazelcast) - cluster management, data store\r\n* [npgall/cqengine](https://github.com/npgall/cqengine) - in-vm indexed collections with query support\r\n* [elastic/elasticsearch](https://github.com/elastic/elasticsearch) - distributed data indexing\r\n* [mongodb/mongo](https://github.com/mongodb/mongo) - document database\r\n\r\nRead the documentation to learn more about optional dependencies.\r\n\r\nApplications currently using chili-core\r\n\r\n|application|description|\r\n|---|---|\r\n|[mutable-bunnies](https://github.com/codingchili/mutable-bunnies-server)|2D MMORPG game in development.|\r\n|[zapperfly-asm](https://github.com/codingchili/zapperfly-asm)|Extra simple clustered build servers.|\r\n|[ethereum-ingest](https://github.com/codingchili/ethereum-ingest)|Ethereum block/transaction import utility.|\r\n|[flashcards](https://github.com/codingchili/flashcards-webapp)|Progressive web app for studying  with flashcards.|\r\n\r\n## Contributing\r\nIssues and PR's are welcome with :blue_heart:.\r\n\r\n## License\r\nThe MIT License (MIT)\r\nCopyright (c) 2019 Robin Duda\r\n\r\nSee: [License](./LICENSE.md)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingchili%2Fchili-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingchili%2Fchili-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingchili%2Fchili-core/lists"}