{"id":18480592,"url":"https://github.com/jloisel/reactive-couchbase","last_synced_at":"2025-07-28T14:32:25.838Z","repository":{"id":27408201,"uuid":"30885057","full_name":"jloisel/reactive-couchbase","owner":"jloisel","description":"Observable Couchbase Repository","archived":false,"fork":false,"pushed_at":"2015-02-17T07:32:28.000Z","size":184,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T16:39:10.626Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jloisel.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}},"created_at":"2015-02-16T19:47:23.000Z","updated_at":"2021-02-02T08:53:23.000Z","dependencies_parsed_at":"2022-09-02T05:11:15.369Z","dependency_job_id":null,"html_url":"https://github.com/jloisel/reactive-couchbase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jloisel/reactive-couchbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloisel%2Freactive-couchbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloisel%2Freactive-couchbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloisel%2Freactive-couchbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloisel%2Freactive-couchbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jloisel","download_url":"https://codeload.github.com/jloisel/reactive-couchbase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloisel%2Freactive-couchbase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265482144,"owners_count":23774007,"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":[],"created_at":"2024-11-06T12:19:24.551Z","updated_at":"2025-07-16T04:41:00.503Z","avatar_url":"https://github.com/jloisel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reactive-couchbase\n\nSpring Data Couchbase is currently using the synchronous Couchbase Java SDK 1.x. Java SDK 2 offers batching which greatly improves the performances:\nhttp://docs.couchbase.com/developer/java-2.1/documents-bulk.html\n\nBut the Java SDK 2.x is pretty low level. It lakes a high level repository like Spring Data, while Spring Data lakes Asynchronous operations on Observables. This Couchbase repository implementation tries to fit both worlds:\n- Asynchronous through RxJava,\n- High level API which is easy to use.\n\nPre-requisites:\n- Maven\n- Java JDK 8\n- Lombok (see http://projectlombok.org/)\n\nObservable Couchbase repository made easy:\n```java\nfinal AsyncRepositoryFactory factory = ...;\nfinal AsyncRepository\u003cPerson\u003e repository = factory.create(Person.class);\n\n// findAll() returns Observable\u003cPerson\u003e\nrepository.findAll().forEach(person -\u003e System.out.println(person.getFirstname()));\n```\n\nAs well as sequential repository:\n```java\nfinal SyncRepositoryFactory factory = ...;\nfinal SyncRepository\u003cPerson\u003e repository = factory.create(Person.class);\n\nfinal List\u003cPerson\u003e persons = repository.findAll();\n```\n\nPerson entity using Jackson Json processor:\n```java\n@Value\n@Builder\npublic class Person implements ReactiveEntity {\n  String id;\n  String firstname;\n  String lastname;\n\n  @JsonCreator\n  Person(\n      @JsonProperty(\"id\") final String id,\n      @JsonProperty(\"firstname\") final String firstname,\n      @JsonProperty(\"lastname\") final String lastname) {\n    super();\n    this.id = checkNotNull(id);\n    this.firstname = checkNotNull(firstname);\n    this.lastname = checkNotNull(lastname);\n  }\n}\n```\n\nSpring Configuration:\n```java\n@Configuration\npublic class CouchbaseConfig {\n\n  @Bean\n  @Autowired\n  ASyncRepository\u003cPerson\u003e asyncPersonRepository(final ASyncRepositoryFactory factory) {\n    return factory.create(Person.class);\n  }\n  \n  @Bean\n  @Autowired\n  SyncRepository\u003cPerson\u003e syncPersonRepository(final SyncRepositoryFactory factory) {\n    return factory.create(Person.class);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjloisel%2Freactive-couchbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjloisel%2Freactive-couchbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjloisel%2Freactive-couchbase/lists"}