Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move InMemorySubscriber from L2 communication module to L3 client mo… #158

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

== Overview

This library implements the https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/languages.adoc[uProtocol Language Specific Library Requirements] for Java defined in https://github.com/eclipse-uprotocol/uprotocol-spec/tree/main[uProtocol Specifications]. The library is organized into packages that are described in <<sdk-packages>> below. Each package contains a README.adoc file that describes the purpose of the package and how to use it.
This library implements the https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/languages.adoc[uProtocol Language Specific Library Requirements] for Java defined in https://github.com/eclipse-uprotocol/uprotocol-spec/tree/main[uProtocol Specifications]. The library is organized into packages that are described in <<sdk-packages>> below and organized by the layers of the protocol.

Each package contains a README.adoc file that describes the purpose of the package and how to use it.

The module contains the factory methods, serializers, and validators for all data types defined in the specifications, and any data models that either haven't or couldn't be defined in up-core-api yet.

Expand All @@ -25,26 +27,35 @@ To pull the Library from maven central, setting ${uprotocol.version} to the late
=== Using The Library

.SDK Packages
[#sdk-packages,width=100%,cols="20%,80%",options="header"]
[#sdk-packages,width=100%,cols="1,2,5",options="header"]
|===

| Package | Purpose
| Package | Protocol Layer | Purpose

| xref:src/main/java/org/eclipse/uprotocol/communication/README.adoc[`*client*`]
| https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l3[Application Layer (uP-L3)]
| Top level client-facing interfaces to communication with USubscription, UDiscovery, and UTwin services.

| xref:src/main/java/org/eclipse/uprotocol/communication/README.adoc[`*communication*`]
| Top level client-facing https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l2[communication layer (uP-L2)] interfaces that applications and services use to implement the publisher/subscriber, notification, and RPC patterns on top of the transport layer (uTransport) API.
| https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l2[communication layer (uP-L2)]
| Common implementation of communication messaging patterns (publisher, subscriber, Rpcclient, RpcServer, etc..) tha t is build on top of the L1 transport interface (see below)

| link:src/main/java/org/eclipse/uprotocol/uri/README.adoc[`*uuri*`]
| Builders, validators, and serializers for uProtocol addressing scheme (UUri).
| link:src/main/java/org/eclipse/uprotocol/transport/README.adoc[`*transport*`]
| https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/up-l1/README.adoc[Transport Layer (uP-L1)]
| Interface and data model for how to send() and receive() messages in a common way across various transport technologies (ex. zenoh, mqtt, http, etc...). the interface is implemented by transports (ex. up-transport-android-java), and the interface is then used to build the uProtocol layer 2 communication layer implementation.

| link:src/main/java/org/eclipse/uprotocol/uri/README.adoc[`*uuri*`]
| Basics
| uProtocol addressing scheme (UUri) builders, validators, and serializers.

| link:src/main/java/org/eclipse/uprotocol/uuid/README.adoc[`*uuid*`]
| Identifier used to uniquely identify (and timestamp) messages that are sent

| link:src/main/java/org/eclipse/uprotocol/transport/README.adoc[`*transport*`]
| https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/up-l1/README.adoc[uP-L1 Transport Layer] interface and data model that wraps communication middlewares like zenoh, mqtt, http, etc... into a thin and simple to use transport interface. This model is used by the communication layer (uP-L2) to send and receive messages and transports are expected to implement the link:src/main/java/org/eclipse/uprotocol/transport/UTransport.java[uTransport] interface.
| link:src/main/java/org/eclipse/uprotocol/uuid/README.adoc[`*uuid*`]
| Basics
| uProtocol unique identifier builders, validators, and serializers.

| link:src/main/java/org/eclipse/uprotocol/cloudevent/README.adoc[`*cloudevent*`]
| A representation of uProtocol messages used in older versions of the specifications and kept for backwards compatibility.
| Legacy
| A representation of uProtocol messages used in older versions of the specifications kept for backwards compatibility.

|===

1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
<include>**/uri/**</include>
<include>**/uuid/**</include>
<include>**/validation/**</include>
<include>**/client/**</include>
</includes>
</configuration>
</plugin>
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/eclipse/uprotocol/client/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Application Layer APIs (uP-L3 Interface)

The following module includes the client-facing https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l3[Application Layer (uP-L3)] interfaces to communication with USubscription, UDiscovery, and UTwin services.


## uP-L3 Interfaces

.Interfaces (uP-L3 Interface)
[cols="1,1,3",options="header"]
|===
| Interface | Implementation(s) | Description

| xref:usubscription/v3/USubscriptionClient.java[*USubscriptionClient*] | xref:usubscription/v3/InMemoryUSubscriptionClient.java[InMemoryUSubscriptionClient] | Subscription Management APIs to subscribe(), unsubscribe() and fetch information from the subscription database.
|===


The module includes the interface for the client-facing APIs as well as a simple in-memory implementation that is based on the uP-L2 in-memory implementations. the term in-memory is used to indicate that the data required by the code is cached inside of the object and not persisted to a given database backend, this design is useful for embedded applications (i.e. in the vehicle) however will not scale to the multi-tenanted cloud applications.
Loading
Loading